/* ==========================================================
   VoxAI Statistics Page — Free Layout
   Follows the existing design tokens from voxai-metaboxes.css
   ========================================================== */

.voxai-stats-wrap {
    font-family: var(--voxai-font-body, 'Inter', sans-serif);
}

.voxai-stats-title {
    font-family: var(--voxai-font-headline, 'Manrope', sans-serif);
    font-size: 22px;
    font-weight: 700;
    color: #1e1e1e;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.voxai-stats-subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 13px;
}

/* Free-plan notice */
.voxai-stats-free-notice {
    background: #f0f6fc;
    border-left: 4px solid var(--voxai-primary, #8B5CF6);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e1e1e;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voxai-stats-free-notice .dashicons {
    color: var(--voxai-primary, #8B5CF6);
    flex-shrink: 0;
}

/* ── Section titles ── */
.voxai-stats-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    margin: 24px 0 10px;
}

.voxai-stats-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 10px;
}

/* ── Month navigation ── */
.voxai-stats-month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voxai-stats-month-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e1e1e;
    min-width: 130px;
    text-align: center;
}

/* ── KPI cards grid ── */
.voxai-stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.voxai-stats-kpi-grid--sm {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .voxai-stats-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* ── Individual card ── */
.voxai-stats-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 18px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.voxai-stats-card:hover {
    border-color: var(--voxai-primary, #8B5CF6);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.voxai-stats-card--accent {
    border-left: 3px solid var(--voxai-primary, #8B5CF6);
}

.voxai-stats-card--locked {
    opacity: 0.65;
    cursor: default;
    background: #fafafa;
}

.voxai-stats-card__icon {
    font-size: 18px !important;
    color: var(--voxai-primary, #8B5CF6);
    margin-bottom: 6px;
    display: block;
}

.voxai-stats-card__value {
    font-size: 28px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1;
    margin-bottom: 4px;
    font-family: var(--voxai-font-headline, 'Manrope', sans-serif);
}

.voxai-stats-card__label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Progress bar inside coverage card */
.voxai-stats-progress-bar {
    height: 4px;
    background: #e9e9e9;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.voxai-stats-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--voxai-primary, #8B5CF6), var(--voxai-secondary, #3B82F6));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* Pro badge on locked cards */
.voxai-stats-pro-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--voxai-primary, #8B5CF6);
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    text-decoration: none;
    letter-spacing: 0.04em;
}

/* ── Chart card ── */
.voxai-stats-chart-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    min-height: 160px;
}

.voxai-stats-chart-empty {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 30px 0;
}

/* ── Two-column layout ── */
.voxai-stats-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .voxai-stats-two-col {
        grid-template-columns: 1fr;
    }
}

/* ── Panel ── */
.voxai-stats-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 20px;
}

.voxai-stats-panel__title {
    font-size: 13px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* ── Top posts ranked list ── */
.voxai-stats-top-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.voxai-stats-top-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 4px;
    padding: 8px 6px;
}

.voxai-stats-top-item:last-child {
    border-bottom: none;
}

.voxai-stats-top-item:hover {
    background: #f9f4ff;
}

.voxai-stats-top-item.is-active {
    background: #f0e9ff;
    border-left: 3px solid var(--voxai-primary, #8B5CF6);
    padding-left: 9px;
}

.voxai-stats-top-rank {
    width: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--voxai-primary, #8B5CF6);
    flex-shrink: 0;
}

.voxai-stats-top-info {
    flex: 1;
    min-width: 0;
}

.voxai-stats-top-title {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #1e1e1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.voxai-stats-top-bar {
    height: 3px;
    background: #e9e9e9;
    border-radius: 2px;
    overflow: hidden;
}

.voxai-stats-top-bar-fill {
    height: 100%;
    background: var(--voxai-primary, #8B5CF6);
    border-radius: 2px;
}

.voxai-stats-top-plays {
    font-size: 13px;
    font-weight: 700;
    color: var(--voxai-primary, #8B5CF6);
    flex-shrink: 0;
}

/* ── Empty state ── */
.voxai-stats-empty {
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 24px 0;
}
