/* VERSION: v0.4.4 */
/* sport-switcher.css — shared sport-switcher styling
 *
 * Loaded by:
 *   - NFL pages at /staging/html/nfl/*.html (added by patch_nfl_pages_v0.2.9.py)
 *
 * NBA/WNBA pages at /staging/html/*.html currently serve these same rules
 * inline from NBA's styles.css. When NBA's styles.css is next refactored
 * (Mo's call on timing), the .sport-pill / .sport-modal-* blocks should
 * be pulled out of styles.css and styles.css should @import this file
 * (or NBA HTML pages should add a <link> to this file). Until then,
 * there's intentional duplication — rules are stable and unlikely to
 * change often.
 *
 * Tokens referenced (--bg-elev-*, --text-*, --accent-pos*, --border*,
 * --divider, --font-display, --font-mono) must be defined upstream by
 * the page's primary stylesheet. NFL's nfl.css defines all of these;
 * NBA's styles.css defines all of these. No standalone token defaults
 * — this file assumes a host stylesheet's :root.
 *
 * Design provenance: lifted from NBA/staging/styles.css v0.4.5 work
 * (CHANGELOG_NBA §10.x — "~270-line CSS append covering 11 selectors").
 * Overlay = fixed inset 0 z-index 1000 flex center with rgba(0,0,0,0.65)
 * backdrop + 4px blur. Card = min(420px, 100%) wide, 80vh tall capped,
 * 12px radius, slide-in animation. Rows = bg-elev-2 buttons with
 * bg-elev-3 hover; selected = accent-pos with dim fill; disabled =
 * 0.55 opacity + text-muted color + cursor not-allowed.
 */

/* ─── Sport pill (the trigger button in the top bar) ────── */

.sport-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-family: var(--font-display);
    font-size: 11.5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.sport-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--bg-elev-3);
}
.sport-pill-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.sport-pill-divider {
    color: var(--text-muted);
    font-size: 10px;
}
.sport-pill-value {
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.sport-pill-caret {
    color: var(--text-muted);
    font-size: 9px;
    margin-left: 1px;
}

/* ─── Sport modal (overlay + card + list rows) ──────────── */

@keyframes sportModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes sportModalCardIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sport-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 24px;
    animation: sportModalFadeIn 0.18s ease-out;
}
.sport-modal-card {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: min(420px, 100%);
    max-height: min(80vh, 640px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: sportModalCardIn 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sport-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--divider);
}
.sport-modal-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.1px;
    color: var(--text-primary);
    margin: 0;
}
.sport-modal-close {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.sport-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-elev-2);
    border-color: var(--border);
}
.sport-modal-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    overflow-y: auto;
}
.sport-modal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.sport-modal-row:hover:not(.sport-modal-row-disabled) {
    color: var(--text-primary);
    background: var(--bg-elev-3);
    border-color: var(--border-strong);
}
.sport-modal-row-selected {
    color: var(--accent-pos);
    background: var(--accent-pos-dim);
    border-color: var(--accent-pos-border);
}
.sport-modal-row-selected:hover:not(.sport-modal-row-disabled) {
    color: var(--accent-pos);
    background: var(--accent-pos-dim);
    border-color: var(--accent-pos-border);
}
.sport-modal-row-disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.55;
}
.sport-modal-row-label {
    flex: 1 1 auto;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}
.sport-modal-row-sub {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-elev-3);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 2px 6px;
}
.sport-modal-row-check {
    font-size: 13px;
    color: var(--accent-pos);
    margin-left: 4px;
}

/* ─── Mobile breakpoint ──────────────────────────────────── */

@media (max-width: 768px) {
    .sport-pill {
        padding: 6px 10px;
        font-size: 11px;
    }
    .sport-modal-card {
        width: 100%;
        max-height: 90vh;
    }
    .sport-modal-header { padding: 14px 16px; }
    .sport-modal-body   { padding: 10px; }
    .sport-modal-row    { padding: 11px 12px; }
}
