/* ─────────────────────────────────────
   Chiefs Schedule & Scores — CSS
   Colors: #E31837 (red), #FFB81C (gold),
           #000 (black), #fff (white)
   ───────────────────────────────────── */

.cs-wrap,
.cs-wrap * {
    box-sizing: border-box;
}

.cs-wrap {
    max-width: 960px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a2e;
    line-height: 1.5;
}

/* ── Banner ── */
.cs-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #E31837 0%, #b5102b 100%);
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
    color: #fff;
}

.cs-team-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.cs-banner-text {
    flex: 1;
    min-width: 0;
}

.cs-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
    line-height: 1.2;
}

.cs-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.cs-record-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.cs-record-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFB81C;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.cs-record-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* ── Table Wrapper ── */
.cs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e6ec;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: #fff;
}

/* ── Table ── */
.cs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.cs-table thead {
    background: #1a1a2e;
}

.cs-table thead th {
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #FFB81C;
    border-bottom: 3px solid #E31837;
    white-space: nowrap;
}

.cs-th-week {
    width: 50px;
    text-align: center !important;
}

.cs-th-result {
    width: 60px;
    text-align: center !important;
}

.cs-th-score {
    width: 100px;
    text-align: center !important;
}

.cs-th-record {
    width: 70px;
    text-align: center !important;
}

.cs-th-tv {
    width: 70px;
    text-align: center !important;
}

/* ── Rows ── */
.cs-game-row td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f0f1f4;
    vertical-align: middle;
}

.cs-row-alt td {
    background: #fafbfd;
}

.cs-game-row:hover td {
    background: #fff8e6;
}

/* ── Week cell ── */
.cs-cell-week {
    text-align: center;
    font-weight: 700;
    color: #555;
    font-size: 0.85rem;
}

/* ── Date cell ── */
.cs-cell-date {
    white-space: nowrap;
}

.cs-day {
    font-weight: 700;
    color: #1a1a2e;
    margin-right: 0.3rem;
}

.cs-date-num {
    color: #6b7280;
    font-size: 0.82rem;
}

/* ── Opponent cell ── */
.cs-cell-opponent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
}

