/* Live Score Scroller Styles */
/* Wrapper link styles */
#live-scores-scroller-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

#live-scores-scroller {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--neutral-light);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    overflow: hidden;
    height: 40px;
    cursor: pointer;
    --scroll-duration: 30s;  /* Base duration for all animations */
    /* Isolate scroller from global font-size changes in styles.css */
    font-size: 16px !important; /* Force base font-size to 16px regardless of global changes */
}

/* Ensure all scroller elements use consistent base font-size and prevent global spacing interference */
#live-scores-scroller * {
    font-size: inherit; /* Inherit from the isolated scroller container */
    box-sizing: border-box; /* Ensure consistent box model */
}

/* IMPROVED GAME SEPARATION - Each game gets clear visual boundaries */
#live-scores-scroller .live-score {
    padding: 0 8px !important; /* Increased from 5px to 8px for better breathing room */
    margin: 0 !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08); /* Subtle separator between games */
    position: relative;
}

/* Remove border from last game in sequence to avoid double borders with section separators */
#live-scores-scroller .live-score:last-child {
    border-right: none !important;
}

#live-scores-scroller .team-container {
    margin-right: 6px !important; /* Increased from 3px to 6px for better team grouping */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
}

#live-scores-scroller .team-abbr {
    margin-right: 3px !important; /* Increased from 2px to 3px for readability */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
}

#live-scores-scroller .team-score {
    margin-right: 4px !important; /* Increased from 2px to 4px for better separation */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
}

#live-scores-scroller .game-info {
    margin-right: 6px !important; /* Increased from 3px to 6px for better game info spacing */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    padding: 0 4px !important; /* Add padding to game info to make it a clearer divider */
}

#live-scores-scroller .game-status {
    margin-right: 3px !important; /* Increased from 2px to 3px */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
}

#live-scores-scroller .status-dot {
    margin-right: 3px !important; /* Increased from 2px to 3px */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
}

#live-scores-scroller .overtime-indicator {
    margin-left: 3px !important; /* Increased from 2px to 3px */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}

#live-scores-scroller .game-time {
    margin-right: 4px !important; /* Increased from 3px to 4px */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
}

#live-scores-scroller .section-separator {
    padding: 0 12px !important; /* Increased from 8px to 12px for stronger sport separation */
    margin: 0 !important;
}

.live-scores-widget {
    display: flex;
    white-space: nowrap;
    padding-right: 50px;
    will-change: transform;
    animation: scroll var(--scroll-duration) linear infinite;
}

/* Main scroll animation */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(var(--scroll-width) * -1)); }
}

/* Brand overlay that combines background and message */
.brand-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    animation: showBrandOverlay 30s linear infinite;
}

.brand-overlay-text {
    color: white;
    font-weight: bold;
    font-size: 18px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    letter-spacing: 2px;
}

@keyframes showBrandOverlay {
    0%, 80% { opacity: 0; }
    83% { opacity: 1; }
    95% { opacity: 1; }
    100% { opacity: 0; }
}

.live-score {
    display: flex;
    align-items: center;
    padding: 0 8px; /* Improved spacing for better game separation */
    height: 40px;
    transition: all 0.3s ease;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    backdrop-filter: blur(0.5px);
}

/* Remove old message styles */
.final-brand-message, .brand-message, .content-spacer {
    display: none;
}

/* Enhanced hover effect on the entire score item */
.live-score:hover {
    background: linear-gradient(to right, rgba(0, 120, 212, 0.08) 0%, rgba(0, 120, 212, 0.12) 50%, rgba(0, 120, 212, 0.08) 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 120, 212, 0.15);
    transform: scale(1.02);
}

.team-container {
    display: flex;
    align-items: center;
    margin-right: 3px; /* Further reduced for tighter spacing after team info */
    justify-content: flex-start; /* Ensure consistent alignment */
    padding: 1px 4px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    min-width: 72px; /* Increased from 65px to accommodate wider team abbreviations */
}

.team-abbr {
    font-weight: bold;
    font-size: 14px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    margin-right: 2px; /* Reduced to match override for consistent spacing */
    min-width: 35px;
    width: 42px; /* Increased from 35px to 42px to accommodate longer abbreviations like WSH */
    color: var(--neutral-text-dark);
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left; /* Ensure consistent text alignment */
}

/* Adjust team container for darts */
.live-score[data-sport="darts"] .team-container {
    min-width: 120px;
    max-width: 180px;
}

.live-score[data-sport="darts"] .team-abbr {
    font-size: 13px; /* Fixed pixel size instead of rem to prevent global style conflicts */
}

/* Team record styling */
.team-record {
    font-weight: normal;
    font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    color: var(--neutral-text-light);
    white-space: nowrap;
}

/* Team status styling */
.team-abbr.winning {
    color: #4caf50; /* Green for leading team */
}

.team-abbr.won {
    color: #2e7d32; /* Darker green for winning team */
    font-weight: bold;
}

.team-score {
    font-size: 16px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    font-weight: bold;
    margin-right: 2px; /* Reduced to match override for consistent spacing */
    min-width: 25px;
    width: 25px; /* Fixed width for consistent alignment */
    text-align: center; /* Center align scores for balance */
    color: var(--neutral-text-dark);
    transition: color 0.2s ease;
}

/* Score status styling */
.team-score.winning {
    color: #4caf50; /* Green for leading score */
}

