/**
 * EPJG Statistics Styles
 */

/* Mini stats bar */
#stats-mini-bar {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(30, 41, 59, 0.8));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-mini-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-mini-item:last-child {
    border-right: none;
}

.stat-mini-value {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-mini-label {
    font-size: 0.65rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stats toggle button */
#stats-toggle-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

#stats-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3));
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.02);
}

/* Full stats panel */
#stats-panel {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(30, 41, 59, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stat cards */
.stat-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* Tab buttons */
.stats-tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stats-tab-btn:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.05);
}

.stats-tab-btn.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Tab content animations */
.stats-tab-content {
    animation: fadeIn 0.3s ease;
}

.stats-tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress bars */
.stat-progress-bar {
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 9999px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* Hourly chart */
.hourly-bar {
    transition: all 0.3s ease;
}

.hourly-bar:hover {
    filter: brightness(1.2);
}

/* Daily stats container */
#daily-stats-container {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .stat-mini-item {
        padding: 0 0.5rem;
    }
    
    .stat-mini-value {
        font-size: 1rem;
    }
    
    .stat-mini-label {
        font-size: 0.6rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .stats-tab-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Color variants for frequency badges */
.freq-badge-blue {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.freq-badge-amber {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

/* Scrollbar styling for stats panel */
#stats-panel ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#stats-panel ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#stats-panel ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#stats-panel ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