.cs-location {
    font-weight: 700;
    color: #9ca3af;
    font-size: 0.78rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.cs-opp-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.cs-opp-name {
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

.cs-opp-abbr {
    display: none; /* shown on mobile only */
    font-weight: 700;
    color: #1a1a2e;
}

/* ── Result badge ── */
.cs-cell-result {
    text-align: center;
}

.cs-result-badge {
    display: inline-block;
    width: 32px;
    padding: 0.15rem 0;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cs-result-badge.cs-win {
    background: #dcfce7;
    color: #15803d;
}

.cs-result-badge.cs-loss {
    background: #fef2f2;
    color: #dc2626;
}

.cs-result-badge.cs-tie {
    background: #fefce8;
    color: #a16207;
}

.cs-result-badge.cs-live {
    background: #16a34a;
    color: #fff;
    width: auto;
    padding: 0.15rem 0.5rem;
    animation: cs-pulse 2s ease-in-out infinite;
}

@keyframes cs-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.cs-result-badge.cs-upcoming {
    background: transparent;
    color: #9ca3af;
}

/* ── Score cell ── */
.cs-cell-score {
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1a1a2e;
    font-size: 0.88rem;
}

/* Style upcoming time differently */
.cs-upcoming .cs-cell-score {
    color: #6b7280;
    font-weight: 500;
}

/* ── Record cell ── */
.cs-cell-record {
    text-align: center;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── TV cell ── */
.cs-cell-tv {
    text-align: center;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Live row highlight ── */
.cs-live td {
    background: #f0fdf4 !important;
    border-left: 3px solid #16a34a;
}

/* ── Win row subtle highlight ── */
.cs-win td {
    /* subtle */
}

/* ── Loss row subtle dim ── */
.cs-loss .cs-cell-score {
    color: #9ca3af;
}

/* ── Bye Week Row ── */
.cs-bye-row td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f0f1f4;
}

.cs-bye-cell {
    text-align: center;
}

.cs-bye-text {
    display: inline-block;
    padding: 0.2rem 1.2rem;
    background: linear-gradient(135deg, #FFB81C 0%, #e6a50f 100%);
    color: #1a1a2e;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
}

/* ── Playoff badge ── */
.cs-playoff-badge {
    display: block;
    font-size: 0.58rem;
    color: #E31837;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-top: 0.15rem;
}

/* ── Footer ── */
.cs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* ── Error / Empty ── */
.cs-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    color: #991b1b;
    font-weight: 500;
    max-width: 960px;
    margin: 2rem auto;
}

.cs-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    background: #fff;
    border: 1px solid #e2e6ec;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

/* ─────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────── */
@media (max-width: 768px) {
    .cs-banner {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.75rem;
    }

    .cs-team-logo {
        width: 48px;
        height: 48px;
    }

    .cs-title {
        font-size: 1.2rem;
    }

    .cs-record-box {
        padding: 0.4rem 0.8rem;
    }

    .cs-record-num {
        font-size: 1.2rem;
    }

    /* Hide full name, show abbreviation */
    .cs-opp-name {
        display: none;
    }
    .cs-opp-abbr {
        display: inline;
    }

    .cs-cell-opponent {
        min-width: unset;
    }

    /* Hide record column on mobile */
    .cs-th-record,
    .cs-cell-record {
        display: none;
    }

    /* Smaller table text */
    .cs-table {
        font-size: 0.82rem;
    }

    .cs-table thead th {
        padding: 0.5rem 0.4rem;
        font-size: 0.62rem;
    }

    .cs-game-row td {
        padding: 0.5rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .cs-wrap {
        margin: 1rem 0;
    }

    .cs-banner {
        border-radius: 8px 8px 0 0;
    }

    .cs-table-wrap {
        border-radius: 0 0 8px 8px;
    }

    /* Hide TV column on very small screens */
    .cs-th-tv,
    .cs-cell-tv {
        display: none;
    }

    .cs-opp-logo {
        width: 22px;
        height: 22px;
    }

    .cs-cell-date {
        font-size: 0.78rem;
    }
}

/* ═══════════════════════════════════════
   CLICKABLE ROWS & DETAIL PANEL
   ═══════════════════════════════════════ */

/* ── Clickable row cursor ── */
.cs-clickable {
    cursor: pointer;
}

.cs-clickable:hover .cs-score-link {
    color: #E31837;
}

.cs-clickable.cs-expanded td {
    background: #fff8e6 !important;
    border-bottom-color: transparent;
}

.cs-score-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s;
}

.cs-expand-icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    transition: transform 0.25s ease, color 0.15s;
    flex-shrink: 0;
}

.cs-expanded .cs-expand-icon {
    transform: rotate(180deg);
    color: #E31837;
}

/* ── Detail row ── */
.cs-detail-row {
    background: #fafbfd;
}

.cs-detail-cell {
    padding: 0 !important;
    border-bottom: 2px solid #E31837 !important;
}

.cs-detail-panel {
    padding: 1rem 1.25rem 1.25rem;
    animation: cs-slideDown 0.3s ease;
}

@keyframes cs-slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading & Error ── */
.cs-detail-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.cs-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e6ec;
    border-top-color: #E31837;
    border-radius: 50%;
    animation: cs-spin 0.7s linear infinite;
}

@keyframes cs-spin {
    to { transform: rotate(360deg); }
}

.cs-detail-error {
    text-align: center;
    padding: 1.5rem;
    color: #991b1b;
    font-size: 0.85rem;
}

.cs-no-data {
    text-align: center;
    padding: 1.5rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ── Game info bar ── */
.cs-game-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #eef0f4;
    font-size: 0.75rem;
    color: #6b7280;
}

.cs-gi-item {
    display: inline-flex;
    align-items: center;
}

/* ── Tabs ── */
.cs-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e6ec;
}

.cs-tab {
    background: none;
    border: none;
    padding: 0.5rem 1.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.cs-tab:hover {
    color: #E31837;
}

.cs-tab.cs-tab-active {
    color: #E31837;
    border-bottom-color: #E31837;
}

/* ═══════════════════════════════════════
   BOX SCORE TAB
   ═══════════════════════════════════════ */
.cs-boxscore-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cs-boxscore-table thead {
    background: #1a1a2e;
}

.cs-boxscore-table thead th {
    padding: 0.5rem 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #FFB81C;
    text-align: center;
    border-bottom: none;
}

.cs-boxscore-table thead .cs-bs-stat {
    text-align: left;
    color: #aaa;
    width: 40%;
}

.cs-boxscore-table thead .cs-bs-team {
    width: 30%;
}

.cs-boxscore-table thead .cs-bs-team span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cs-bs-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.cs-boxscore-table tbody tr {
    border-bottom: 1px solid #eef0f4;
}

.cs-boxscore-table tbody tr:last-child {
    border-bottom: none;
}

.cs-boxscore-table tbody tr:hover {
    background: #fff8e6;
}

.cs-bs-label {
    padding: 0.4rem 0.7rem;
    color: #555;
    font-weight: 600;
}

.cs-bs-val {
    padding: 0.4rem 0.7rem;
    text-align: center;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.cs-bs-val.cs-bs-better {
    color: #1a1a2e;
    font-weight: 700;
}

/* ═══════════════════════════════════════
   SCORING PLAYS TAB
   ═══════════════════════════════════════ */
.cs-scoring-qtr {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #E31837;
    padding: 0.6rem 0 0.3rem;
    border-bottom: 1px solid #eef0f4;
    margin-bottom: 0.5rem;
}

.cs-scoring-qtr:first-child {
    padding-top: 0;
}

.cs-scoring-play {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f6f8;
}

.cs-scoring-play:last-child {
    border-bottom: none;
}

.cs-sp-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.2rem;
}

.cs-sp-team {
    font-weight: 800;
    font-size: 0.78rem;
    color: #1a1a2e;
    min-width: 32px;
}

.cs-sp-clock {
    font-size: 0.72rem;
    color: #9ca3af;
    font-weight: 500;
}

.cs-sp-score {
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    background: #f0f1f4;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
}

.cs-sp-text {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.4;
    padding-left: 0.15rem;
}

/* ═══════════════════════════════════════
   LEADERS TAB
   ═══════════════════════════════════════ */
.cs-leaders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.cs-leaders-team-name {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a1a2e;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #E31837;
    margin-bottom: 0.5rem;
}

.cs-leader-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f5f6f8;
}

.cs-leader-card:last-child {
    border-bottom: none;
}

.cs-leader-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef0f4;
    flex-shrink: 0;
}

