/* Discover (KRI-113) — the deck on the map's stage.
   Full-bleed map; filter bar + focus card float over it. Rides fuel.css tokens. */

body.dv-page { overflow: hidden; }
.dv-stage { position: fixed; inset: 0; top: var(--topbar-h, 64px); }
#discover-map { position: absolute; inset: 0; background: #0c1f1d; }

/* ---- Filter bar ---- */
.dv-filters { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 500;
    display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.dv-chiprow { display: flex; gap: 6px; align-items: center; pointer-events: auto;
    background: rgba(10, 26, 28, .78); backdrop-filter: blur(10px);
    border: 1px solid var(--line); border-radius: 999px; padding: 6px;
    max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dv-chiprow::-webkit-scrollbar { display: none; }
.dv-chiprow button { flex: 0 0 auto; background: transparent; border: none; color: var(--muted);
    font: 600 .8rem/1 'Inter', sans-serif; padding: 8px 12px; border-radius: 999px;
    cursor: pointer; transition: color .15s, background .15s; white-space: nowrap; }
.dv-chiprow button:hover { color: var(--ink); }
.dv-chiprow button.on { background: var(--gold); color: #0b1a15; }
.dv-chiprow button#dv-upcoming.on { background: var(--teal); }
.dv-selects { padding: 6px 8px; }
.dv-selects select, .dv-selects input {
    background: transparent; border: 1px solid var(--line); border-radius: 999px;
    color: var(--ink); font: 500 .8rem/1 'Inter', sans-serif; padding: 7px 10px;
    -webkit-appearance: none; appearance: none; outline: none; max-width: 150px; }
.dv-selects select option { background: #0c1f1d; }
.dv-selects input::placeholder { color: var(--muted); }
.dv-selects select:focus, .dv-selects input:focus { border-color: var(--teal); }

/* ---- The focus deck ---- */
.dv-deck { position: absolute; z-index: 500; left: 16px; bottom: 18px; width: 372px;
    max-width: calc(100vw - 32px);
    background: rgba(10, 26, 28, .84); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 122, 26, .5); border-radius: 18px; padding: 16px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
    max-height: calc(100% - 24px); overflow-y: auto; }
.dv-deck-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dv-count { font: 600 .7rem/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; color: var(--muted); }
.dv-deck-nav { display: flex; gap: 6px; }
.dv-deck-nav button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink); cursor: pointer;
    transition: border-color .15s, color .15s; }
.dv-deck-nav button:hover { border-color: var(--orange); color: var(--orange); }
.dv-deck-nav .ico { width: 16px; height: 16px; }
.dv-name { font: 800 1.3rem/1.2 'Sora', sans-serif; margin: 2px 0 2px; color: var(--ink);
    transition: opacity .25s; min-height: 1.55em; }
.dv-loc { color: var(--muted); font-size: .84rem; margin: 0 0 8px; transition: opacity .25s; min-height: 1.2em; }
.dv-spark { width: 100%; height: 58px; display: block; margin-bottom: 10px; }
.dv-spark polyline { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; }
.dv-spark path { fill: rgba(255, 122, 26, .16); }
.dv-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.dv-stat { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.dv-stat span { display: block; font: 600 .6rem/1.5 ui-monospace, Menlo, monospace;
    letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dv-stat b { font: 700 .98rem/1.3 'Sora', sans-serif; font-variant-numeric: tabular-nums;
    transition: opacity .25s; }
.dv-ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.dv-ctas .export-btn { flex: 1 1 auto; justify-content: center; text-align: center; }
.dv-empty { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }
.dv-deck.fading .dv-name, .dv-deck.fading .dv-loc, .dv-deck.fading .dv-stat b { opacity: 0; }
.dv-deck.dv-none .dv-spark, .dv-deck.dv-none .dv-stats, .dv-deck.dv-none .dv-ctas { display: none; }

/* Leaflet's corner controls duck below the floating filter bar. */
.dv-page .leaflet-top.leaflet-left { top: 58px; }
@media (max-width: 900px) {
    .dv-page .leaflet-top.leaflet-left, .dv-page .leaflet-top.leaflet-right { top: 106px; }
}

/* Course dots on the map */
.dv-dot { background: var(--gold); border: 1.5px solid rgba(10, 26, 28, .9); border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 210, 63, .4); cursor: pointer; }
.dv-dot.dim { background: rgba(142, 167, 160, .5); box-shadow: none; }

/* ---- Phone: deck becomes the bottom sheet ---- */
@media (max-width: 640px) {
    .dv-deck { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 12px 14px; }
    .dv-name { font-size: 1.1rem; }
    .dv-spark { height: 44px; margin-bottom: 8px; }
    .dv-stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .dv-stat { padding: 5px 7px; }
    .dv-stat b { font-size: .82rem; }
    .dv-stat span { font-size: .52rem; }
    .dv-filters { top: 8px; left: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .dv-name, .dv-loc, .dv-stat b { transition: none; }
}