.team-score.won {
    color: #2e7d32; /* Darker green for winning score */
}

.game-info {
    display: flex;
    align-items: center;
    font-size: 14px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    color: var(--neutral-text-light);
    margin-right: 3px; /* Reduced to match override for consistent spacing */
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 3px 6px;
    min-width: 50px;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.game-status {
    font-weight: bold;
    margin-right: 4px; /* Reduced spacing for more compact ticker design */
}

/* Game status styling based on state */
.game-status.live {
    color: #d32f2f; /* Red for live games */
    display: flex;
    align-items: center;
}

.game-status.final {
    color: #2e7d32; /* Green for final games */
}

.game-status.scheduled {
    color: #1976d2; /* Blue for scheduled games */
}

/* Special statuses */
.game-status.scheduled.special {
    color: #ff9800; /* Orange for postponed, delayed, canceled, suspended */
}

/* Live indicator dot */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px; /* Reduced spacing for more compact ticker design */
    background-color: #d32f2f; /* Red dot for live games */
    animation: dot-pulse 2s infinite;
}

/* Pulse animation for live indicators */
@keyframes dot-pulse {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

.overtime-indicator {
    font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    margin-left: 3px; /* Reduced spacing for more compact ticker design */
    color: #1976d2; /* Blue for OT/SO indicators */
}

.game-time {
    margin-right: 6px; /* Reduced spacing for more compact ticker design */
}

/* Font styles */
#live-scores-scroller {
    font-family: 'Roboto', var(--font-family);
}

/* Add responsive styles */
@media (max-width: 768px) {
    .game-status.live::before {
        margin-right: 2px; /* Reduce spacing on smaller screens */
    }
    
    .team-record {
        display: none; /* Hide team records on medium screens */
    }
    
    .team-abbr {
        max-width: 120px;
    }
    
    .live-score[data-sport="darts"] .team-container {
        min-width: 100px;
        max-width: 140px;
    }
    
    .live-score[data-sport="darts"] .team-abbr {
        font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    }
}

@media (max-width: 576px) {
    .team-abbr {
        max-width: 90px; /* Convert rem to px based on 16px base */
    }
    
    .live-score[data-sport="darts"] .team-container {
        min-width: 80px; /* Convert rem to px based on 16px base */
        max-width: 120px; /* Convert rem to px based on 16px base */
    }
    
    .live-score[data-sport="darts"] .team-abbr {
        font-size: 11px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    }
    
    .team-abbr, .team-score {
        font-size: 14px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    }
    
    .game-info {
        font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    }
    
    .overtime-indicator {
        font-size: 10px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    }
}

/* Option 2: Vertical Divider Style Section Separators */
.section-separator {
    display: flex;
    align-items: center;
    height: 40px;
    margin: 0 12px;
    position: relative;
    transition: all 0.3s ease;
}

/* Vertical line behind the sport name */
.section-separator::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background: linear-gradient(to bottom, #6c757d, #495057);
    transform: translateX(-50%);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Sport name label */
.sport-name {
    background: white;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #6c757d;
    border: 1px solid #6c757d;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Hover effects for vertical divider */
.section-separator:hover::before {
    width: 5px;
    box-shadow: 0 0 8px currentColor;
}

.section-separator:hover .sport-name {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Sport popup indicator */
.sport-popup {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.sport-popup::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: white;
}

.sport-popup::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: #dee2e6;
    margin-right: 1px;
}

.team-name {
    font-weight: 500;
    font-size: 18px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    color: white;
    margin-bottom: 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 4px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    font-size: 14px; /* Fixed pixel size instead of rem to prevent global style conflicts */
}

.player-name.short {
    font-size: 13px; /* Fixed pixel size instead of rem to prevent global style conflicts */
}

.player-name.full {
    font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
}

.player-stats {
    font-size: 16px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    color: #2c3e50;
    margin-top: 4px;
    text-align: center;
    font-weight: 500;
}

.game-info {
    font-size: 14px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    color: #7f8c8d;
    text-align: center;
    margin-top: 2px;
}

.quarter-info {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    color: #95a5a6;
    background: rgba(255, 255, 255, 0.8);
    padding: 1px 4px;
    border-radius: 3px;
}

.game-clock {
    font-size: 11px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    text-align: center;
    color: #7f8c8d;
    margin-top: 2px;
}

.game-status {
    font-size: 16px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    text-align: center;
    margin: 4px 0;
}

.status-time {
    font-size: 12px; /* Fixed pixel size instead of rem to prevent global style conflicts */
}

.overtime-indicator {
    font-size: 10px; /* Fixed pixel size instead of rem to prevent global style conflicts */
}

@media (max-width: 768px) {
    .scroller-container {
        height: 35px;
    }

    .team-item {
        min-width: 25px;
        max-width: 120px; /* Convert rem to px based on 16px base */
    }

    .player-item {
        min-width: 100px; /* Convert rem to px based on 16px base */
        max-width: 140px; /* Convert rem to px based on 16px base */
    }
}

@media (max-width: 576px) {
    .team-item {
        max-width: 90px; /* Convert rem to px based on 16px base */
    }

    .player-item {
        min-width: 80px; /* Convert rem to px based on 16px base */
        max-width: 120px; /* Convert rem to px based on 16px base */
    }
}

.nhl-game-info {
    font-size: 16px; /* Fixed pixel size instead of rem to prevent global style conflicts */
    text-align: center;
    margin-bottom: 8px;
} 