/* site-header.css — styles for the shared top of every page (site-header.js, 2026-10-17):
   ① scoreboard strip · ③ money + status bar (+ 📅 TODAY tiles). Moved here from home.css so every page
   looks the same. ② the 👑 menu is styled by nav.js. */

/* ESPN Horizontal Scrolling Ticker Bar */
.espn-ticker-bar {
    background: #0f131a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    height: 80px;
    overflow: visible;
    position: relative;
    user-select: none;
    z-index: 1000;
}

.espn-top-events-btn {
    background: #161b24;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    color: #ffffff;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 12px;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.espn-top-events-btn:hover {
    background: #202634;
    border-color: rgba(245, 158, 11, 0.5);
}

.espn-icon-btn {
    background: #1a1e27;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
    flex-shrink: 0;
}
.espn-icon-btn:hover {
    background: #252a36;
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.espn-live-counter {
    background: #10b981;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 2px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.espn-events-dropdown {
    position: absolute;
    top: 56px;
    left: 12px;
    background: #11151c;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.95);
    padding: 8px 0;
    min-width: 220px;
    display: none;
    z-index: 99999;
}
.espn-events-dropdown.open {
    display: block !important;
}
.espn-dropdown-item {
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #d1d5db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s, color 0.15s;
}
.espn-dropdown-item:hover, .espn-dropdown-item.active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}
.espn-events-dropdown { min-width: 280px; }
.espn-dropdown-item .ed-badges { display: flex; gap: 4px; margin-left: 14px; }
.ed-badge { min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 800; }
.ed-live { background: rgba(239, 68, 68, 0.18); color: #ff6b6b; }
.ed-sched { background: rgba(245, 158, 11, 0.18); color: #f5b942; }
.ed-final { background: rgba(148, 163, 184, 0.18); color: #9aa4b2; }
.ed-badge.zero { opacity: 0.35; }
.ed-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 6px 10px; }
.ed-league { cursor: grab; }
.ed-handle { color: #64748b; margin-right: 6px; }
.ed-league.dragging { opacity: 0.4; }
.ed-league.drag-over { box-shadow: inset 0 2px 0 var(--accent); }

.espn-ticker-scroll {
    display: flex;
    align-items: center;
    overflow-x: auto;
    scroll-behavior: smooth;
    height: 100%;
    flex: 1 1 auto;
    min-width: 0; /* Critical for smooth flex item scrolling without stretching viewport */
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
}
.espn-ticker-scroll::-webkit-scrollbar {
    display: none; /* Chrome / Safari / Edge */
}

.espn-ticker-divider {
    height: 100%;
    width: 48px;
    background: #161b24;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* Section label tiles in the ticker: LIVE / PREGAME / FINAL */
.espn-ticker-divider.tk-phase {
    width: auto;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    white-space: nowrap;
}

/* Ticker item, laid out like ESPN's scoreboard strip (dark theme). */
.espn-ticker-item {
    height: 100%;
    padding: 8px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 168px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s;
}
.espn-ticker-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.espn-ticker-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}
.tk-status.live { color: #ef4444; }
.tk-status.ppd { color: #f59e0b; font-weight: 800; }
.tk-status.final { color: #e5e7eb; font-weight: 800; }
.tk-net { color: #64748b; font-size: 9px; letter-spacing: 0.5px; padding: 1px 5px; border: 1px solid rgba(100, 116, 139, 0.35); border-radius: 3px; line-height: 1.2; }
/* League icon before the clock (owner, 2026-11-02): same icons as the game cards. */
.tk-top-left { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tk-lg-logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.tk-lg-badge { flex-shrink: 0; font-size: 8px; font-weight: 800; line-height: 1; white-space: nowrap; color: #f59e0b; padding: 2px 4px; border-radius: 3px; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); }
.tk-lg-badge.womens { color: #f472b6; background: rgba(244, 114, 182, 0.1); border-color: rgba(244, 114, 182, 0.4); }
.tk-body { display: flex; align-items: center; gap: 12px; }
.tk-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tk-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1.2;
}
.tk-row.loser { color: #6b7280; }
.tk-logo { width: 16px; height: 16px; flex-shrink: 0; display: inline-flex; }
.tk-logo img { width: 16px; height: 16px; object-fit: contain; }
.tk-rank { font-size: 9px; color: #94a3b8; font-weight: 600; }
.tk-right { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding-left: 10px; }
.tk-score { font-weight: 900; font-size: 13px; }
.tk-record { font-size: 10px; color: #94a3b8; font-weight: 600; }
.tk-win-arrow { font-size: 9px; color: var(--accent); }
.tk-side {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.35;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.possession-icon {
    font-size: 10px;
    margin-left: 3px;
    filter: drop-shadow(0 0 4px #f59e0b);
    display: inline-block;
    animation: possPulse 1.8s infinite ease-in-out;
}

@keyframes possPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 6px #f59e0b); }
}

/* 💰 TODAY tiles on the TODAY bar (card-bets.js todayTilesHtml) */
.td-tiles { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.td-tile { background: #111820; border: 1px solid rgba(255,255,255,0.1); border-radius: 7px; padding: 4px 10px; min-width: 92px; }
.td-tile .k { font-size: 9px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.td-tile .v { font-size: 15px; font-weight: 900; color: #fff; white-space: nowrap; margin-top: 1px; }
.td-tile .sm { font-size: 10px; color: var(--muted); font-weight: 400; }
.td-tile .pos { color: #10b981; } .td-tile .neg { color: #f87171; } .td-tile .cy { color: #06b6d4; }
.td-tile.big .v { font-size: 19px; }
/* A page's own .big class (Bet Slip: big gold title text) must not restyle the tile. */
.command-bar .td-tile.big { font: inherit; color: inherit; }
.td-tile.big.up { border-color: rgba(16,185,129,0.55); background: linear-gradient(90deg, rgba(16,185,129,0.2), rgba(16,185,129,0.05)); }
.td-tile.big.down { border-color: rgba(239,68,68,0.55); background: linear-gradient(90deg, rgba(239,68,68,0.2), rgba(239,68,68,0.05)); }

/* ── COMMAND BAR under the scoreboard: 📅 TODAY + 💰 tiles (left) · nav tools (right). Wraps, never scrolls. */
.command-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
    background: rgba(6, 182, 212, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.08); border-left: 3px solid var(--accent);
    padding: 8px 16px; font-family: var(--font-mono); font-size: 11px; font-weight: 800; color: var(--accent); max-width: 100%; box-sizing: border-box; position: relative; z-index: 999; }
.command-bar-today { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.command-bar-today:empty { display: none; }
.command-bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; min-width: 0; margin-left: auto; }
.command-bar-tools { display: flex; align-items: center; min-width: 0; }
.command-bar-tools:empty { display: none; }
.command-bar-icons { display: flex; align-items: center; gap: 8px; position: relative; flex-shrink: 0; }
#ticker-search-box { right: 0; }
/* One row (owner, 2026-10-19): 💰 money + tiles, game tabs, ☰ / 🔍 / 👤. Status pills sit in the page-links menu. */
.command-bar { flex-direction: column; align-items: stretch; gap: 8px; }
.command-bar-money { display: flex; align-items: center; }
.command-bar-money:empty { display: none; }
.command-bar-money .nav-bankroll-pill { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 4px 12px; border-radius: 7px; }
.command-bar-money .nav-bankroll-pill > span:first-child { font-size: 9px; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.command-bar-money .nav-bankroll-val { font-size: 15px; font-weight: 900; white-space: nowrap; }
.command-bar-today { flex: 0 1 auto; }
.command-bar-today .td-tiles { margin-left: 0; }
.command-bar-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
/* status dots: same pills, smaller */
.command-bar-status .nav-telemetry-pill { padding: 3px 8px !important; font-size: 9.5px !important; min-height: 0 !important; height: auto !important; letter-spacing: 0.5px; flex: 0 0 auto !important; width: auto !important; }
.command-bar-status #destiny-sync-pill { min-width: 0 !important; }
.command-bar-status .speed-hud-slot { transform-origin: right center; }
/* In the page-links menu (nav.js moves it there): right end, one line on wide screens; wraps on phones. */
@media (min-width: 901px) { .global-nav > .command-bar-status { flex-wrap: nowrap; } }
.global-nav > .command-bar-status { max-width: 100%; }
.command-bar-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.command-bar-tabs:empty { display: none; }
.cb-row-nav .command-bar-right { flex: 1 1 auto; }
@media (max-width: 700px) {
    .command-bar-status { margin-left: 0; width: 100%; }
}
/* Phones: the search box opens full-width just under the command bar, so it never runs off either edge. */
@media (max-width: 900px) {
    .command-bar-icons { position: static; }
    #ticker-search-box { left: 16px; right: 16px; top: 100% !important; }
    #ticker-search-input { flex: 1; width: auto !important; }
}

/* ── Scoreboard filter TABLE (sports × 🔴 LIVE / ⏳ PREGAME / 🏁 FINAL), owner 2026-10-11.
   Same look as the rest of the dropdown / site: JetBrains Mono 11px bold, the .ed-badge count pills,
   amber = selected (like every other active item). */
.espn-events-dropdown { min-width: 0; width: 360px; max-width: calc(100vw - 24px); }
.ed-title { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--muted); padding: 2px 16px 6px; text-transform: uppercase; }
.ed-grid { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #d1d5db; }
.ed-grid th { padding: 4px 2px; text-align: center; font-weight: 700; }
.ed-grid th.ed-name { text-align: left; padding-left: 16px; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.ed-grid td { padding: 7px 2px; text-align: center; }
.ed-grid td.ed-name { text-align: left; padding-left: 16px; white-space: nowrap; cursor: pointer; transition: color 0.15s; }
.ed-grid tr:hover td { background: rgba(255, 255, 255, 0.03); }
.ed-grid td.ed-name:hover { color: var(--accent); }
.ed-h, .ed-n { font-family: var(--font-mono); font-weight: 800; cursor: pointer; border: 1px solid transparent; transition: background 0.15s, color 0.15s; }
.ed-h { background: none; font-size: 10px; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.ed-h.ed-live { color: #ff6b6b; } .ed-h.ed-sched { color: #f5b942; } .ed-h.ed-final { color: #9aa4b2; }
.ed-h:hover { background: rgba(255, 255, 255, 0.06); }
.ed-n { min-width: 28px; padding: 1px 7px; border-radius: 4px; font-size: 10px; }
.ed-n.ed-live { background: rgba(239, 68, 68, 0.18); color: #ff6b6b; }
.ed-n.ed-sched { background: rgba(245, 158, 11, 0.18); color: #f5b942; }
.ed-n.ed-final { background: rgba(148, 163, 184, 0.18); color: #9aa4b2; }
.ed-n.zero { opacity: 0.35; }
.ed-n:hover { filter: brightness(1.25); }
/* selected = amber, same as every other active item on the site */
.ed-n.sel, .ed-h.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); opacity: 1; }
.ed-grid tr.on td { background: rgba(245, 158, 11, 0.15); }
.ed-grid tr.on td.ed-name { color: var(--accent); }
.ed-grid tr.ed-all td { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.ed-grid tr.ed-league { cursor: grab; }
.ed-grid tr.ed-league.dragging { opacity: 0.4; }
.ed-grid tr.ed-league.drag-over td { box-shadow: inset 0 2px 0 var(--accent); }
.ed-foot { font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--muted); padding: 8px 16px 2px; line-height: 1.6; border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 4px; }
.ed-foot b { color: #d1d5db; font-weight: 700; }

/* ── 🎯 BETCAST / 📊 STATCAST on scoreboard ticker tiles (owner, 2026-10-11; mockup v2 approved: buttons on the RIGHT) ── */
.espn-ticker-item { flex-direction: row; align-items: stretch; padding: 0; gap: 0; }
.tk-main { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 14px; flex: 1; min-width: 0; }
.tk-casts { display: none; flex-direction: column; width: 100px; flex-shrink: 0; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.espn-ticker-item:hover .tk-casts, .espn-ticker-item.show-casts .tk-casts { display: flex; }
.espn-ticker-item:hover, .espn-ticker-item.show-casts { background: #161b24; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.5); }
.tk-cast { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.tk-cast + .tk-cast { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.tk-betcast { color: var(--accent); background: rgba(245, 158, 11, 0.12); }
.tk-statcast { color: #06b6d4; }
.tk-cast:hover { background: rgba(255, 255, 255, 0.08); }
/* Layer order (2026-10-17, shared header): scoreboard strip 1001 (top of the page; its filter table opens over the
   menu) > menu 1000 (sticky) > money + status bar 999 (☰ MENU / 🔍 open over the page). */
.espn-ticker-bar { position: relative; z-index: 1001; }

/* Command bar rows (same rule home.css also gives the card-bet rows) */
.command-bar .cb-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }

/* ── GAME TABS (owner, 2026-10-17): 🔴 LIVE / ⏳ TODAY / 📅 UPCOMING / ✅ FINAL, left side of row 2. Amber = open tab. */
.gt-tab { display: inline-flex; align-items: center; gap: 6px; background: #0c131a; border: 1px solid #1e293b; border-radius: 6px;
    color: #cbd5e1; font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.5px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.gt-tab:hover { background: #111a24; color: #fff; }
.gt-tab .gt-n { min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 9px; font-size: 10px; background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.gt-live .gt-n { background: #10b981; color: #ffffff; font-weight: 900; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.gt-today .gt-n { background: rgba(245, 158, 11, 0.2); color: #f5b942; }
.gt-upcoming .gt-n { background: rgba(6, 182, 212, 0.18); color: #22d3ee; }
.gt-tab.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: rgba(245, 158, 11, 0.12); color: var(--accent); }
/* LIVE tab = the strip's 🟢 LIVE button: green, white word (owner, 2026-10-18) */
.gt-live.active { border-color: #10b981; box-shadow: 0 0 0 1px #10b981; background: rgba(16, 185, 129, 0.12); color: #ffffff; }

/* ── Money row order (owner, 2026-10-19): ☰ MENU · LIVE / UPCOMING / TODAY / FINAL · Pending · Live on pace ·
   Made today · Record · Win rate · ROI · 💰 BANKROLL · 🔍 👤. Same markup, placed with flex order. */
.cb-row-nav .command-bar-right { display: contents; }
.cb-row-nav .command-bar-tools { order: 1; }
.cb-row-nav .command-bar-tabs { order: 2; }
.cb-row-nav .command-bar-today { order: 3; }
.cb-row-nav .command-bar-money { order: 4; }
.cb-row-nav .command-bar-icons { order: 6; margin-left: auto; }
/* ☰ MENU sits on the left (menu bar, after the logo): its drawer opens to the right so it stays on screen. */
.command-bar-tools .universal-menu-dropdown, #destiny-global-nav #destiny-nav-tools .universal-menu-dropdown { right: auto !important; left: 0; }
#destiny-global-nav #destiny-nav-tools { margin-right: 14px; flex: 0 0 auto; }
/* 💰 BANKROLL looks like the MADE TODAY tile (same box, label and number size). */
.command-bar-money .nav-bankroll-pill { background: #111820 !important; border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 7px !important;
    padding: 4px 10px !important; height: auto !important; min-width: 92px; color: #fff !important; }
.command-bar-money .nav-bankroll-pill > span:first-child { font-size: 9px !important; color: var(--muted) !important; letter-spacing: 1px; text-transform: uppercase; font-weight: 700 !important; }
.command-bar-money .nav-bankroll-val { font-size: 19px !important; font-weight: 900 !important; color: #fff; }
/* ENGINE · SYNC · ⚡ speed: ONE combined box at the end of the menu bar (owner, 2026-10-19). */
.global-nav > .command-bar-status { margin-left: auto; width: auto; gap: 0; align-items: center;
    background: #111820; border: 1px solid rgba(255,255,255,0.1); border-radius: 7px; padding: 2px 2px; }
.global-nav > .command-bar-status .nav-telemetry-pill { background: transparent !important; border: none !important; box-shadow: none !important; padding: 3px 8px !important; }
.global-nav > .command-bar-status .shud-pill { background: transparent; border: none; box-shadow: none; min-width: 0; height: 22px; padding: 0 8px; }
.global-nav #destiny-sync-pill, .global-nav > .command-bar-status .speed-hud-slot { border-left: 1px solid rgba(255,255,255,0.12) !important; border-radius: 0 !important; }
/* Tighter money row so it all fits on one line (owner, 2026-10-19): smaller gaps and tile padding. */
.command-bar .cb-row.cb-row-nav { column-gap: 8px; }
.cb-row-nav .td-tile { padding: 4px 8px; min-width: 0; }
/* 📤 SHARE: green ring for a moment after the text is copied. */
.espn-icon-btn.shared { border-color: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,0.4); }

/* ── Money + status bar STAYS PINNED under the menu bar when you scroll (owner, 2026-11-02): it used to slide
   UNDER the sticky menu and show only half its numbers. Solid background so the page doesn't show through.
   --gnav-h = the menu bar's real height, set by site-header.js. Wide screens only (phones keep the room). */
@media (min-width: 901px) {
    .command-bar { position: sticky; top: var(--gnav-h, 62px);
        background: linear-gradient(rgba(6, 182, 212, 0.06), rgba(6, 182, 212, 0.06)), #0a0c0f; }
}
