/* ============================================================
   WhereTooEat — FINAL EXPLORE POLISH PASS (2026-10-02)
   Loaded LAST. Composition, promoted bar, map->video transition.
   Does NOT touch: fullscreen map architecture, panels as
   overlays, gestures, wheel/ctrl-wheel behaviour, 200vh pin.
   ============================================================ */

/* ---------- 5/6/7. PROMOTED BAR: glass, own clipped viewport, image priority ---------- */
.promo {
  background: rgba(5, 20, 27, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
          backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid rgba(255, 194, 74, 0.10);
}
/* label + arrows are fixed chrome; the track is the only scrollable region */
.promo .arrow,
.promo-label { flex: 0 0 auto; }
.promo-track {
  min-width: 0;
  /* card #1 is NEVER faded or hidden: fade applies to the right edge only */
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 22px), transparent 100%);
}
.promo-card {
  background: rgba(5, 20, 27, 0.72);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
          backdrop-filter: blur(8px) saturate(115%);
  border: 1px solid rgba(255, 194, 74, 0.20);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.06), 0 6px 18px rgba(0, 0, 0, 0.28);
}
.promo-card:hover { border-color: rgba(255, 194, 74, 0.6); }

/* thumbnails: intentional dark circle with a subtle gold ring (images + fallbacks) */
.promo-card .food-pic {
  background: #0c2230 !important;
  border: 1px solid rgba(255, 194, 74, 0.38) !important;
  box-shadow: 0 0 8px rgba(255, 182, 46, 0.22) !important;
}
/* IG avatars: navy backing + gold ring so dark logos never read as empty circles */
.promo-card .food-pic.wte-ig-profile-pic {
  background: radial-gradient(circle at 35% 30%, #17435a, #0a1e2b) !important;
  border: 1px solid rgba(255, 194, 74, 0.38) !important;
  box-shadow: 0 0 8px rgba(255, 182, 46, 0.25) !important;
}
/* designed initial fallback — dark circle, gold outline, gold initial. Never a white circle. */
.promo-card .food-pic.ph {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #17435a, #0a1e2b) !important;
  border-color: rgba(255, 194, 74, 0.52) !important;
  color: #ffe199;
  font-weight: 800;
  font-size: 15px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
/* SOCIAL BRANDS: real Facebook/Instagram glyphs replace initials */
.promo-card .food-pic.ph svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ---------- 8. CUISINE ATLAS / right panel: clear of the promoted strip ---------- */
@media (min-width: 901px) {
  .left-panel,
  .right-panel {
    /* header 64 + view-bar 32 + promo 56 + 14px breathing room */
    top: 166px;
  }
}

/* ---------- 9. RIGHT PANEL: imagery separates, not lines ---------- */
.right-panel .intel,
.right-panel .feed,
.right-panel .mini-section {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ---------- 11. MAP LEGEND: breathe above the transition ---------- */
@media (min-width: 901px) {
  .legend {
    bottom: calc(clamp(100px, 12vh, 150px) + 44px);
  }
}

/* ---------- 13-18. MAP -> VIDEO TRANSITION: crossfade, no hard line ----------
   The video (promo-hero-pin margin-top: -10vh) already slides under the map.
   The vignette bottom must NEVER become fully opaque — video imagery must
   stay visible through it. A radial layer makes the centre slightly more
   transparent than the edges so the boundary reads as atmosphere, not a rule. */
@media (min-width: 901px) {
  /* TUNE 2026-10-02: the VIDEO now sits physically UNDER the map stage,
     and the map visual layers fade to transparent at the bottom — real
     video pixels come through the disappearing map. */
  .promo-hero {
    z-index: 0;
  }
  /* the stage's own background must let the video through under the fade zone */
  .map-shell,
  .map-shell.map-shell--parallax {
    background: transparent !important;
  }
  /* mask ONLY the visual map/basemap layers (never panels/controls/legend) */
  #mapShell .ml-root,
  #mapShell .world-svg,
  #mapShell .map-stars {
    -webkit-mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 calc(100% - 140px),
      rgba(0, 0, 0, 0.92) calc(100% - 115px),
      rgba(0, 0, 0, 0.62) calc(100% - 75px),
      rgba(0, 0, 0, 0.22) calc(100% - 25px),
      transparent 100%);
            mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 calc(100% - 140px),
      rgba(0, 0, 0, 0.92) calc(100% - 115px),
      rgba(0, 0, 0, 0.62) calc(100% - 75px),
      rgba(0, 0, 0, 0.22) calc(100% - 25px),
      transparent 100%);
  }
  /* atmosphere only now — the real blend comes from actual overlapping pixels */
  .map-vignette {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 26%, transparent 74%, rgba(0, 0, 0, 0.16)),
      radial-gradient(115% 90% at 50% 42%, transparent 62%, rgba(0, 0, 0, 0.22) 100%),
      linear-gradient(180deg,
        transparent calc(100% - clamp(110px, 13vh, 160px)),
        rgba(8, 32, 48, 0.16) calc(100% - clamp(46px, 6vh, 70px)),
        rgba(8, 32, 48, 0.06) 100%);
  }
}

