/**
 * NHL Scoreboard Widget Styles
 * Responsive, accessible, theme-integrated scoreboard for daily games
 */

/* Sticky Toggle Button */
.scoreboard-sticky-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 999;
    background: rgba(55, 63, 81, 0.95);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.scoreboard-sticky-toggle:hover {
    background: rgba(55, 63, 81, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.scoreboard-sticky-toggle svg {
    width: 28px;
    height: 28px;
}

.scoreboard-sticky-toggle.active {
    background: var(--secondary-color, #6292BE);
    border-color: var(--secondary-color, #6292BE);
}

/* Hide sticky toggle when scoreboard is visible */
.nhl-scoreboard-widget:not([hidden])~.scoreboard-sticky-toggle {
    display: none;
}

.nhl-scoreboard-widget {
    background: rgba(55, 63, 81, 0.95);
    border-radius: 12px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Compact horizontal layout */
.scoreboard-compact {
    display: flex;
    align-items: center;
    /* vertically center children including left block */
    padding: 12px 20px 12px 30px;
    /* Left padding for close button */
    gap: 10px;
    position: relative;
}

.nhl-scoreboard-widget.expanded .scoreboard-compact {
    display: none;
}

/* Unused classes removed */

/* Legacy hide button removed */

/* Unused date class removed */

.scoreboard-games-horizontal {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex: 1;
    overflow-x: auto;
    padding: 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Compact Nav Arrows */
/* Legacy nav arrows removed */

.scoreboard-nav-arrow-mobile,
.scoreboard-mobile-date {
    /* display: none; */
    /* Show globally now that we use them for desktop too */
}

/* Show arrows on hover of the container */


/* Mobile: always show them, but opacity might be handled differently or just rely on tap */


.scoreboard-games-horizontal::-webkit-scrollbar {
    height: 6px;
}

.scoreboard-games-horizontal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.game-card-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 180px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-main-content-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.game-card-compact:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.game-card-compact:focus {
    outline: 2px solid var(--secondary-color, #6292BE);
    outline-offset: 2px;
}

.game-card-compact.favorite {
    border-color: var(--secondary-color, #6292BE);
    background: rgba(98, 146, 190, 0.2);
}

.game-teams-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.game-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: white;
}

.team-info-compact {
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-logo-small {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.team-abbrev {
    font-weight: 500;
    min-width: 35px;
}

.team-score {
    font-weight: 700;
    font-size: 14px;
    color: white;
    text-align: right;
    min-width: 20px;
}

.game-status-compact {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
    min-width: 45px;
    flex-shrink: 0;
    color: white;
    font-weight: 600;
}

.game-status-compact.live {
    background: #ff4444;
    animation: pulse 2s infinite;
}

.game-status-compact.final {
    background: rgba(100, 100, 100, 0.7);
}

.game-status-compact.pre {
    background: rgba(98, 146, 190, 0.5);
}

/* Toggle button */
/* Legacy toggle button removed */

/* When expanded, hide the compact toggle and show it in the expanded header */
.nhl-scoreboard-widget.expanded .scoreboard-compact .scoreboard-toggle {
    display: none;
}

/* Expanded view */
.scoreboard-expanded {
    padding: 20px;
}

.nhl-scoreboard-widget.expanded .scoreboard-expanded {
    display: block;
}

.scoreboard-expanded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.scoreboard-expanded-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

/* Collapse button in sticky header */
.scoreboard-collapse-btn {
    background: var(--secondary-color, #6292BE) !important;
    border-color: var(--secondary-color, #6292BE) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.scoreboard-collapse-btn:hover {
    background: var(--primary-color, #004080) !important;
    border-color: var(--primary-color, #004080) !important;
    transform: scale(1.1) !important;
}

.scoreboard-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.scoreboard-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Navigation */
.scoreboard-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.scoreboard-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.scoreboard-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.scoreboard-nav-btn:focus {
    outline: 2px solid var(--secondary-color, #6292BE);
    outline-offset: 2px;
}

.scoreboard-nav-btn#scoreboardToday {
    background: var(--secondary-color, #6292BE);
}

.scoreboard-date-picker {
    flex: 1;
    max-width: 200px;
}

.scoreboard-date-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.scoreboard-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Expanded games grid */
.scoreboard-games-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.game-card-expanded {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.game-card-expanded:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.nhl-scoreboard-widget {
    background: #373f51;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: visible;
    margin-bottom: 20px;
    margin-top: 30px;
    /* Space for top buttons */
    margin-bottom: 40px;
    /* Space for bottom buttons */
    position: relative;
    z-index: 90;
    transition: all 0.3s ease;
}

/* Close Button (Top Left Outside) */
.scoreboard-hide-btn {
    position: absolute;
    top: -28px;
    left: 10px;
    width: 28px;
    height: 28px;
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px 4px 0 0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.scoreboard-hide-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(3px);
    /* Downward nudge */
}

/* Expand Button (Bottom Center Outside) */
.scoreboard-toggle {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 28px;
    border-radius: 0 0 12px 12px;
    background: rgba(55, 63, 81, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    color: white;
    font-size: 10px;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.scoreboard-toggle:hover,
.scoreboard-toggle:active {
    transform: translateX(-50%) translateY(3px);
    background: rgba(55, 63, 81, 1);
}

/* Collapse button override */
.scoreboard-collapse-btn:hover,
.scoreboard-collapse-btn:active {
    transform: translateX(-50%) translateY(3px) !important;
}

/* Top Nav Container (Top Center Outside) */
.scoreboard-top-nav {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    /* Align bottom to touch the widget */
    gap: 6px;
    /* Separation between tabs */
    z-index: 95;
}

/* Date Button (Inside Top Nav) */
.scoreboard-mobile-date {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    height: 28px;
    padding: 0 16px;
    background: rgba(55, 63, 81, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.scoreboard-mobile-date:hover,
.scoreboard-mobile-date:active {
    transform: translateY(3px);
    background: rgba(55, 63, 81, 1);
}

/* Nav Arrows (Inside Top Nav) */
.scoreboard-nav-arrow-mobile {
    display: flex;
    position: relative;
    bottom: auto;
    width: 40px;
    height: 28px;
    background: rgba(55, 63, 81, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.scoreboard-nav-arrow-mobile:hover,
.scoreboard-nav-arrow-mobile:active {
    transform: translateY(3px);
    background: rgba(55, 63, 81, 1);
}

/* Remove old positioning for separate arrows */
.scoreboard-nav-arrow-mobile.prev {
    left: auto;
}

.scoreboard-nav-arrow-mobile.next {
    right: auto;
}

/* Hide inline arrows universally */


/* Hide internal date badge (we have top button now) */


.game-card-expanded.favorite {
    border-color: var(--secondary-color, #6292BE);
    background: rgba(98, 146, 190, 0.15);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.game-status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.game-status-badge.live {
    background: #ff4444;
    color: white;
    animation: glow 2s infinite;
}

.game-status-badge.final {
    background: rgba(100, 100, 100, 0.7);
    color: white;
}

.game-status-badge.pre {
    background: rgba(98, 146, 190, 0.5);
    color: white;
}

.game-status-badge.info {
    background: #4A90E2;
    color: white;
}

.game-time {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.game-teams-container {
    margin-bottom: 16px;
}

.game-team-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-team-full:last-child {
    border-bottom: none;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.team-logo-large {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.team-name-full {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.team-record {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    margin-left: 6px;
    font-weight: 400;
}

.team-score-large {
    font-size: 24px;
    font-weight: 700;
    color: white;
    min-width: 40px;
    text-align: right;
}

.game-series-summary {
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary-color, #6292BE);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(98, 146, 190, 0.3);
}

.game-series-summary-compact {
    font-size: 8px;
    font-weight: 800;
    color: var(--secondary-color, #6292BE);
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

/* No games message */
.scoreboard-no-games {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Loading state */
.scoreboard-loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.8);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .nhl-scoreboard-widget {
        width: 100vw;
        position: relative;
        left: 50%;
        margin-left: -50vw;
        margin-top: 30px;
        /* Space for close button */
        margin-bottom: 30px;
        /* Space for expand button */
        border-radius: 0;
        background: rgba(55, 63, 81, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .scoreboard-compact {
        padding: 10px 0;
        /* Full width, no padding */
    }

    /* Collapse button specific override for mobile to prevent scale(1.1) from desktop styles */
    .scoreboard-collapse-btn:hover,
    .scoreboard-collapse-btn:active {
        transform: translateX(-50%) translateY(3px) !important;
    }



    .scoreboard-date {
        font-size: 12px;
        min-width: 50px;
    }

    /* Mobile: show short date vertically, hide desktop format */
    /* Unused date formats removed */

    .game-card-compact {
        min-width: 160px;
        padding: 6px 10px;
    }

    .scoreboard-nav {
        flex-wrap: wrap;
    }

    .scoreboard-nav-btn {
        padding: 10px;
        justify-content: center;
        flex-grow: 1;
    }

    .scoreboard-nav-btn .nav-text {
        display: none !important;
    }

    .scoreboard-nav-btn .nav-icon {
        display: inline-block !important;
        font-size: 20px;
        line-height: 1;
    }

    .scoreboard-nav-btn#scoreboardToday {
        flex-grow: 2;
    }

    .scoreboard-nav-btn#scoreboardToday .nav-text {
        display: inline !important;
        font-size: 13px;
        font-weight: 600;
    }

    .scoreboard-games-grid {
        grid-template-columns: 1fr;
    }

    .scoreboard-expanded {
        padding: 12px;
    }

    #scoreboardStatsModal .team-name-full {
        display: none;
    }

    #scoreboardStatsModal .game-team-full {
        flex-direction: row;
    }

    #scoreboardStatsModal .scoreboard-modal-header h3 {
        flex-direction: row;
        align-items: center;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
.scoreboard-toggle:focus-visible,
.scoreboard-close:focus-visible,
.scoreboard-nav-btn:focus-visible,
.game-card-compact:focus-visible {
    outline: 2px solid var(--secondary-color, #6292BE);
    outline-offset: 2px;
}

/* Game Actions */
.scoreboard-game-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.scoreboard-action-btn {
    padding: 6px 12px;
    background: var(--primary-color, #004080);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.scoreboard-action-btn:hover {
    background: var(--secondary-color, #003060);
}

.scoreboard-action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Modals */
.scoreboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video modal should be above other modals */
#scoreboardVideoModal {
    z-index: 999;
}

#scoreboardVideoModal .scoreboard-modal-content {
    z-index: 2;
    /* above other modal contents */
    width: 75vw;
    max-width: 75vw;
    min-width: 320px;
    margin-top: 80px;
}

/* Video loading button/spinner */
.scoreboard-video-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e88e5;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    animation: scoreboard-pulse 1.2s infinite ease-in-out;
}

.scoreboard-video-loading .scoreboard-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: scoreboard-spin .8s linear infinite;
}

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

@keyframes scoreboard-pulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.04);
        filter: brightness(1.15);
    }
}

.scoreboard-modal[hidden] {
    display: none;
}

.scoreboard-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.scoreboard-modal-content {
    position: relative;
    background: #373f51;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    z-index: 1;
}

.scoreboard-modal-content iframe {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    border: none;
}

.scoreboard-modal-boxscore {
    width: 800px;
    max-width: 90%;
    margin-top: 80px;
}

#scoreboardStatsModal {
    align-items: flex-start;
    padding-top: 0;
}

.scoreboard-modal-stats {
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    margin-top: 60px;
}

.scoreboard-modal-stats .scoreboard-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.scoreboard-modal-stats iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.scoreboard-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: #373f51;
    position: sticky;
    top: 0;
    z-index: 10;
}

.scoreboard-modal-header h3 .team-name-full {
    display: none;
}

.scoreboard-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scoreboard-modal-header h3 .game-team-full {
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
}

.scoreboard-modal-header h3 .team-info {
    gap: 5px;
}

.scoreboard-modal-header h3 .team-score-large {
    font-size: 20px;
}

.scoreboard-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    position: absolute;
    z-index: 1000;
    flex-shrink: 0;
    top: 20px;
    right: 20px;
}

.scoreboard-modal-close:active {
    transform: scale(0.95);
}

.scoreboard-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.scoreboard-modal-body {
    padding: 20px;
}

/* Boxscore Styles */
.boxscore-period {
    margin-bottom: 24px;
}

.boxscore-period-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color, #004080);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.boxscore-no-goals {
    color: #999;
    font-style: italic;
    padding: 8px 0;
}

.goal-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(249, 249, 249, 0.5);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color, #004080);
    border: 1px solid #e0e0e0;
}

.goal-team-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.goal-details {
    flex: 1;
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.goal-time {
    font-weight: 600;
    color: #333;
}

.goal-strength {
    display: inline-block;
    padding: 2px 6px;
    background: var(--primary-color, #004080);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.goal-strength.ppg {
    background: #ff9800;
}

.goal-strength.shg {
    background: #4caf50;
}

.goal-scorer {
    font-weight: 600;
    color: #000;
}

.goal-assists {
    color: #666;
    font-size: 13px;
    margin-top: 2px;
}

.goal-video-link {
    color: var(--primary-color, #004080);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    transition: color 0.2s;
}

.goal-video-link:hover {
    color: var(--secondary-color, #003060);
    text-decoration: underline;
}

.goal-video-link i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .scoreboard-modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .scoreboard-modal-boxscore {
        width: 100%;
    }

    .scoreboard-modal-header {
        padding: 12px 16px;
    }

    .scoreboard-modal-body {
        padding: 16px;
    }

    .goal-entry {
        padding: 8px;
        gap: 8px;
    }

    .goal-team-logo {
        width: 24px;
        height: 24px;
    }

    .scoreboard-modal-stats {
        margin-top: 60px;
    }

    #scoreboardStatsModal .team-name-full {
        display: none;
    }

    #scoreboardStatsModal .game-team-full {
        flex-direction: row;
    }

    #scoreboardStatsModal .scoreboard-modal-header h3 {
        flex-direction: row;
        align-items: center;
    }
}

/* -------------------------------------------------------------------------- */
/* Week Navigation Strip                                                      */
/* -------------------------------------------------------------------------- */
.scoreboard-week-nav {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 20px 0;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.scoreboard-week-nav::-webkit-scrollbar {
    height: 6px;
}

.scoreboard-week-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.week-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 100px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    height: 80px;
}

.week-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.week-card:focus {
    outline: 2px solid var(--secondary-color, #6292BE);
    outline-offset: 2px;
}

.week-card.active {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    /* Dark text on white active card */
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.week-card-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.week-card.active .week-card-header {
    opacity: 1;
    color: #000;
}

.week-day {
    text-transform: uppercase;
}

.week-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.week-games-count {
    font-size: 14px;
    font-weight: 600;
}

.week-card.active .week-games-count {
    color: #000;
}

/* Calendar icon placeholder or indicator */
.week-indicator {
    width: 100%;
    height: 4px;
    background: transparent;
    margin-top: auto;
    border-radius: 2px;
}

.week-card.active .week-indicator {
    background: var(--secondary-color, #6292BE);
    margin-top: 5px;
}

/* Hide toggle button in Widget Mode since we now redirect on click */
.nhl-scoreboard-widget:not(.scoreboard-page-mode) .scoreboard-toggle {
    display: none !important;
}

/* Calendar Button */
.scoreboard-calendar-btn {
    display: flex;
    position: relative;
    width: auto;
    /* Allow growth for text */
    min-width: 40px;
    height: 28px;
    padding: 0 10px;
    /* Add padding for text */
    background: rgba(55, 63, 81, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: transform 0.2s ease, background 0.2s ease;
    margin-left: 2px;
    /* Small gap from Today button */
    gap: 6px;
    /* Space between text and icon */
}

.scoreboard-calendar-btn:hover {
    transform: translateY(3px);
    background: rgba(55, 63, 81, 1);
}

.scoreboard-current-date-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* Dedicated Scoreboard Page Mode                                             */
/* -------------------------------------------------------------------------- */
.scoreboard-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.scoreboard-page-mode.nhl-scoreboard-widget {
    position: static;
    /* Not fixed/sticky */
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-shadow: none;
    border: none;
    background: transparent !important;
    /* Transparent to blend with dark body */
    padding: 0;
}

.scoreboard-page-mode .scoreboard-expanded {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    max-height: none;
    padding: 0;
    display: block !important;
    /* Force visible */
}

/* Custom Controls for Page Mode */
.scoreboard-page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scoreboard-page-mode .scoreboard-nav-arrow-mobile {
    position: static;
    /* Reset absolute positioning from widget */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--light-color);
    transition: all 0.2s;
}

.scoreboard-page-mode .scoreboard-nav-arrow-mobile:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.scoreboard-page-mode .btn-today {
    background: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
}

.scoreboard-page-mode .btn-today:hover {
    filter: brightness(1.1);
}

.scoreboard-page-mode .scoreboard-date-input {
    background: #222;
    color: white;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
}

/* Grid Layout for Expanded Cards in Page Mode */
.scoreboard-page-mode .scoreboard-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

/* Re-style the expanded card for static display */
.scoreboard-page-mode .game-card-expanded {
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.scoreboard-page-mode .game-card-expanded:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Ensure header badges flow nicely */
.scoreboard-page-mode .scoreboard-games-header {
    grid-column: 1 / -1;
    margin-top: 20px;
}