/* observatory-web.css - NEW for the web copy (22 Nov 2026). Loaded after observatory.css, which is the 1 August
 * viewer's own styles, verbatim. This file only:
 *   1. pins each strip to its own grid row (the August grid stacked them by order, so two at once broke it)
 *   2. adds laptop, tablet and phone layouts (the August viewer was a fixed 360 + map + 380 desktop grid)
 *   3. hides what this copy has no data for (Live, Ask API, and Replay on single-visit cards)
 *   4. styles the new parts: loader, full screen button, panel dock, data-files bar, map-only pictures
 * Colours reuse the August palette. */

/* 1 ---------------------------------------------------------------------------------------------------------- */
.app { grid-template-rows: auto auto auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
header { grid-row: 1; min-height: 56px; }
.live-status-strip, .replay-transport, .visit-transport { grid-row: 2; }
.daily-story { grid-row: 3; }
aside.left, main.canvas-wrap, aside.right { grid-row: 4; min-height: 0; min-width: 0; }
body.visit-replay-cinema .app { grid-template-rows: auto auto auto minmax(0, 1fr) !important; }

/* 3 ---------------------------------------------------------------------------------------------------------- */
body.obs-no-live .mode-toggle .mt.live,
body.obs-no-replay .mode-toggle .mt.replay { display: none; }
body.obs-no-live.obs-no-replay .mode-toggle { display: none; }
body.obs-no-chats .tab[data-tab="chats"] { display: none; }

/* 4 ---------------------------------------------------------------------------------------------------------- */
.obs-loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(ellipse at 50% 45%, #11192e 0%, #060912 60%, #02040a 100%);
  color: var(--ink-1); font-size: 13px; letter-spacing: .4px;
}
.obs-loader[hidden] { display: none; }
.obs-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, .25); border-top-color: var(--accent);
  animation: obs-spin .8s linear infinite;
}
body.obs-failed .obs-spin { display: none; }
@keyframes obs-spin { to { transform: rotate(360deg); } }

header .toolbar { display: flex; align-items: center; gap: 8px; }
.tb.obs-fs { white-space: nowrap; }

.loot-hud .lh-row.kind-doc .lh-bar .lh-fill,
.visit-cinema-panel .vcp-loot-row.kind-doc .vcp-loot-fill {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.55), rgba(45, 212, 191, 0.95));
}

.obs-dock { display: none; }
.obs-panel-close { display: none; }

/* map-only pictures for the dataset cards (?shot=map) */
body.obs-shot-map header, body.obs-shot-map .daily-story, body.obs-shot-map aside,
body.obs-shot-map .visit-transport, body.obs-shot-map .replay-transport, body.obs-shot-map .live-status-strip,
body.obs-shot-map .map-hud, body.obs-shot-map .commentary-feed, body.obs-shot-map .loot-hud,
body.obs-shot-map .in-flight-badge, body.obs-shot-map .cinema-restore-pill, body.obs-shot-map .obs-dock,
body.obs-shot-map .map-legend, body.obs-shot-map .timeline-strip, body.obs-shot-map .replay-ready-banner {
  display: none !important;
}
/* (the stronger selector beats the cinema-mode columns set in the media queries below) */
body.obs-shot-map.obs-shot-map .app,
body.obs-shot-map.visit-replay-cinema .app {
  grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) !important;
}
body.obs-shot-map main.canvas-wrap { grid-row: 1; grid-column: 1; }

/* 2 ---------------------------------------------------------------------------------------------------------- */
.visit-transport, .replay-transport { flex-wrap: wrap; row-gap: 6px; }

@media (max-width: 1440px) {
  .app { grid-template-columns: 320px minmax(0, 1fr) 340px; }
  body.visit-replay-cinema .app { grid-template-columns: minmax(0, 1fr) 340px !important; }
  header .stats { gap: 14px; }
}
@media (max-width: 1280px) {
  .app { grid-template-columns: 286px minmax(0, 1fr) 312px; }
  body.visit-replay-cinema .app { grid-template-columns: minmax(0, 1fr) 312px !important; }
  header { gap: 12px; padding: 0 12px; }
  header .meta { display: none; }
  header .stats .stat b { font-size: 13px; }
}
@media (max-width: 1080px) {
  header .stats .stat:nth-child(2), header .stats .stat:nth-child(4) { display: none; }
  .visit-transport .vt-speed, .visit-transport .vt-stats { display: none !important; }
}

/* tablet and phone: the map fills the frame; Visits and Details slide over it from the dock */
@media (max-width: 900px) {
  .app, body.visit-replay-cinema .app { grid-template-columns: minmax(0, 1fr) !important; }
  header { min-height: 48px; padding: 6px 10px; flex-wrap: wrap; row-gap: 6px; }
  header h1 { font-size: 13px; }
  header .stats { display: none; }
  header .toolbar { margin-left: auto; }
  .daily-story { padding: 6px 12px; font-size: 11px; }
  .daily-story #daily-story-text {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  aside.left, aside.right {
    position: fixed; top: 0; bottom: 0; z-index: 60;
    width: min(380px, 92vw);
    border: 1px solid var(--panel-border);
    background: rgba(10, 15, 28, 0.97);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    transition: transform .22s ease, visibility .22s;
    visibility: hidden;
  }
  aside.left { left: 0; transform: translateX(-104%); }
  aside.right { right: 0; transform: translateX(104%); }
  body.obs-show-left aside.left, body.obs-show-right aside.right { transform: none; visibility: visible; }
  body.visit-replay-cinema.obs-show-left aside.left { display: flex !important; }
  .obs-panel-close {
    display: block; flex-shrink: 0; align-self: flex-end; margin: 8px 10px 0;
    background: rgba(20, 26, 44, 0.85); border: 1px solid var(--panel-border); color: var(--ink-1);
    border-radius: 4px; padding: 5px 12px; font: 600 11px/1.2 inherit; letter-spacing: .5px; cursor: pointer;
  }
  .obs-dock {
    display: flex; gap: 6px; position: absolute; top: 10px; left: 10px; z-index: 30;
  }
  body.visit-replay-cinema .obs-dock { top: 46px; }
  .obs-dock button {
    background: rgba(20, 26, 44, 0.85); border: 1px solid var(--panel-border); color: var(--ink-0);
    border-radius: 4px; padding: 7px 12px; font: 600 11px/1.2 inherit; letter-spacing: .5px; cursor: pointer;
    backdrop-filter: blur(6px);
  }
  .commentary-feed { max-height: 34%; }
  body.visit-replay-cinema #visit-replay-commentary-feed { max-width: none; right: 12px; }
  .loot-hud { width: 230px; right: 10px; bottom: 10px; }
  .visit-transport, .replay-transport { padding: 6px 10px !important; gap: 8px; font-size: 10.5px; }
  .replay-transport .rt-stats, .replay-transport .rt-daytime { display: none; }
  .visit-transport .vt-title { font-size: 11px; max-width: 100%; }
  .visit-transport .vt-scrub, .replay-transport .rt-scrub { min-width: 120px; }
}
@media (max-width: 640px) {
  .map-legend { display: none; }
  .tb#tb-ssafe { display: none; }
  .timeline-strip { bottom: 12px; }
  .visit-transport .vt-clock { display: none; }
}

/* The Regions legend sits over the top-right of the map. When the map column is narrow (inside a page, or a laptop
   with both side panels open) it covers bubbles, and every bubble already carries its own label: hide it there. */
main.canvas-wrap { container-type: inline-size; }
@container (max-width: 720px) { .map-legend { display: none; } }