/* video top fade: light map-toned blend over the first ~110px — polish only,
   the real crossfade is the map transparency above */
.promo-hero-fade {
  background:
    linear-gradient(180deg, rgba(8, 32, 48, 0.38) 0%, rgba(8, 32, 48, 0.16) 56px, rgba(8, 32, 48, 0.05) 96px, transparent 112px),
    linear-gradient(180deg, rgba(6, 24, 34, 0.1) 0%, rgba(6, 24, 34, 0.2) 36%, rgba(6, 24, 34, 0.45) 66%, rgba(8, 32, 48, 0.86) 90%, rgba(8, 32, 48, 1) 100%),
    linear-gradient(90deg, rgba(6, 24, 34, 0.42) 0%, rgba(6, 24, 34, 0.16) 36%, rgba(6, 24, 34, 0.04) 66%, rgba(8, 32, 48, 0.2) 100%),
    radial-gradient(ellipse at 75% 18%, rgba(255, 194, 74, 0.12), transparent 55%);
}

/* ---------- 19. ORB: pull the eye INTO the video section, off the seam ---------- */
@media (min-width: 901px) {
  .wte-fab.fab-orb {
    bottom: 0px;    /* rest fully inside the video zone */
  }
  .orb-chat {
    bottom: 88px;
  }
}

/* ============================================================
   VISUAL CLEANUP PASS (2026-10-02) — hierarchy, not effects.
   ============================================================ */

/* --- hierarchy 1: geography supports, food leads --- */
.ml-root .maplibregl-canvas {
  filter: saturate(0.9) contrast(1.01) brightness(0.99);
}
.world-svg .land { fill: #a9b48c; }

/* --- hierarchy 2 MAPVIS 2026-10-09: regional/metro dots stay cuisine-coloured
   and readable (7–8px + edge/glow). Colour source = Atlas --spot-color. --- */
#mapShell[data-zoom="low"] .spot {
  width: 7px !important;
  height: 7px !important;
  background: var(--spot-color) !important;
  border: 1.25px solid rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    0 0 0 1px rgba(2, 8, 12, 0.85),
    0 0 7px color-mix(in srgb, var(--spot-color) 58%, transparent) !important;
}
#mapShell[data-zoom="mid"] .spot {
  width: 8px !important;
  height: 8px !important;
  background: var(--spot-color) !important;
  border: 1.25px solid rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    0 0 0 1px rgba(2, 8, 12, 0.85),
    0 0 7px color-mix(in srgb, var(--spot-color) 58%, transparent) !important;
}
#mapShell[data-zoom="city"] .spot,
#mapShell[data-zoom="near"] .spot {
  width: 10px !important;
  height: 10px !important;
  background: var(--spot-color) !important;
  border: 1.25px solid rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    0 0 0 1px rgba(2, 8, 12, 0.85),
    0 0 7px color-mix(in srgb, var(--spot-color) 58%, transparent) !important;
}
@media (max-width: 900px) {
  #mapShell[data-zoom="low"] .spot { width: 8px !important; height: 8px !important; }
  #mapShell[data-zoom="mid"] .spot { width: 9px !important; height: 9px !important; }
  #mapShell[data-zoom="city"] .spot,
  #mapShell[data-zoom="near"] .spot { width: 11px !important; height: 11px !important; }
}

/* regional count clusters: subtle, never bright bubbles */
.spot-cluster {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 18, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 231, 199, 0.85);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 0 1px var(--cluster-ring, rgba(255, 255, 255, 0.16)), 0 2px 8px rgba(0, 0, 0, 0.25);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* --- hierarchy 3: premium glows ~30% quieter; only SELECTED dominates.
   BALANCE 2026-10-02: another ~25% off halo radius/intensity --- */
.pin.promoted,
.pin.glow-promoted {
  box-shadow:
    0 0 0 2px rgba(255, 210, 74, 0.42),
    0 0 8px rgba(255, 210, 74, 0.38),
    0 0 18px rgba(255, 154, 31, 0.3),
    0 0 34px rgba(34, 211, 238, 0.22) !important;
}
.pin.promoted > .pin-aura,
.pin.glow-promoted > .pin-aura {
  inset: -13px !important;
  background: radial-gradient(circle, rgba(255, 210, 74, 0.38) 0%, rgba(34, 211, 238, 0.18) 42%, transparent 72%) !important;
}
.pin.exclusive,
.pin.glow-exclusive {
  box-shadow:
    0 0 0 2px rgba(255, 229, 102, 0.38),
    0 0 8px rgba(255, 229, 102, 0.3),
    0 0 18px rgba(196, 181, 253, 0.22) !important;
}
.pin.spotlight,
.pin.glow-spotlight {
  box-shadow:
    0 0 0 2px rgba(103, 232, 249, 0.45),
    0 0 10px rgba(103, 232, 249, 0.42) !important;
}
/* SELECTED = the single focal point; nearby premium markers step back */
#mapShell.has-selected .pin:not(.selected) {
  filter: saturate(0.85) brightness(0.9);
}
.pin.selected {
  z-index: 30 !important;
}

