/* ============================================================================
   globe-stamps.css — the filter rail and the shared map card.
   Drawn to /static/globe-stamps-preview.html. See js/globe-stamps.js.

   Two pieces:
     · #gs-rail  — top-anchored, ONE row: segmented modes, count, Series chip
                   (the legend lives in a drawer behind that chip)
     · #gs-card  — the bottom card, shared by stamp taps AND POI taps

   The card REPLACES the Mapbox popup that POI taps used to raise. A popup is
   anchored to a coordinate, so it moved when the map moved, it fought the
   Departures chrome for its ✕, and it could never be more than ~280px wide.
   A bottom card is a sheet: it stays put, it can hold a real list, and it's
   the shape every map app uses for "here's what you tapped".
   ========================================================================= */

/* ── the filter button + its panel ─────────────────────────────────────── */
/* #gs-rail is now just a positioning host — no background, no width, nothing
   drawn. It anchors the button to the MAP|TERMINAL band's right end and hangs
   the panel beneath it. Nothing lies across the map, which is what the three
   previous shapes all got wrong. */
#gs-rail {
    position: fixed;
    top: calc(var(--header-height, 72px) + var(--safe-top, 0px) + 5px);
    right: 12px;
    z-index: 8;
}

#gs-filt {
    position: relative;
    appearance: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    /* Deliberately identical to #dep5-locate — same size, radius and shadow.
       They're the only two floating controls on this surface and they should
       read as a set, not as two unrelated widgets. */
    background: #fff;
    color: #3d3d3d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 140ms ease, color 140ms ease;
}
#gs-filt.on {
    background: var(--ink, #1a1a1a);
    color: #fff;
}
/* "The globe isn't showing everything" — readable without opening the panel.
   Without it a switched-off series is indistinguishable from missing data. */
.gs-filt-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-gold, #FFD93D);
    box-shadow: 0 0 0 1.5px #fff;
}
#gs-filt.on .gs-filt-dot { box-shadow: 0 0 0 1.5px var(--ink, #1a1a1a); }
.gs-filt-dot[hidden] { display: none; }

#gs-pop {
    position: absolute;
    top: 50px;
    right: 0;
    width: 214px;
    max-height: 60vh;
    overflow-y: auto;
    display: none;
    padding: 11px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
    transform-origin: top right;
}
#gs-pop.open {
    display: block;
    animation: gs-pop-in 130ms ease-out;
}
@keyframes gs-pop-in {
    from { opacity: 0; transform: scale(0.94) translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

.gs-pop-hd {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 7px;
}
.gs-pop-l {
    display: block;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.45);
}
.gs-pop-l[hidden] { display: none; }
#gs-pop-sl { margin: 11px 0 7px; }

/* Why the map is empty. Amber rather than red — a filtered map is a state the
   user chose, not an error. */
.gs-pop-msg {
    margin: 11px 0 0;
    padding: 8px 9px;
    border-radius: 8px;
    background: rgba(255, 217, 61, 0.18);
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(26, 26, 26, 0.75);
}
.gs-pop-msg[hidden] { display: none; }

.gs-pop-reset {
    appearance: none;
    cursor: pointer;
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 8px;
    border: 1px solid rgba(26, 26, 26, 0.14);
    border-radius: 8px;
    background: transparent;
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.66);
    -webkit-tap-highlight-color: transparent;
}
.gs-pop-reset[hidden] { display: none; }

/* Anything that takes over the screen takes the rail with it: the Terminal
   page, the Stamps sheet at full height, a focused FIND dive, a scoped
   series view. Same list the cadence rail hides for. */
body.dep5-terminal-open #gs-rail,
body.dep5-sheet-full #gs-rail,
body.dep-challenge-focus #gs-rail,
body.dt-series-active #gs-rail { display: none; }
/* The Travel Map overlay is full-screen and above the tab, so it covers the
   rail without a rule of its own — no body class is set for it, and inventing
   one here would be a hook nothing maintains. */

/* The panel's contents. The modes stay a segmented control — it's the same
   shape as the MAP|TERMINAL band, so the two read as one family — but it now
   sits inside the panel with room to breathe rather than fighting for width. */
.gs-cseg {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 100px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    background: rgba(26, 26, 26, 0.03);
}
.gs-mode {
    appearance: none;
    cursor: pointer;
    border: 0;
    flex: 1;
    background: transparent;
    font-family: var(--font-ui, 'Figtree', sans-serif);
    /* 10.5px / 6px sides so ALL · NEAR · HIDDEN all fit the 214px panel on one
       line — "Hidden" spelled out is what forced the tightening, and a wrapped
       segmented control looks broken. */
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 6px;
    border-radius: 100px;
    color: rgba(26, 26, 26, 0.6);
    white-space: nowrap;
    transition: background 140ms ease, color 140ms ease;
    -webkit-tap-highlight-color: transparent;
}
.gs-mode.on {
    background: var(--ink, #1a1a1a);
    color: #fff;
}

.gs-rail-cnt {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 10px;
    color: var(--gold-deep, #b38728);
    white-space: nowrap;
}

/* Vertical list, not a horizontal chip strip. This is what fixes the
   truncation at its root: "Entertainment Venues" gets a whole line instead of
   a chip squeezed between two other controls. Count is pushed to the right so
   the names left-align and scan as a list. */
.gs-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.gs-lg {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    text-align: left;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 8px;
    border-radius: 7px;
    border: 0;
    background: rgba(26, 26, 26, 0.04);
    color: rgba(26, 26, 26, 0.72);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 140ms ease, background 140ms ease;
}
.gs-lg i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
    font-style: normal;
}
.gs-lg-n {
    flex: 1;
    min-width: 0;
    /* Two lines then ellipsis — a 214px panel still can't hold every possible
       series name, but two lines holds every one that exists today. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gs-lg-c {
    flex: none;
    color: var(--gold-deep, #b38728);
}
/* Switched off = struck through as well as dimmed. Opacity alone reads as
   "loading" on a panel this small. */
.gs-lg.off { opacity: 0.42; }
.gs-lg.off .gs-lg-n { text-decoration: line-through; }

/* ── the card ──────────────────────────────────────────────────────────── */
#gs-card {
    /* FIXED on the body, not absolute in the tab: the same card is raised from
       the Travel Map overlay, which is a sibling of the tab container. */
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--safe-bottom, 0px) + 66px);   /* clears the tab bar */
    max-width: 560px;
    margin: 0 auto;
    z-index: 1200;                                  /* over the map overlay */
    background: #fff;
    border-radius: 18px;
    padding: 16px 17px 15px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
    transform: translateY(calc(100% + 90px));
    transition: transform 340ms cubic-bezier(.2, 0, 0, 1);
    max-height: 62vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#gs-card.up { transform: translateY(0); }