.cs-leader-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cs-leader-cat {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}

.cs-leader-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

/* Player name links */
a.cs-player-link {
    color: #E31837;
    text-decoration: none;
    transition: color 0.15s;
}

a.cs-player-link:hover {
    color: #b5102b;
    text-decoration: underline;
}

/* Photo link wrapper */
a.cs-leader-photo-link {
    flex-shrink: 0;
    display: inline-flex;
    transition: transform 0.15s;
}

a.cs-leader-photo-link:hover {
    transform: scale(1.1);
}

a.cs-leader-photo-link:hover .cs-leader-photo {
    box-shadow: 0 0 0 2px #E31837;
}

.cs-leader-stat {
    font-size: 0.72rem;
    color: #6b7280;
}

/* ═══════════════════════════════════════
   DETAIL PANEL RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .cs-detail-panel {
        padding: 0.75rem;
    }

    .cs-leaders-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cs-tabs {
        gap: 0;
    }

    .cs-tab {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
    }

    .cs-boxscore-table {
        font-size: 0.76rem;
    }

    .cs-game-info {
        font-size: 0.68rem;
    }

    .cs-expand-icon {
        display: none;
    }
}

@media (max-width: 480px) {
    .cs-tab {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
    }

    .cs-leader-photo {
        width: 28px;
        height: 28px;
    }
}
