/**
 * STRELA — шторка графика статистики на главной v2.
 * Подключается отдельно в home2.php (чтобы не зависеть от кэша/синка монолитного home-v2.css).
 */

.hv2-stat-sheet .hv2-sheet-panel {
    max-height: min(90vh, 640px);
}

.hv2-stat-periods {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
}

.hv2-stat-period {
    flex: 1;
    padding: 8px 0;
    border-radius: var(--hv2-r-pill, 999px);
    border: 1.5px solid var(--hv2-border, #E7EAEF);
    background: var(--hv2-surface-2, #F8FAFC);
    color: var(--hv2-text-2, #475569);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.hv2-stat-period.is-active {
    background: var(--hv2-accent, #F5B301);
    border-color: var(--hv2-accent, #F5B301);
    color: var(--hv2-on-accent, #1A1408);
}

.hv2-stat-sheet-body {
    padding: 0 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.hv2-stat-summary {
    display: flex;
    gap: 8px;
}

.hv2-stat-sum {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 10px 6px;
    border-radius: var(--hv2-r-sm, 12px);
    background: var(--hv2-surface-2, #F8FAFC);
    border: 1px solid var(--hv2-border, #E7EAEF);
}

.hv2-stat-sum__val {
    font-size: 20px;
    font-weight: 800;
    color: var(--hv2-text, #0F172A);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.hv2-stat-sum__lbl {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--hv2-text-3, #94A3B8);
}

.hv2-stat-chart-wrap {
    position: relative;
    height: 230px;
    border-radius: var(--hv2-r-sm, 12px);
    background: var(--hv2-surface-2, #F8FAFC);
    border: 1px solid var(--hv2-border, #E7EAEF);
    padding: 10px 8px 6px;
    box-sizing: border-box;
}

.hv2-stat-chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    touch-action: manipulation;
}

.hv2-stat-chart-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hv2-text-3, #94A3B8);
    font-size: 22px;
    background: var(--hv2-surface-2, #F8FAFC);
    border-radius: inherit;
    z-index: 1;
}

.hv2-stat-chart-loader[hidden] {
    display: none !important;
}

@media (min-width: 1024px) {
    .hv2-stat-sheet.hv2-sheet {
        align-items: center;
        justify-content: center;
    }
    .hv2-stat-sheet .hv2-sheet-panel {
        width: min(520px, 92vw);
        border-radius: 18px;
        transform: translateY(12px) scale(0.98);
    }
    .hv2-stat-sheet.is-open .hv2-sheet-panel {
        transform: none;
    }
    .hv2-stat-sheet .hv2-sheet-grip {
        display: none;
    }
    .hv2-stat-chart-wrap {
        height: 260px;
    }
}
