/**
 * Statistics Component Styles
 * Untuk halaman detail beasiswa
 */

/* ====================================
   Statistics Section Responsive
   ==================================== */

/* Animation untuk progress bars */
@keyframes fillBar {
    from {
        width: 0;
    }
    to {
        width: var(--bar-width);
    }
}

.statistics-container {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    gap: 20px;
}

/* Responsive Grid for Gender Stats */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .scholarship-quick-list {
        grid-template-columns: 1fr !important;
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}

/* Hover effects for stat cards */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Progress bar animation on scroll */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

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

/* Chart Container */
.chart-container {
    position: relative;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Distribution Item Hover */
.distribution-item {
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.distribution-item:hover {
    background-color: rgba(30, 64, 175, 0.05);
    transform: translateX(5px);
}

/* Scrollbar Styling */
.chart-container > div::-webkit-scrollbar {
    width: 6px;
}

.chart-container > div::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chart-container > div::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.chart-container > div::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Empty State */
.empty-stats {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.empty-stats-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-stats h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-stats p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Tooltip */
.stat-tooltip {
    position: relative;
    cursor: help;
}

.stat-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.stat-tooltip:hover::after {
    opacity: 1;
}

/* Badge Styles */
.stat-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.2);
}

/* Loading Skeleton */
.stat-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    height: 20px;
    margin-bottom: 10px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Styles */
@media print {
    .statistics-container {
        page-break-inside: avoid;
    }
    
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}
