/* ─────────────────────────────────────────────────────────────
   nfl-modern.css  –  shared styles for NFL app pages
───────────────────────────────────────────────────────────── */

/* ── Controls / page header ────────────────────────────────── */
.sp-control-card {
    border: 1px solid #d6e3f0;
    background: linear-gradient(180deg, #f9fcff 0%, #f2f8ff 100%);
    border-radius: 12px;
}
.sp-page-title { margin: 0; font-weight: 700; color: #163a5c; }

/* ── Rules pages ────────────────────────────────────────────── */
.sp-rules-page { max-width: 1080px; margin: 0 auto; }
.sp-rules-hero { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding: 1.35rem 1.5rem; margin-bottom: 1rem; border-radius: 14px; color: #fff; background: linear-gradient(120deg, #123d63 0%, #1c6fae 68%, #2588c6 100%); box-shadow: 0 8px 22px rgba(19, 66, 103, .18); }
.sp-rules-kicker { margin: 0 0 .25rem; color: #bfe4ff; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sp-rules-hero .sp-page-title { color: #fff; }
.sp-rules-entry { flex: 0 0 auto; padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; background: rgba(255,255,255,.12); font-size: .85rem; }
.sp-rules-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.sp-rules-section { grid-column: span 6; padding: 1.25rem 1.35rem; border: 1px solid #d6e3f0; border-radius: 12px; background: linear-gradient(180deg, #f1f6fa 0%, #e7f0f7 100%); box-shadow: 0 3px 12px rgba(10,40,70,.05); }
.sp-rules-section-wide { grid-column: 1 / -1; }
.sp-rules-section h5 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .9rem; color: #163a5c; font-weight: 700; }
.sp-rules-section h5::before { content: ''; width: .28rem; height: 1.35rem; border-radius: 2px; background: #2b8ac6; }
.sp-rules-list { margin: 0; padding-left: 1.2rem; color: #29445d; }
.sp-rules-list > li { margin-bottom: .7rem; }
.sp-rules-list > li:last-child { margin-bottom: 0; }
.sp-rules-list ul { margin-top: .45rem; padding-left: 1.15rem; }
.sp-rules-list li::marker { color: #2b8ac6; font-weight: 700; }
.sp-rules-callout { margin: .9rem 0 0; padding: .75rem .9rem; border-left: 3px solid #e2a12b; background: #fff8e8; color: #624b20; font-size: .92rem; }
.sp-payout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .65rem; }
.sp-payout-card { padding: .75rem .85rem; border: 1px solid #dbe7f2; border-radius: 9px; background: #f8fbfd; }
.sp-payout-year { margin-bottom: .3rem; color: #1c6fae; font-weight: 700; }
.sp-payout-card ul { margin: 0; padding: 0; list-style: none; color: #405b72; font-size: .9rem; }
.sp-payout-card li { display: flex; justify-content: space-between; gap: .7rem; }
.sp-payout-card li + li { margin-top: .15rem; }
[data-theme="dark"] .sp-rules-section { border-color: #304b63; background: linear-gradient(180deg, #182d41 0%, #122538 100%); box-shadow: 0 5px 16px rgba(0,0,0,.2); }
[data-theme="dark"] .sp-rules-section h5,
[data-theme="dark"] .sp-rules-section h6 { color: #edf6ff; }
[data-theme="dark"] .sp-rules-list,
[data-theme="dark"] .sp-rules-section > p:not(.sp-rules-callout) { color: #c5d8e8; }
[data-theme="dark"] .sp-rules-callout { border-left-color: #e3ad42; background: #3a3020; color: #f4d99a; }
[data-theme="dark"] .sp-payout-card { border-color: #35546e; background: #1d3448; }
[data-theme="dark"] .sp-payout-year { color: #8ed0ff; }
[data-theme="dark"] .sp-payout-card ul { color: #c5d8e8; }
[data-theme="dark"] .sp-rules-section .text-muted { color: #9fb8cc !important; }
@media (max-width: 700px) {
    .sp-rules-hero { display: block; padding: 1.1rem; }
    .sp-rules-entry { display: inline-block; margin-top: .85rem; }
    .sp-rules-section { grid-column: 1 / -1; padding: 1.05rem; }
    .sp-payout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Standings table wrapper (viewStandings) ────────────────── */
.sp-table-wrap { border: 1px solid #d6e3f0; border-radius: 12px; overflow: hidden; background: #fff; }
.sp-cell-tight { padding: 0.45rem 0.55rem; white-space: nowrap; }

/* ── Scoreboard strip (viewPicks) ───────────────────────────── */
.sp-scoreboard-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}
.sp-game-card {
    width: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid #d6e3f0;
    border-radius: 12px;
    padding: .6rem .8rem;
    box-shadow: 0 2px 8px rgba(10,40,70,.06);
    font-size: .82rem;
    transition: box-shadow .15s;
}
.sp-game-card:hover { box-shadow: 0 4px 16px rgba(10,40,70,.12); }

@media (max-width: 1200px) {
    .sp-scoreboard-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .sp-scoreboard-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
    .sp-scoreboard-strip { grid-template-columns: 1fr; }
}

.sp-game-pending { border-color: #d6e3f0; background: #ffffff; }
.sp-game-win { border-color: #9bc89b; background: #eef9ee; }
.sp-game-loss { border-color: #ddb1b1; background: #fff1f1; }
.sp-game-picked { border-color: #93bbdb; background: #eef5fc; }
.sp-game-card-time {
    font-size: .7rem; font-weight: 600; color: #4f6780;
    text-align: center; margin-bottom: .45rem; white-space: nowrap;
}
.sp-game-card-matchup { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .45rem; }
.sp-game-card-team {
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    align-items: center;
    gap: .3rem;
}
.sp-team-logo    { width: 22px; height: 22px; object-fit: contain; }
.sp-team-logo-sm { width: 18px; height: 18px; object-fit: contain; vertical-align: middle; }
.sp-team-logo-xs { width: 13px; height: 13px; object-fit: contain; vertical-align: middle; }
.sp-team-name { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-team-line { font-size: .7rem; }
.sp-team-score { font-size: .88rem; font-weight: 700; min-width: 1.2rem; text-align: right; }
.sp-game-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #e8f0f8; padding-top: .35rem; gap: .3rem;
}
.sp-game-status { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-pick-dist   { font-size: .68rem; white-space: nowrap; flex-shrink: 0; }
.sp-game-card .winner  { color: #1a7a1a; font-weight: 700; }
.sp-game-card .loser   { text-decoration: line-through; opacity: .55; }
.sp-game-card .my_pick { text-decoration: underline; text-underline-offset: 2px; }

/* ── Picks grid (viewPicks) ─────────────────────────────────── */
.sp-picks-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d6e3f0;
    border-radius: 12px;
    background: #fff;
}
.sp-picks-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: .85rem;
}
.sp-picks-table thead th {
    background: #eef4fb;
    font-weight: 600;
    color: #2d4a66;
    padding: .5rem .55rem;
    border-bottom: 2px solid #c9ddf0;
    white-space: nowrap;
    text-align: center;
}
.sp-picks-table tbody td {
    padding: .38rem .55rem;
    border-bottom: 1px solid #eef3f9;
    vertical-align: middle;
    white-space: nowrap;
}
.sp-picks-table tbody tr:nth-child(even) td { background: #f8fbff; }
.sp-picks-table tbody tr:hover td           { background: #edf4fd; }
.sp-row-me td            { background: #fffbe6 !important; }
.sp-row-me:hover td      { background: #fff5cc !important; }
.sp-row-scarlet td       { background: #f6d5d2 !important; color: #6a2d2a !important; }
.sp-row-scarlet:hover td { background: #f1c8c4 !important; }

/* Sticky left columns */
.sp-col-sticky {
    position: sticky;
    z-index: 8;
    background: #ffffff;
}
.sp-picks-table thead .sp-col-sticky {
    z-index: 12;
    background: #eef4fb;
}
.sp-picks-table tbody tr:nth-child(even) .sp-col-sticky { background: #f8fbff; }
.sp-picks-table tbody tr:hover .sp-col-sticky { background: #edf4fd; }
.sp-row-me .sp-col-sticky       { background: #fffbe6 !important; }
.sp-row-me:hover .sp-col-sticky { background: #fff5cc !important; }
.sp-row-scarlet .sp-col-sticky  { background: #f6d5d2 !important; color: #6a2d2a !important; }
.sp-col-rank  { left: 0;                               width: 2.5rem; min-width: 2rem;  max-width: 2.5rem; }
.sp-col-name  { left: 2.5rem;                          width: 130px; min-width: 110px; max-width: 150px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sp-col-pts   { left: calc(2.5rem + 130px);            min-width: 2.8rem; }
.sp-col-pts + .sp-col-pts { left: calc(2.5rem + 130px + 2.8rem); }
.sp-col-lock  { left: calc(2.5rem + 130px + 5.6rem);  min-width: 58px; max-width: 74px; border-right: 2px solid #c9ddf0; box-shadow: 8px 0 10px -8px rgba(20, 60, 100, 0.45); }
.sp-col-game  { min-width: 44px; max-width: 54px; text-align: center; border-left: 2px solid #c2d7ec; padding: .28rem .3rem !important; }
.sp-col-total { min-width: 2.8rem; font-size: .78rem; }

.sp-picks-table thead .sp-col-game {
    background: #e8f1fb;
    border-bottom: 2px solid #9dbedf;
}
.sp-picks-table tbody .sp-col-game {
    border-left: 2px solid #d5e4f3;
    background: #fbfdff;
}
.sp-picks-table thead .sp-col-game:nth-child(even) { background: #dceafa; }
.sp-picks-table tbody .sp-col-game:nth-child(even) { background: #f2f7fd; }

/* Picks header row game cells (away @ home) */
.sp-col-game-head {
    min-width: 50px !important;
    max-width: 60px !important;
    padding: .22rem .12rem !important;
    border-left: 2px solid #9dbedf !important;
    border-right: 2px solid #9dbedf !important;
    background: #d9e9fa !important;
}
.sp-game-head-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .14rem;
    background: #ffffff;
    border: 1px solid #88add0;
    border-radius: 8px;
    padding: .18rem .2rem;
}
.sp-game-head-team {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.sp-col-game-head .sp-team-logo-sm {
    width: 16px;
    height: 16px;
}
.sp-game-head-sep {
    width: 100%;
    font-size: .56rem;
    font-weight: 800;
    color: #224c74;
    line-height: 1;
    padding: .08rem 0;
    border-top: 1px solid #d7e5f3;
    border-bottom: 1px solid #d7e5f3;
}

/* Wider columns for long prop questions/answers */
.sp-col-prop-head {
    min-width: 170px !important;
    max-width: 260px !important;
    white-space: normal !important;
    line-height: 1.2;
    vertical-align: top;
}

.sp-col-prop-cell {
    min-width: 170px !important;
    max-width: 260px !important;
    white-space: normal !important;
    line-height: 1.2;
    padding: .34rem .42rem !important;
}

.sp-lock-badge { display: inline-block; margin-left: .25rem; vertical-align: middle; font-size: .72rem; }
.sp-pick-pill  { display: inline-flex; align-items: center; gap: .2rem; font-size: .76rem; font-weight: 600; white-space: nowrap; }

/* Pick cell outcome outlines */
.sp-pick-cell-winner img                { outline: 2px solid #2a9d2a; border-radius: 50%; }
.sp-pick-cell-loser img                 { opacity: .38; filter: grayscale(1); }
.sp-pick-cell-my_pick img              { outline: 2px solid #1a6fbc; border-radius: 50%; }

/* Shared win/loss text fallback */
.winner  { color: #1a7a1a; font-weight: 700; }
.loser   { text-decoration: line-through; opacity: .55; }
.my_pick { font-weight: 700; }

/* Scarlet compat */
.scarlet, .sp-scarlet { background-color: #f6d5d2 !important; color: #6a2d2a !important; }

/* Shared horizontal scroll wrapper */
.tableDiv { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Mobile picks table tweaks (≤575px) ─────────────────────── */
@media (max-width: 575px) {
    /* Hide rank column — position in list makes it redundant */
    .sp-picks-table .sp-col-rank { display: none; }

    /* Recalculate sticky left offsets without rank col */
    /* name: starts at 0 */
    .sp-picks-table .sp-col-name {
        left: 0;
        width: 88px;
        min-width: 72px;
        max-width: 88px;
        font-size: .75rem;
    }
    /* YTD (first .sp-col-pts) */
    .sp-picks-table .sp-col-pts {
        left: 88px;
        min-width: 2.2rem;
        font-size: .75rem;
    }
    /* Wk (second .sp-col-pts) */
    .sp-picks-table .sp-col-pts + .sp-col-pts {
        left: calc(88px + 2.2rem);
    }
    /* Lock */
    .sp-picks-table .sp-col-lock {
        left: calc(88px + 4.4rem);
        min-width: 38px;
        max-width: 46px;
    }

    /* Smaller game cells */
    .sp-picks-table .sp-col-game {
        min-width: 36px;
        max-width: 44px;
        padding: .22rem .18rem !important;
    }
    .sp-col-game-head {
        min-width: 40px !important;
        max-width: 48px !important;
    }
    .sp-col-game-head .sp-team-logo-sm,
    .sp-picks-table tbody .sp-col-game .sp-team-logo-sm {
        width: 20px;
        height: 20px;
    }

    /* Tighter row padding */
    .sp-picks-table thead th,
    .sp-picks-table tbody td {
        padding: .28rem .3rem;
        font-size: .75rem;
    }
}

/* Legend swatch */
.sp-legend-swatch { display: inline-block; width: 1rem; height: .75rem; border-radius: 3px; border: 1px solid #bbb; vertical-align: middle; }

