/**
 * score-bug-overlay.css
 * Styles for viewer-facing score bug overlay
 * Used with score-bug-overlay.js
 */

/* Container - positioned relative to video wrapper */
.sb-viewer-overlay {
    position: absolute;
    z-index: 100;
    pointer-events: auto;
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

/* Position variants */
.sb-position-bottom-left {
    bottom: 16px;
    left: 16px;
}

.sb-position-bottom-right {
    bottom: 16px;
    right: 16px;
}

.sb-position-top-left {
    top: 16px;
    left: 16px;
}

.sb-position-top-right {
    top: 16px;
    right: 16px;
}

/* Main display box */
.sb-viewer-display {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Team blocks */
.sb-viewer-team {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb-viewer-team.home {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%);
}

.sb-viewer-team.away {
    background: linear-gradient(135deg, #8a2d2d 0%, #5f1e1e 100%);
    flex-direction: row-reverse;
}

.sb-viewer-abbrev {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.9;
    text-transform: uppercase;
    color: white;
}

.sb-viewer-score {
    font-size: 18px;
    font-weight: 700;
    color: white;
    min-width: 20px;
    text-align: center;
}

/* Center block (period/clock) */
.sb-viewer-center {
    background: rgba(0, 0, 0, 0.95);
    padding: 4px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.sb-viewer-period {
    font-size: 8px;
    color: #8b9298;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sb-viewer-clock {
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.sb-viewer-clock.running {
    color: #00c853;
}

/* Dismiss button */
.sb-viewer-dismiss {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sb-viewer-display:hover .sb-viewer-dismiss {
    opacity: 1;
}

.sb-viewer-dismiss:hover {
    background: #555;
    border-color: rgba(255, 255, 255, 0.5);
}

.sb-viewer-dismiss i {
    font-size: 12px;
}

/* Restore button (shown when dismissed) */
.sb-viewer-restore {
    position: absolute;
    bottom: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 100;
    transition: all 0.2s ease;
}

.sb-viewer-restore:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .sb-viewer-overlay {
        bottom: 8px !important;
        left: 8px !important;
        right: auto !important;
        top: auto !important;
    }
    
    .sb-viewer-team {
        padding: 4px 6px;
        gap: 4px;
    }
    
    .sb-viewer-abbrev {
        font-size: 9px;
    }
    
    .sb-viewer-score {
        font-size: 14px;
    }
    
    .sb-viewer-center {
        padding: 3px 6px;
        min-width: 40px;
    }
    
    .sb-viewer-period {
        font-size: 7px;
    }
    
    .sb-viewer-clock {
        font-size: 10px;
    }
    
    .sb-viewer-restore {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Animation for appearing */
@keyframes sbSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sb-viewer-overlay {
    animation: sbSlideIn 0.3s ease-out;
}

/* Hide when video is fullscreen (optional - browser may handle this) */
:fullscreen .sb-viewer-overlay,
:-webkit-full-screen .sb-viewer-overlay {
    /* Keep visible in fullscreen */
}

