/**
 * analytics.css — Estilos para el Dashboard de Métricas y Analíticas
 * Biblia Conexiones PWA
 *
 * Administra el espaciado respecto a las barras fijas de navegación (top/bottom),
 * las tarjetas de KPIs, indicadores de rango, barras de países y tablas analíticas.
 */

/* ─── CONTENEDOR PRINCIPAL Y COMPENSACIÓN DE BARRAS DE NAVEGACIÓN ─────────── */

#analytics_full_container {
    min-height: 100vh;
    padding-top: 80px !important; /* Compensa la barra superior fija (#header_container) en escritorio */
    padding-bottom: 24px;
}

@media (max-width: 575.98px) {
    #analytics_full_container {
        padding-top: 16px !important;
        padding-bottom: 80px !important; /* Compensa la barra inferior fija (#bottom_container) en móviles */
    }
}

/* ─── TARJETAS DE KPIS ─────────────────────────────────────────────────────── */

.kpi-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-bg {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.bible-bg {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.search-bg {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.time-bg {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* ─── INDICADORES Y BADGES ─────────────────────────────────────────────────── */

.dot-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.text-purple {
    color: #8b5cf6 !important;
}

/* Ranking con medallas para el Top de Capítulos */
.rank-pill {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.rank-1 {
    background: #fef08a;
    color: #854d0e;
}

.rank-2 {
    background: #e2e8f0;
    color: #475569;
}

.rank-3 {
    background: #fed7aa;
    color: #9a3412;
}

[data-bs-theme="dark"] .rank-1 {
    background: rgba(234, 179, 8, 0.25);
    color: #fde047;
}

[data-bs-theme="dark"] .rank-2 {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

[data-bs-theme="dark"] .rank-3 {
    background: rgba(249, 115, 22, 0.25);
    color: #fdba74;
}

/* ─── TABLAS Y CONTENEDORES CON SCROLLBAR ───────────────────────────────────── */

#countries_list_container::-webkit-scrollbar,
#top_queries_container::-webkit-scrollbar,
#tableTopChapters::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

#countries_list_container::-webkit-scrollbar-thumb,
#top_queries_container::-webkit-scrollbar-thumb,
#tableTopChapters::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

[data-bs-theme="dark"] #countries_list_container::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] #top_queries_container::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] #tableTopChapters::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
