/* NHL Teams / Team page — dark navy theme */

.nhl-page h4 {
    color: #93c5fd;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── Team table ─────────────────────────────────────────── */
.nhl-table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.95rem;
    vertical-align: middle;
}

/* ── Schedule banner (desktop horizontal strip) ──────────── */
.schedule-banner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(147, 197, 253, 0.2) transparent;
    margin-bottom: 2rem;
    padding-bottom: 0.35rem;
}

.schedule-strip {
    display: flex;
    gap: 0.6rem;
    width: max-content;
    padding: 0.1rem;
}

.schedule-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(147, 197, 253, 0.12);
    border-radius: 8px;
    text-decoration: none;
    color: #e2e8f0;
    flex: 1;
    transition: background 0.15s, border-color 0.15s;
}

.schedule-card-wrapper {
    position: relative;
}

.schedule-card-wrapper:has(.schedule-card-bet) .schedule-card {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.schedule-card:hover {
    background: rgba(147, 197, 253, 0.08);
    border-color: rgba(147, 197, 253, 0.3);
    color: #fff;
    text-decoration: none;
}

.schedule-card-teams {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-card-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.schedule-card-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.schedule-card-abbr {
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.04em;
}

.schedule-card-at {
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}

.schedule-card-time {
    font-size: 0.66rem;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

/* ── Post-game scores ────────────────────────────────────── */
.schedule-card-score {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.schedule-card-score--winner {
    color: #e2e8f0;
}

.schedule-card-abbr--winner {
    color: #fff;
}

.schedule-card-final-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.schedule-card-linescore {
    font-size: 0.58rem;
    color: #475569;
    letter-spacing: 0.01em;
}

.schedule-card-series {
    font-size: 0.58rem;
    color: #64748b;
    text-align: center;
}

/* ── Standings table ─────────────────────────────────────── */
.standings-rank {
    color: #64748b;
    font-size: 0.8rem;
    width: 2rem;
    text-align: center;
}

.standings-team-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.standings-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.standings-pts {
    font-weight: 600;
    color: #93c5fd;
}

.clinch-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    height: 14px;
    padding: 0 4px;
    border-radius: 3px;
    cursor: default;
    border: 1px solid;
    margin-left: auto;
    flex-shrink: 0;
}

.clinch-badge[data-clinch="*"] { color: #fbbf24; border-color: rgba(251, 191, 36,  0.4); } /* Presidents' Trophy — gold   */
.clinch-badge[data-clinch="z"] { color: #93c5fd; border-color: rgba(147, 197, 253, 0.4); } /* Conference          — blue   */
.clinch-badge[data-clinch="y"] { color: #86efac; border-color: rgba(134, 239, 172, 0.4); } /* Division            — green  */
.clinch-badge[data-clinch="x"] { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.4); } /* Playoff berth       — teal   */
.clinch-badge[data-clinch="e"] { color: #fca5a5; border-color: rgba(252, 165, 165, 0.4); } /* Eliminated          — red    */

.sort-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 2px;
    vertical-align: middle;
}

/* ── Back link + card links (NHLTeamPage) ────────────────── */
.nhl-back-link {
    display: inline-block;
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.nhl-back-link:hover {
    opacity: 1;
    text-decoration: underline;
    color: #93c5fd;
}

.nhl-page-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.nhl-page-link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s, border-color 0.15s;
}

.nhl-page-link-card:hover {
    background: rgba(147, 197, 253, 0.08);
    border-color: rgba(147, 197, 253, 0.35);
    color: #fff;
    text-decoration: none;
}

.nhl-page-link-arrow {
    color: #93c5fd;
    font-size: 1rem;
}

/* ── Nationality chart ────────────────────────────────────── */
.nationality-chart {
    margin-bottom: 2rem;
}

.nat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.nat-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 4.5rem;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.nat-bar-wrap {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.nat-bar {
    height: 8px;
    background: linear-gradient(to right, #93c5fd, #60a5fa);
    border-radius: 4px;
}

.nat-count {
    font-size: 0.75rem;
    color: #94a3b8;
    min-width: 3.5rem;
    text-align: right;
}

.nat-count small {
    color: #64748b;
}

/* ── Horizontal scroll wrapper (standings on mobile) ─────── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
}

.table-scroll .nhl-table {
    margin-bottom: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .nhl-page h4 {
        margin-left: 0.35rem;
    }

    .nhl-table thead th,
    .nhl-table tbody td {
        padding: 9px 10px;
        font-size: 0.82rem;
    }

    /* Standings: show #, Team, GP, W, L, OTL, PTS — hide OTW(6), PP%(9), PK%(10), REC(11) */
    .standings-table th:nth-child(6),
    .standings-table th:nth-child(9),
    .standings-table th:nth-child(10),
    .standings-table th:nth-child(11),
    .standings-table td:nth-child(6),
    .standings-table td:nth-child(9),
    .standings-table td:nth-child(10),
    .standings-table td:nth-child(11) {
        display: none;
    }

    .schedule-card {
        padding: 0.4rem 0.6rem;
        min-width: 88px;
    }

    .schedule-card-logo {
        width: 22px;
        height: 22px;
    }

    .schedule-card-abbr {
        font-size: 0.6rem;
    }

    .schedule-card-time {
        font-size: 0.6rem;
    }

    .schedule-strip {
        gap: 0.4rem;
    }

    .nhl-page-link-card {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nhl-page {
        padding-top: 75px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .nhl-page h4 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .nhl-table thead th,
    .nhl-table tbody td {
        padding: 7px 8px;
        font-size: 0.75rem;
    }

    .standings-rank {
        width: 1.5rem;
        font-size: 0.72rem;
    }

    .standings-logo {
        width: 16px;
        height: 16px;
    }

    .schedule-card {
        padding: 0.35rem 0.5rem;
        min-width: 80px;
    }

    .schedule-card-logo {
        width: 18px;
        height: 18px;
    }

    .schedule-card-abbr {
        font-size: 0.58rem;
    }

    .schedule-card-time {
        font-size: 0.58rem;
    }

    .nhl-page-link-card {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Standings tabs: compact enough to fit all four on one row */
    .standings-tabs {
        gap: 0.25rem;
    }

    .standings-tab {
        padding: 4px 6px;
        font-size: 0.7rem;
    }

    /* Standings: also hide GP at 480px — leaves #, Team, W, L, OTL, PTS */
    .standings-table th:nth-child(3),
    .standings-table td:nth-child(3) {
        display: none;
    }

    /* News: restore description as a single truncated line */
    .news-card-desc {
        display: -webkit-box;
        -webkit-line-clamp: 1;
    }

    /* Collapsible headers: allow wrapping so buttons don't overflow */
    .collapsible-header {
        flex-wrap: wrap;
        gap: 0.4rem 0.6rem;
    }

    .btn-toggle-rest {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .btn-section-toggle {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ── Standings tabs ─────────────────────────────────────── */
.standings-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.standings-tab {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.standings-tab:hover {
    background: rgba(147, 197, 253, 0.1);
    color: #e2e8f0;
}

.standings-tab.active {
    background: rgba(147, 197, 253, 0.15);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.35);
}

/* ── Standings group headers ─────────────────────────────── */
.standings-group-header td {
    background: rgba(147, 197, 253, 0.07);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-bottom: 1px solid rgba(147, 197, 253, 0.15);
}

/* ── Wild card playoff cutoff line ───────────────────────── */
.standings-playoff-cutoff td {
    padding: 0;
    border-bottom: 2px dashed rgba(251, 191, 36, 0.5);
}

/* ── Injury leaderboard ──────────────────────────────────── */
.injury-count {
    font-weight: 700;
    color: #fca5a5;
    text-align: center;
}

.injury-count-header {
    text-align: center;
}

.injury-players {
    font-size: 0.85rem;
    color: #94a3b8;
}

.injury-more {
    margin-left: 0.35rem;
    color: #64748b;
    font-size: 0.8rem;
}

.injury-healthy {
    color: #86efac;
    font-style: italic;
}

/* ── Flags ───────────────────────────────────────────────── */
.nat-flag {
    width: 18px;
}

.flag-icon {
    width: 18px;
    vertical-align: middle;
    margin-right: 0.35rem;
}

/* ── Injury table ────────────────────────────────────────── */
.injury-status {
    color: #f87171;
}

/* ── Collapsible sections ────────────────────────────────── */
.collapsible-section {
    margin-bottom: 0.25rem;
}

.collapsible-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.collapsible-header h4 {
    margin: 0 0 0 0.25rem;
    padding: 0;
    border: none; /* override .nhl-page h4 */
}

.btn-section-toggle {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
    margin-left: auto;
    margin-right: 0.1rem;
    white-space: nowrap;
}

.btn-section-toggle:hover {
    background: rgba(147, 197, 253, 0.1);
    color: #e2e8f0;
}

/* ── News cards ──────────────────────────────────────────── */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.news-card {
    display: flex;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(147, 197, 253, 0.12);
    border-radius: 8px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.news-card:hover {
    background: rgba(147, 197, 253, 0.07);
    border-color: rgba(147, 197, 253, 0.28);
    color: inherit;
    text-decoration: none;
}

.news-thumbnail {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.news-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.news-card-headline {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-headline {
    color: #93c5fd;
}

.news-card-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-date {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: auto;
}

@media (max-width: 480px) {
    .news-thumbnail {
        width: 68px;
        height: 46px;
    }

    .news-card-headline {
        font-size: 0.83rem;
    }
}

@media (max-width: 399px) {
    /* Standings tabs: force equal-width so all four labels fit on one row */
    .standings-tabs {
        gap: 0.15rem;
    }

    .standings-tab {
        flex: 1;
        text-align: center;
        padding: 3px 4px;
        font-size: 0.63rem;
    }
}
