/**
 * Live Match Updates CSS
 * Enhanced styles for live match indicators and animations
 */

/* Live time styling */
.live-time {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    display: inline-block;
    min-width: 35px;
    text-align: center;
    position: relative;
}

/* Playing state - green with pulse animation */
.live-time.playing {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 1px solid #1e7e34;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.4);
}

/* Halftime state - orange */
.live-time.halftime {
    background: linear-gradient(135deg, #fd7e14, #ff8c00);
    color: white;
    border: 1px solid #dc7000;
    animation: none;
    box-shadow: 0 0 5px rgba(253, 126, 20, 0.4);
}

/* Pulse animation for live matches */
@keyframes livePulse {
    0% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.8);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.4);
        transform: scale(1);
    }
}

/* Static time (non-live matches) */
.match_time:not(.live-time) {
    color: #6c757d;
    font-size: 0.85em;
}

/* Score styling for live matches */
.match-score {
    font-weight: bold;
    color: #495057;
    font-size: 1.1em;
}

.match-vs {
    color: #6c757d;
    font-style: italic;
}

.match-vs.future-match {
    color: #007bff;
}

.match-vs.past-match {
    color: #dc3545;
}

/* Live indicator dot */
.live-time.playing::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    margin-right: 4px;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Extra time styling - make it stand out */
.live-time.playing[data-extra-time="true"] {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border-color: #c82333;
    animation: extraTimePulse 1.5s ease-in-out infinite;
}

@keyframes extraTimePulse {
    0% {
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 53, 69, 1);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
        transform: scale(1);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .live-time {
        font-size: 0.8em;
        padding: 1px 4px;
        min-width: 30px;
    }
    
    .live-time.playing::before {
        width: 4px;
        height: 4px;
        margin-right: 2px;
    }
}

/* Loading state for live updates */
.live-update-loading {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* Update notification (optional) */
.live-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.live-update-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced table styling for live matches */
tr:has(.live-time.playing) {
    background: rgba(40, 167, 69, 0.03);
    border-left: 3px solid #28a745;
}

tr:has(.live-time.halftime) {
    background: rgba(253, 126, 20, 0.03);
    border-left: 3px solid #fd7e14;
}