﻿/* ============================================
   Site.Master.Stats.css - إحصائيات الزيارات والدول والمدن
   ============================================ */

/* Top Row - Two Cards */
.stats-top-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* Bottom Row - Full Width */
.stats-bottom-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Visit Statistics Card */
.visit-stats-container,
.countries-stats-container,
.cities-stats-container {
    margin-bottom: 0;
    width: 100%;
}

.visit-stats-card,
.countries-stats-card,
.cities-stats-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .visit-stats-card:hover,
    .countries-stats-card:hover,
    .cities-stats-card:hover {
        transform: translateY(-3px);
        border-color: #fbbf24;
        box-shadow: 0 10px 25px rgba(251, 191, 36, 0.15);
    }

/* Card Header */
.stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #fbbf24;
    flex-wrap: wrap;
}

    .stats-header i {
        font-size: 28px;
        color: #fbbf24;
    }

    .stats-header h3 {
        font-size: 16px;
        margin: 0;
        color: #fff;
        flex: 1;
    }

.total-count {
    background: rgba(251, 191, 36, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: #fbbf24;
    font-weight: bold;
}

/* Stats Grid for Visit Card */
.stats-grid-visit {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    transition: all 0.3s ease;
}

    .stat-item:hover {
        background: rgba(251, 191, 36, 0.1);
        transform: translateX(-5px);
    }

.stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon i {
        font-size: 18px;
        color: #fbbf24;
    }

.stat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #fbbf24;
    line-height: 1;
}

    .stat-value.time-value {
        font-size: 11px;
        font-family: monospace;
        word-break: break-all;
    }

.stat-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Countries & Cities Lists */
.countries-list,
.cities-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
    flex: 1;
}

.country-item,
.city-item {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .country-item:hover,
    .city-item:hover {
        background: rgba(251, 191, 36, 0.1);
        transform: translateX(-3px);
    }

.country-info,
.city-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

    .country-info i,
    .city-info i {
        font-size: 12px;
        color: #fbbf24;
        width: 18px;
    }

.country-name,
.city-name {
    font-size: 12px;
    font-weight: 500;
    color: #e2e8f0;
}

.country-stats,
.city-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11px;
}

.country-count,
.city-count {
    color: #fbbf24;
    font-weight: bold;
    font-size: 12px;
}

.country-percent,
.city-percent {
    color: #94a3b8;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Stats Footer */
.stats-footer {
    text-align: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    color: #94a3b8;
}

    .stats-footer i {
        color: #fbbf24;
        margin-left: 5px;
    }

/* Cities List - Expanded for Full Width */
.cities-list {
    max-height: 280px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.city-item {
    margin-bottom: 0;
}

/* Scrollbar Styling */
.countries-list::-webkit-scrollbar,
.cities-list::-webkit-scrollbar {
    width: 4px;
}

.countries-list::-webkit-scrollbar-track,
.cities-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.countries-list::-webkit-scrollbar-thumb,
.cities-list::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 10px;
}

/* Light Mode */
body.light-mode .visit-stats-card,
body.light-mode .countries-stats-card,
body.light-mode .cities-stats-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

    body.light-mode .visit-stats-card:hover,
    body.light-mode .countries-stats-card:hover,
    body.light-mode .cities-stats-card:hover {
        border-color: #fbbf24;
    }

body.light-mode .stats-header h3 {
    color: #0f172a;
}

body.light-mode .stat-item,
body.light-mode .country-item,
body.light-mode .city-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

    body.light-mode .stat-item:hover,
    body.light-mode .country-item:hover,
    body.light-mode .city-item:hover {
        background: #fef9e3;
        border-color: #fbbf24;
    }

body.light-mode .stat-label,
body.light-mode .country-percent,
body.light-mode .city-percent {
    color: #64748b;
}

body.light-mode .country-name,
body.light-mode .city-name {
    color: #0f172a;
}

body.light-mode .progress-bar {
    background: #e2e8f0;
}

body.light-mode .stats-footer {
    border-top-color: #e2e8f0;
    color: #64748b;
}

/* Responsive */
@media (max-width: 900px) {
    .stats-top-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cities-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .stats-top-row {
        gap: 15px;
    }

    .stats-bottom-row {
        gap: 15px;
    }
}
