/**
 * SIAN THAI - Livescore Auto Refresh Styles
 */

/* Refresh Indicator */
#refresh-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fbbf24;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9999;
    pointer-events: none;
}

#refresh-indicator.active {
    opacity: 1;
}

#refresh-indicator::before {
    content: '⟳';
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Score Update Animation */
.match-score.score-updated {
    animation: scoreFlash 0.5s ease-in-out;
}

@keyframes scoreFlash {
    0%, 100% { 
        background-color: transparent;
        transform: scale(1);
    }
    50% { 
        background-color: rgba(251, 191, 36, 0.3);
        transform: scale(1.1);
    }
}

/* Blinking Live Indicator */
.live-indicator {
    display: inline-block;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Error Message */
.refresh-error-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ef4444;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.refresh-error-message button {
    background: white;
    color: #ef4444;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-error-message button:hover {
    background: #fee2e2;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* New Match Notification */
.new-match-notification {
    position: fixed;
    top: 60px;
    right: 10px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    font-size: 14px;
    font-weight: bold;
    z-index: 9998;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 4.7s;
    animation-fill-mode: forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Pulse effect for live matches */
.live-match-row {
    position: relative;
}

.live-match-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ef4444;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Loading skeleton (optional) */
.loading-skeleton {
    background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile responsive */
@media (max-width: 640px) {
    #refresh-indicator {
        top: 5px;
        right: 5px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .refresh-error-message {
        bottom: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 16px;
        font-size: 12px;
    }

    .new-match-notification {
        top: 50px;
        right: 5px;
        left: 5px;
        text-align: center;
        font-size: 13px;
    }
}