.gs-card-x {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background: var(--paper, #F4F1EA);
    color: rgba(26, 26, 26, 0.42);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.gs-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 13px;
    /* Room for the ✕ so a long title can't run under it. */
    padding-right: 34px;
}
.gs-card-b { flex: 1; min-width: 0; }

/* The stamp itself. Square-ish and modest — this is a summary card, not the
   detail overlay, so the art identifies the stamp rather than presenting it.
   `contain` because stamp PNGs are background-removed and not a fixed ratio. */
.gs-card-art {
    width: 58px;
    height: 58px;
    flex: none;
    object-fit: contain;
    border-radius: 9px;
    background: rgba(26, 26, 26, 0.04);
}
.gs-card-art[hidden] { display: none; }
/* Not yet earned — desaturated, matching the greyscale-til-collected language
   the Welcome-to series already uses in the scoped view. Still legible, still
   clearly the same object, obviously not yours yet. */
.gs-card-art.is-locked { filter: grayscale(1) opacity(0.55); }
.gs-card-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.42);
    margin-bottom: 6px;
}
.gs-card-eyebrow i { width: 9px; height: 9px; border-radius: 50%; flex: none; font-style: normal; }
.gs-card-name {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-size: 21px;
    line-height: 1.14;
    letter-spacing: -0.016em;
    color: var(--ink, #1a1a1a);
}

.gs-star {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(26, 26, 26, 0.12);
    background: var(--paper, #F4F1EA);
    font-size: 17px;
    line-height: 1;
    color: rgba(26, 26, 26, 0.42);
    transition: background 140ms ease, color 140ms ease;
    -webkit-tap-highlight-color: transparent;
}
.gs-star.on {
    background: var(--accent-gold, #FFD93D);
    border-color: var(--gold-deep, #b38728);
    color: var(--ink, #1a1a1a);
}

.gs-card-sub {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.42);
    margin-bottom: 11px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}
/* "Off your globe · still counting" — green, because it's reassurance, not a
   warning. The whole point of the copy is that nothing was lost. */
.gs-card-sub.is-note { color: var(--accent-green, #27ae60); }

.gs-rw {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}
.gs-rw:last-of-type { border-bottom: 0; }
.gs-rw.is-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gs-rw.is-tap:active { opacity: 0.6; }
.gs-rw-pin {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    color: #fff;
    font-weight: 700;
}
.gs-rw-pin.plain { background: rgba(26, 26, 26, 0.12); color: rgba(26, 26, 26, 0.42); }
.gs-rw-l {
    flex: 1;
    min-width: 0;
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink, #1a1a1a);
}
.gs-rw-n {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(26, 26, 26, 0.5);
    margin-top: 2px;
}
.gs-rw.done .gs-rw-l { color: rgba(26, 26, 26, 0.38); text-decoration: line-through; }
.gs-rw.done .gs-rw-n { text-decoration: none; }
.gs-rw-d {
    flex: none;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.42);
}
.gs-rw-d.hot { color: var(--gold-deep, #b38728); font-weight: 700; }

.gs-card-foot {
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(26, 26, 26, 0.1);
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(26, 26, 26, 0.58);
}
.gs-card-foot:empty { display: none; }
.gs-foot-t { display: block; }
.gs-cta {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--ink, #1a1a1a);
    color: #fff;
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.gs-cta.is-off {
    background: rgba(26, 26, 26, 0.08);
    color: rgba(26, 26, 26, 0.38);
    cursor: default;
}

/* Appended to the foot by logic_map's POI card. Underlined and quiet — it's a
   safety valve, not an action, and it must never compete with Check in here. */
.gs-report {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: rgba(26, 26, 26, 0.45);
    font-family: var(--font-ui, 'Figtree', sans-serif);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    #gs-card { transition: none; }
}

/* Belt and braces for the card-over-detail bug (2026-08-07). Tapping a reason
   on the POI card opens the full stamp detail, and the card was painting over
   it — the JS now closes the card first, and this makes it impossible for the
   two to coexist even if some other path forgets. #ticket-overlay is a body
   child declared before the card, so the sibling combinator reaches it. */
.ticket-overlay.active ~ #gs-card { display: none; }
