/* MAGG Mini Tools — Fishing wing. NEUTRAL / TEMPORARY (fish skin not designed yet).
   Vanilla port of the shared cross-wing floating "Tools" widget. Namespaced
   .gmt-* so nothing else in the wing is affected. The bubble sits bottom-LEFT to
   avoid the bottom-right accessible-view widget (.wing-av-widget). Themed with
   the wing's existing CSS variables. Safe to restyle wholesale when skinned. */

/* ── Launcher bubble ──────────────────────────────────────────────────────── */
.gmt-launcher {
  position: fixed; left: 20px; bottom: 20px; z-index: 57;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; cursor: pointer;
  background: rgba(12,42,32,.92); border: 1px solid rgba(255,255,255,.24);
  color: var(--cream); font-family: inherit; font-weight: 850;
  font-size: clamp(.9rem, 2.2vw, 1.05rem);
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-user-select: none; user-select: none;
  transition: transform .15s, border-color .15s, background .15s;
}
.gmt-launcher:hover, .gmt-launcher:focus-visible { transform: scale(1.06); border-color: var(--glow); outline: none; }
.gmt-launcher:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
.gmt-launcher[aria-expanded="true"] { border-color: var(--yellow); background: rgba(20,58,42,.96); }
.gmt-launcher-icon { display: flex; align-items: center; pointer-events: none; }
.gmt-launcher-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--yellow); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gmt-launcher-label { font-weight: 850; line-height: 1; }

/* ── Mini menu ────────────────────────────────────────────────────────────── */
.gmt-menu {
  position: fixed; left: 20px; bottom: 78px; z-index: 58;
  width: 200px; padding: 6px;
  background: rgba(11,34,26,.98); border: 1.5px solid var(--glow);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 3px;
}
.gmt-menu::after {
  content: ''; position: absolute; bottom: -8px; left: 26px;
  width: 14px; height: 8px; background: rgba(11,34,26,.98);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-left: 1.5px solid var(--glow); border-right: 1.5px solid var(--glow);
}
.gmt-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; background: transparent; color: var(--cream);
  font-family: inherit; font-size: .86rem; font-weight: 700; text-align: left;
  border: none; border-radius: 6px; cursor: pointer;
  transition: background .12s, color .12s;
}
.gmt-menu-item:hover, .gmt-menu-item:focus-visible { background: rgba(255,230,108,.12); color: var(--yellow); outline: none; }
.gmt-menu-item-icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── In-wing Snap overlay (large modal embedding the Snap iframe) ──────────── */
.gmt-snap-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0,0,0,.62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.gmt-snap-modal {
  display: flex; flex-direction: column;
  width: min(1100px, 94vw); height: min(900px, 92vh);
  background: #0b1220; border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.gmt-snap-modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: rgba(12,42,32,.95);
  border-bottom: 1px solid rgba(255,255,255,.12); flex-shrink: 0;
}
.gmt-snap-modal-title { color: var(--yellow); font-weight: 900; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.gmt-snap-modal-actions { display: flex; align-items: center; gap: 10px; }
.gmt-snap-modal-open {
  color: var(--cream); font-size: .74rem; font-weight: 800; text-decoration: none;
  border: 1px solid rgba(255,255,255,.24); border-radius: 999px; padding: 5px 12px;
}
.gmt-snap-modal-open:hover, .gmt-snap-modal-open:focus-visible { border-color: var(--glow); outline: none; }
.gmt-snap-modal-close {
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  padding: 0; background: transparent; color: var(--cream); font-size: .85rem;
  border: 1px solid rgba(255,255,255,.22); border-radius: 50%; cursor: pointer;
}
.gmt-snap-modal-close:hover, .gmt-snap-modal-close:focus-visible { border-color: var(--glow); color: var(--yellow); outline: none; }
.gmt-snap-modal-body { flex: 1; min-height: 0; }
.gmt-snap-modal-iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .gmt-launcher { left: 10px; bottom: 16px; padding: 10px 14px; }
  .gmt-menu { left: 10px; bottom: 70px; }
  .gmt-snap-overlay { padding: 0; }
  .gmt-snap-modal { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
}
