/**
 * Journal Statistics Plugin Styles
 * Copyright (c) 2024 Primakara University
 */

/* ============================================
   HOMEPAGE STATISTICS
   ============================================ */

.journal-stats-container {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.journal-stats-header {
    text-align: center;
    margin-bottom: 30px;
}

.journal-stats-header h2 {
    color: #ffffff;
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.journal-stats-subtitle {
    color: #94a3b8;
    font-size: 1em;
    margin: 0;
}

.journal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.stat-number {
    font-size: 2.2em;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color variations for different stat cards */
.stat-articles:hover { border-color: #3b82f6; box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3); }
.stat-articles .stat-number { color: #60a5fa; }

.stat-issues:hover { border-color: #8b5cf6; box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3); }
.stat-issues .stat-number { color: #a78bfa; }

.stat-downloads:hover { border-color: #10b981; box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3); }
.stat-downloads .stat-number { color: #34d399; }

.stat-views:hover { border-color: #f59e0b; box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3); }
.stat-views .stat-number { color: #fbbf24; }

.stat-reviewers:hover { border-color: #ec4899; box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3); }
.stat-reviewers .stat-number { color: #f472b6; }

.stat-authors:hover { border-color: #14b8a6; box-shadow: 0 8px 25px rgba(20, 184, 166, 0.3); }
.stat-authors .stat-number { color: #2dd4bf; }

.stat-countries:hover { border-color: #f97316; box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3); }
.stat-countries .stat-number { color: #fb923c; }

.stat-current-year:hover { border-color: #06b6d4; box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3); }
.stat-current-year .stat-number { color: #22d3ee; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .journal-stats-container {
        margin: 20px 0;
        padding: 20px;
    }
    
    .journal-stats-header h2 {
        font-size: 1.5em;
    }
    
    .journal-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px 12px;
    }
    
    .stat-icon {
        font-size: 1.8em;
    }
    
    .stat-number {
        font-size: 1.6em;
    }
    
    .stat-label {
        font-size: 0.75em;
    }
}

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

.stat-card {
    animation: countUp 0.6s ease-out forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }
.stat-card:nth-child(7) { animation-delay: 0.7s; }
.stat-card:nth-child(8) { animation-delay: 0.8s; }


/* ============================================
   ARTICLE PAGE STATISTICS
   ============================================ */

.article_usage_stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.article_usage_stats .label {
    font-size: 1.1em;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.article_stats_grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.article_stat_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 25px;
    min-width: 130px;
    transition: all 0.3s ease;
}

.article_stat_item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.article_stat_item .stat_icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.article_stat_item .stat_number {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 5px;
}

.article_stat_item .stat_label {
    font-size: 0.8em;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Views styling */
.article_stat_item.views {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.article_stat_item.views .stat_number {
    color: #2563eb;
}

.article_stat_item.views:hover {
    border-color: #3b82f6;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

/* Downloads styling */
.article_stat_item.downloads {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.article_stat_item.downloads .stat_number {
    color: #059669;
}

.article_stat_item.downloads:hover {
    border-color: #10b981;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
    .article_stats_grid {
        flex-direction: column;
    }
    
    .article_stat_item {
        width: 100%;
    }
}


/* ============================================
   ARTICLE LIST STATISTICS (Compact view)
   ============================================ */

.article_list_stats {
    display: inline-flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.85em;
}

.article_list_stats .stat_item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
    cursor: default;
}

.article_list_stats .stat_item.views {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.article_list_stats .stat_item.downloads {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.article_list_stats .stat_item:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}