/* label priority: selected > spotlight > promoted; hide losers of a collision */
.pin.label-hidden:not(:hover) .pin-city {
  opacity: 0 !important;
}

/* --- CUISINE DOTS MAPVIS 2026-10-09: Atlas hover = strong map exploration ---
   Matching cuisine dots brighten + scale; unrelated normal dots dim (never hidden).
   Premium pins and their status treatment are untouched. */
#mapShell.wte-cuisine-hover .spot-cuisine-dim {
  opacity: 0.14 !important;
}
#mapShell.wte-cuisine-hover .spot.spot-cuisine-hot {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1.35) !important;
  z-index: 14 !important;
  border: 1.25px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 0 8px var(--spot-color),
    0 0 18px color-mix(in srgb, var(--spot-color) 65%, transparent) !important;
}
#mapShell.wte-cuisine-hover .spot.spot-cuisine-dim {
  opacity: 0.14 !important;
}
#mapShell.wte-cuisine-hover .spot-cluster {
  opacity: 0.22 !important;
}
.spot:hover,
.spot:focus-visible,
.spot.is-hover {
  transform: translate(-50%, -50%) scale(1.35);
  z-index: 14;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 0 8px var(--spot-color),
    0 0 18px color-mix(in srgb, var(--spot-color) 65%, transparent) !important;
}

/* Cuisine Atlas row: 10px swatch, 13px on hover; colour = PRIMARY_CUISINES */
.filter-row[data-cui-row] > span:first-child,
.filter-row[data-cui-row] .cui-atlas-mark {
  transition: transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-row[data-cui-row] .cui-swatch {
  width: 10px;
  height: 10px;
  margin-right: 0;
  transition: width 0.15s ease, height 0.15s ease, box-shadow 0.15s ease;
}
.filter-row[data-cui-row]:hover > span:first-child,
.filter-row[data-cui-row]:hover .cui-atlas-mark {
  transform: scale(1.2);
}
.filter-row[data-cui-row]:hover .cui-swatch {
  width: 13px;
  height: 13px;
  box-shadow:
    0 0 0 1px rgba(2, 8, 12, 0.75),
    0 0 8px color-mix(in srgb, var(--spot-color, currentColor) 70%, transparent);
}
.row-count {
  float: right;
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  opacity: 0;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.filter-row:hover .row-count {
  opacity: 1;
  color: var(--gold-soft);
}

/* --- MAP RESTAURANT POPUP (2026-10-02): premium preview, not a data panel --- */
@media (min-width: 901px) {
  #mapShell #preview.preview.show {
    width: 340px;
    max-width: calc(100vw - 360px);
    max-height: min(620px, calc(100dvh - 190px)) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
  }
  /* dark glass header — cuisine color is an accent only, never a flood */
  #mapShell #preview .preview-band {
    background: linear-gradient(180deg, rgba(8, 24, 34, 0.97), rgba(9, 26, 38, 0.88));
    border-top: 2px solid var(--pv-accent, var(--gold));
    min-height: 58px;
    display: flex;
    justify-content: center;
    padding: 12px 10px 0;
  }
  #mapShell #preview .preview-avatar,
  #mapShell #preview .preview-logo-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    transform: translateY(24px);
    box-shadow:
      0 0 0 2px var(--gold),
      0 0 16px color-mix(in srgb, var(--pv-accent, var(--gold)) 45%, transparent);
  }
  #mapShell #preview .preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  #mapShell #preview .preview-body {
    padding: 34px 14px 14px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  /* small quiet close control */
  #mapShell #preview .preview-close {
    width: 26px;
    height: 26px;
    font-size: 14px;
    line-height: 1;
    color: #ffe9c4;
    background: rgba(10, 22, 30, 0.85);
    border: 1px solid rgba(255, 194, 74, 0.35);
    border-radius: 8px;
    z-index: 6;
  }
  /* 3-line description + read more */
  #mapShell #preview .preview-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #mapShell #preview .preview-readmore,
  #mapShell #preview .preview-menu-more {
    background: none;
    border: 0;
    padding: 2px 0;
    color: var(--gold-soft);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  /* primary CTA = the only gold monster */
  #mapShell #preview .preview-cta {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 10px 0 6px;
    height: 40px;
  }
  /* secondary actions: equal quiet buttons + ••• */
  #mapShell #preview .preview-actions--secondary {
    gap: 6px;
  }
  #mapShell #preview .preview-actions--secondary > * {
    flex: 1;
    justify-content: center;
  }
  #mapShell #preview .preview-actions--secondary .preview-more-toggle {
    flex: 0 0 38px;
    margin: 0;
    padding: 0;
  }
  #mapShell #preview .tags--secondary {
    margin-top: 8px;
  }
  /* compact secondary action groups inside the ••• panel */
  #mapShell #preview .preview-more-group {
    margin: 8px 0 2px;
  }
  #mapShell #preview .preview-more-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
  }
  #mapShell #preview .preview-more-group > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* --- CUISINE ATLAS MODES (2026-10-02): app-like panel — fixed header/tabs/
   quick filters, ONLY the middle content scrolls --- */
