/* Smart Polling Visual Effects and Indicators */

/* Live update notification */
.live-update-notification {
    position: absolute;
    top: -30px;
    right: 0;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.live-update-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Polling status indicator */
.polling-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(100, 116, 139, 0.1);
}

.polling-indicator.live {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.polling-indicator.upcoming {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.polling-indicator.normal {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

/* Match update animations */
.match-item.score-updated {
    animation: scoreUpdate 3s ease-out;
}

.match-item.match-started {
    animation: matchStarted 2s ease-out;
}

.match-item.match-finished {
    animation: matchFinished 2s ease-out;
}

.match-item.status-updated {
    animation: statusUpdate 1.5s ease-out;
}

.match-item.time-updated {
    animation: timeUpdate 2s ease-out;
}

@keyframes scoreUpdate {
    0% {
        background-color: rgba(16, 185, 129, 0.2);
        transform: scale(1);
    }
    50% {
        background-color: rgba(16, 185, 129, 0.3);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes matchStarted {
    0% {
        background-color: rgba(239, 68, 68, 0.15);
        border-left: 3px solid #ef4444;
    }
    100% {
        background-color: transparent;
        border-left: 3px solid transparent;
    }
}

@keyframes matchFinished {
    0% {
        background-color: rgba(107, 114, 128, 0.15);
        border-left: 3px solid #6b7280;
    }
    100% {
        background-color: transparent;
        border-left: 3px solid transparent;
    }
}

@keyframes statusUpdate {
    0% {
        background-color: rgba(59, 130, 246, 0.1);
    }
    100% {
        background-color: transparent;
    }
}

@keyframes timeUpdate {
    0% {
        background-color: rgba(239, 68, 68, 0.1);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* Enhanced live match styling */
.match-item.live {
    position: relative;
}


.match-item.live .match-status {
    color: #ef4444;
    font-weight: 600;
}

/* Score highlighting for live matches */
.match-item.live .team-score {
    font-weight: 700;
    color: #1f2937;
}

/* Penalty scores */
.penalty-scores {
    font-size: 11px;
    color: #6b7280;
    margin-left: 4px;
}

.penalty-scores::before {
    content: '(';
}

.penalty-scores::after {
    content: ')';
}
@media (min-width: 768px) {
.team-stack .team-name  {width:200px;}
.team-stack .team-events {width: calc(100% - 220px);}
}
/* Mobile responsiveness for indicators */
@media (max-width: 768px) {
    .live-update-notification {
        position: fixed;
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
        z-index: 1000;
    }
}

/* Enhanced fixtures header for relative positioning */
.fixtures-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Improved match status display for live updates */
.match-status {
    transition: color 0.3s ease;
    min-width: 40px;
    text-align: center;
}

/* Team score transitions */
.team-score {
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    display: inline-block;
    color: #059669 !important; /* Ensure score visibility */
}

/* Loading state for partial updates */
.match-item.updating {
    opacity: 0.8;
    pointer-events: none;
}

.match-item.updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Smart Polling Settings UI */
.smart-polling-settings {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.settings-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    font-size: 16px;
}

.settings-toggle:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.settings-panel {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.settings-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.settings-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close:hover {
    color: #374151;
}

.settings-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.setting-group {
    margin-bottom: 16px;
}

.setting-group h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #3b82f6;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.setting-desc {
    font-size: 12px;
    color: #6b7280;
    margin-left: 24px;
}

.frequency-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frequency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.frequency-item label {
    color: #374151;
    font-weight: 500;
}

.frequency-item select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    color: #374151;
}

.settings-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-primary {
    flex: 1;
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    flex: 1;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Settings saved notification */
.settings-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 1001;
}

.settings-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile responsive settings */
@media (max-width: 768px) {
    .smart-polling-settings {
        bottom: 80px;
        right: 15px;
    }
    
    .settings-panel {
        width: calc(100vw - 30px);
        right: -15px;
        max-width: 300px;
    }
    
    .settings-content {
        max-height: 300px;
    }
}