/**
 * Expert Dashboard – Statistik tab
 *
 * @package Rigtig_For_Mig
 * @since 3.20.0
 */

/* ── Wrapper ─────────────────────────────────────────────── */
.rfm-analytics-expert-dashboard {
    padding: 4px 0 24px;
}

.rfm-analytics-expert-dashboard h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: #1a1a2e;
}

.rfm-analytics-period-info {
    color: #888;
    font-size: 0.85rem;
    margin: 0 0 16px;
}

/* ── Period selector ─────────────────────────────────────── */
.rfm-analytics-period-selector {
    margin-bottom: 20px;
}

.rfm-analytics-period-selector select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
    color: #333;
}

/* ── Stat cards grid ─────────────────────────────────────── */
.rfm-analytics-stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 560px) {
    .rfm-analytics-stat-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.rfm-analytics-stat-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 14px 14px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.rfm-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2271b1;
    line-height: 1.1;
    margin-bottom: 6px;
}

.rfm-stat-label {
    font-size: 0.78rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rfm-stat-unique {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

/* Small cards (artikler/events/AI) */
.rfm-stat-cards-small {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 560px) {
    .rfm-stat-cards-small {
        grid-template-columns: repeat(3, 1fr);
    }
}

.rfm-stat-card-small {
    padding: 12px 10px 10px;
}

.rfm-stat-card-small .rfm-stat-number {
    font-size: 1.35rem;
}

/* ── Chart sections ──────────────────────────────────────── */
.rfm-analytics-chart-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.rfm-analytics-chart-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* ── Referrers table ─────────────────────────────────────── */
.rfm-simple-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.rfm-simple-table th {
    text-align: left;
    font-weight: 600;
    color: #555;
    padding: 6px 8px;
    border-bottom: 2px solid #f0f0f0;
}

.rfm-simple-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #f7f7f7;
    color: #333;
}

.rfm-simple-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #2271b1;
}

.rfm-simple-table tr:last-child td {
    border-bottom: none;
}

/* ── Benchmarks ──────────────────────────────────────────── */
.rfm-benchmark-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f0f6ff;
}

.rfm-benchmark-card.rfm-benchmark-high {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
}

.rfm-benchmark-card.rfm-benchmark-medium {
    background: #fefce8;
    border-left: 4px solid #ca8a04;
}

.rfm-benchmark-card.rfm-benchmark-low {
    background: #f0f6ff;
    border-left: 4px solid #2271b1;
}

.rfm-benchmark-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
}

.rfm-benchmark-message {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.4;
}

/* ── Upgrade notice ──────────────────────────────────────── */
.rfm-analytics-upgrade {
    background: linear-gradient(135deg, #f0f6ff 0%, #faf5ff 100%);
    border: 1px dashed #b3c9e8;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
}

.rfm-analytics-upgrade p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}
