/* ============================================================
   WhereTooEat — EXPLORE VISUAL COMPOSITION PASS (2026-10-03)
   Loaded LAST. Header glass hierarchy, promoted ribbon, ocean
   atmosphere, compact selected-restaurant companion.
   FROZEN: map camera, coordinates, Atlas, cuisine colors, data,
   filters, clustering, collision, map->video transition, mobile.
   ============================================================ */

/* ---------- OCEAN ATMOSPHERE: soft static edge shading only ----------
   (the water COLOR itself lives in map.js / explore-mapstyle paint) */
.map-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(115% 88% at 50% 40%, transparent 58%, rgba(3, 10, 16, 0.16) 100%);
}

/* ---------- HEADER: premium floating glass, no hard seams ---------- */
@media (min-width: 901px) {
  /* R4 2026-10-27: navy .header gradient + .header::after sheen removed; replaced in gui-fix-r4.css */
  /* ROW 2: quiet glass whisper so the count reads as a layer, not a strip */
  .view-bar {
    background: rgba(4, 11, 17, 0.28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  }
  /* ROW 3: promoted = separate floating discovery ribbon (slightly darker) */
  .promo {
    margin: 4px 12px 10px;
    border-radius: 14px;
    background: rgba(4, 10, 16, 0.58);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.30);
    overflow: hidden;
  }
  .promo-card {
    background: rgba(6, 15, 22, 0.66);
  }
}

/* ---------- RIGHT PANEL: compact discovery companion ---------- */
@media (min-width: 901px) {
  .right-panel {
    width: clamp(252px, 15vw, 274px);
  }
  /* selected mode: the panel sizes to its companion card — no giant empty navy */
  #social.has-selection {
    bottom: auto;
    height: auto;
    max-height: calc(100dvh - 196px);
    overflow-y: auto;
  }
  .wte-selected-profile {
    padding: 10px;
    background: rgba(6, 13, 19, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
  }
  .wte-sp-hero-wrap {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
  }
  /* intentional dark fallback — never a broken image, never a stretched avatar */
  .wte-sp-hero.ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 35% 30%, #14384a, #081c28);
    color: rgba(255, 225, 153, 0.85);
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  }
  .wte-sp-name { font-size: 15px; }
  .wte-sp-loc { font-size: 12px; margin-bottom: 4px; }
  .wte-sp-meta { margin-bottom: 8px; font-size: 12.5px; }
  .wte-sp-tags { margin-bottom: 8px; }
  .wte-sp-actions { margin-bottom: 0; }
  .wte-sp-view {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 9px 10px;
  }
  .wte-sp-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 10px;
  }
  .wte-sp-thumb { border-radius: 8px; }
  /* failed thumbnails simply disappear — no empty boxes */
  .wte-sp-thumb.ph { display: none; }
  /* popup stays a compact primary card */
  #preview { max-width: 350px; }
}

/* ---------- RESPONSIVE: protect the map first ---------- */
@media (min-width: 901px) and (max-width: 1100px) {
  .right-panel { width: 248px; }
}