/* ===========================================
   Responsive DataTable Styles for Boxscore
   =========================================== */

/* Base boxscore table styles */
.boxscore-table .dash-table-container {
    border-radius: 8px;
    overflow: hidden;
}

/* Default: 11px font - compact by default */
.boxscore-table .dash-cell {
    font-size: 11px !important;
    padding: 4px 3px !important;
}

.boxscore-table .dash-header {
    font-size: 10px !important;
    padding: 4px 3px !important;
}

/* Extra large screens: 1600px+ - slightly larger */
@media (min-width: 1600px) {
    .boxscore-table .dash-cell {
        font-size: 12px !important;
        padding: 5px 4px !important;
    }

    .boxscore-table .dash-header {
        font-size: 11px !important;
        padding: 5px 4px !important;
    }
}

/* Laptop screens: 1366px and below - smaller */
@media (max-width: 1366px) {
    .boxscore-table .dash-cell {
        font-size: 10px !important;
        padding: 3px 2px !important;
    }

    .boxscore-table .dash-header {
        font-size: 9px !important;
        padding: 3px 2px !important;
    }
}

/* Small laptop: 1200px and below */
@media (max-width: 1200px) {
    .boxscore-table .dash-cell {
        font-size: 9px !important;
        padding: 3px 2px !important;
    }

    .boxscore-table .dash-header {
        font-size: 8px !important;
        padding: 3px 2px !important;
    }
}

/* Tablets: 992px and below */
@media (max-width: 992px) {
    .boxscore-table .dash-cell {
        font-size: 9px !important;
        padding: 2px 1px !important;
    }

    .boxscore-table .dash-header {
        font-size: 8px !important;
        padding: 2px 1px !important;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
    .boxscore-table .dash-cell {
        font-size: 8px !important;
        padding: 2px 1px !important;
    }

    .boxscore-table .dash-header {
        font-size: 7px !important;
        padding: 2px 1px !important;
    }
}

/* ===========================================
   Boxscore Section Styles (unified layout)
   =========================================== */

/* Section container with subtle animation */
.boxscore-section {
    background: transparent;
    border-radius: 12px;
    padding: 20px;
}

/* Responsive: stack tables on small screens */
@media (max-width: 992px) {
    .boxscore-section > div:last-child {
        flex-direction: column !important;
    }

    .boxscore-section > div:last-child > div:first-child,
    .boxscore-section > div:last-child > div:last-child {
        padding: 0 !important;
        margin-bottom: 15px;
    }

    /* Hide vertical separator on mobile */
    .boxscore-section > div:last-child > div:nth-child(2) {
        display: none !important;
    }
}

/* ===========================================
   Games Banner — scoreboard strip
   Style "carousel produit" (Netflix / Apple TV) :
   - cards avec pattern Dark Elevation (BG_ELEVATED + ombre + highlight haut)
   - flèches flottantes rondes sur les 2 cotes
   - fade aux bords pour suggerer du contenu sans barre
   - winner = blanc / loser = gris (plus de bleu PRIMARY accentue)
   =========================================== */

/* Main banner container : transparent, juste un layout horizontal.
   Pas de margin-bottom : l'espacement est gere par le parent flex
   (cf boxscore/callbacks/core.py : gap 16px sur le wrapper content). */
.games-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: visible;
    position: relative;
}

/* Date section on the left (fond Dark Elevation pour pop subtilement) */
.games-banner-date {
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}
/* Date picker du carousel : meme fond/border/highlight que les cards */
#games-banner-date-picker {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--color-border-light) !important;
    border-radius: 10px !important;
    color: var(--color-text-primary) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        var(--shadow-sm) !important;
    padding: 6px 12px !important;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
#games-banner-date-picker:hover,
#games-banner-date-picker:focus {
    border-color: var(--color-border-strong) !important;
}

/* Wrapper carousel : strip + 2 fleches absolues + fade gauche/droit */
.games-banner-carousel {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* Cas peu de matchs : tout tient sans scroll → on cache fleches + fade.
   Class injectee par le clientside callback (cf boxscore/callbacks/core.py). */
.games-banner-carousel.no-overflow .games-banner-arrow,
.games-banner-carousel.no-overflow::before,
.games-banner-carousel.no-overflow::after {
    display: none;
}

/* Fade gauche / droit (overlay degradant) — masque les bords du scroll */
.games-banner-carousel::before,
.games-banner-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    pointer-events: none;
    z-index: 5;
}
.games-banner-carousel::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-bg-page) 0%, transparent 100%);
}
.games-banner-carousel::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-bg-page) 0%, transparent 100%);
}

/* Fleches rondes flottantes (au-dessus du fade) */
.games-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), var(--shadow-md);
    padding: 0;
}
.games-banner-arrow:hover {
    background: var(--color-bg-surface-hover);
    color: var(--color-text-primary);
    transform: translateY(-50%) scale(1.05);
}
.games-banner-arrow-left  { left: -10px; }
.games-banner-arrow-right { right: -10px; }

/* Games strip - horizontal scrollable (sans scrollbar visible) */
.games-banner-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 8px;
    scroll-behavior: smooth;
    scrollbar-width: none;            /* Firefox */
    -ms-overflow-style: none;          /* IE/Edge */
}
.games-banner-strip::-webkit-scrollbar {
    display: none;                     /* Chrome/Safari */
}

/* Mini game card — pattern Dark Elevation (cf. .depth-chart-player-card) :
   fond plus clair que la page + ombre portee + highlight 1px en haut. */
.mini-game-card {
    display: flex;
    flex-direction: column;
    min-width: 96px;
    padding: 8px 14px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        var(--shadow-sm);
    flex-shrink: 0;
}

.mini-game-card:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        var(--shadow-md);
    border-color: var(--color-border-strong);
    text-decoration: none;
    color: inherit;
}

/* Current game highlight — bordure primary subtile (pas de gradient agressif) */
.mini-game-card.current {
    border-color: var(--color-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px var(--color-primary),
        var(--shadow-md);
}

/* Status label (FINAL / A VENIR) */
.mini-card-status {
    font-size: 9px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-align: center;
}

/* Teams container */
.mini-card-teams {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Team row */
.mini-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Team code & score — perdant en gris, gagnant en blanc (cf. mockup).
   Plus de couleur PRIMARY sur le winner (reservee a l'interaction). */
.mini-card-team {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-light);
}
.mini-card-score {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-light);
    font-variant-numeric: tabular-nums;
}
.mini-card-team.winner,
.mini-card-score.winner {
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Responsive: games banner on small screens */
@media (max-width: 768px) {
    .mini-game-card {
        min-width: 80px;
        padding: 6px 10px;
    }
    .mini-card-team,
    .mini-card-score {
        font-size: 11px;
    }
    .games-banner-arrow {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

/* ===========================================
   Game header — Team name link en blanc
   ===========================================
   .team-name-link est un <a> qui pointe vers /team/<id> dans le header
   de la page game-details. Bootstrap pose color: --bs-link-color (bleu)
   par defaut, et notre reset 01-reset.css fait color: inherit sans
   !important. Ici on force TEXT_PRIMARY (#F8FAFC blanc) avec spec
   suffisante pour gagner. */
.team-name-link,
.team-name-link:link,
.team-name-link:visited,
.team-name-link:hover,
.team-name-link:focus,
.team-name-link:active {
    color: var(--color-text-primary) !important;
}