.left-panel .filters {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.left-panel .filters .atlas-kicker,
.left-panel .filters .atlas-bar,
.left-panel .filters .filter-search,
.left-panel .filters #cuisineHits,
.left-panel .filters .atlas-tabs,
.left-panel .filters .atlas-active,
.left-panel .filters .atlas-quick {
  flex: 0 0 auto;
}
.left-panel .filters #cuisineHits:empty {
  display: none;
}
.atlas-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 8px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.atlas-tabs {
  display: flex;
  gap: 2px;
  margin: 6px 0 2px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255, 194, 74, 0.14);
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.atlas-tabs::-webkit-scrollbar { display: none; }
.atlas-tab {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: #cfc9bc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 10px 7px;
  position: relative;
  border-radius: 8px 8px 0 0;
}
.atlas-tab:hover {
  color: #efe6d2;
  background: rgba(255, 255, 255, 0.05);
}
.atlas-tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.atlas-tab.on {
  color: var(--gold-soft);
  background: linear-gradient(180deg, rgba(255, 194, 74, 0.12), rgba(255, 194, 74, 0.02));
}
.atlas-tab.on::after { opacity: 1; }
.atlas-tab:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: -2px;
}
.atlas-tab-count {
  display: inline-block;
  margin-left: 5px;
  min-width: 15px;
  padding: 0 4px;
  text-align: center;
  font-size: 9px;
  line-height: 15px;
  border-radius: 8px;
  background: rgba(255, 194, 74, 0.18);
  color: var(--gold-soft);
  font-style: normal;
  letter-spacing: 0;
}
.atlas-active {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px 8px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.atlas-active::-webkit-scrollbar { display: none; }
.atlas-active-n {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-right: 2px;
  flex: 0 0 auto;
}
.atlas-active .mini-chip { font-size: 10px; padding: 2px 7px; flex: 0 0 auto; }
.atlas-active .atlas-active-chip {
  background: rgba(255, 194, 74, 0.16);
  border-color: rgba(255, 194, 74, 0.55);
  color: #ffe6ad;
}
.atlas-active .atlas-active-chip:focus-visible,
.mini-chip:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}
.atlas-active-more { font-size: 10px; color: var(--muted); flex: 0 0 auto; }
.atlas-active .collapse { margin-left: auto; flex: 0 0 auto; }
.atlas-quick {
  border-top: 0;
  padding: 16px 8px 8px;
  background: linear-gradient(180deg, rgba(9, 26, 38, 0) 0%, rgba(9, 26, 38, 0.62) 16px, rgba(9, 26, 38, 0.62) 100%);
}
.atlas-quick .section-label { margin: 2px 2px 6px; }
.atlas-quick-chips { gap: 5px; padding-bottom: 2px; }
.atlas-quick-chips .mini-chip { font-size: 11px; padding: 4px 9px; }
.atlas-foot { margin: 6px 2px 0; font-size: 10px; color: var(--muted); }

/* quiet internal scrollbar */
.atlas-content::-webkit-scrollbar { width: 6px; }
.atlas-content::-webkit-scrollbar-track { background: transparent; }
.atlas-content::-webkit-scrollbar-thumb {
  background: rgba(150, 180, 200, 0.28);
  border-radius: 3px;
}
.atlas-content::-webkit-scrollbar-thumb:hover {
  background: rgba(150, 180, 200, 0.45);
}

/* empty result state */
.atlas-empty {
  padding: 16px 10px;
  text-align: center;
}
.atlas-empty p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.atlas-empty .action { margin: 0 4px; }

/* --- chrome micro-adjustments: quieter legend, glassier panels --- */
@media (min-width: 901px) {
  .legend {
    background: rgba(7, 15, 18, 0.58);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  }
  .left-panel,
  .right-panel {
    background: rgba(5, 14, 18, 0.73);
  }
}
