/* Historical Price Index panel injected into Analytics. */

.analytics-history-panel {
    min-height: 300px;
}

.analytics-history-head {
    align-items: flex-end;
}

.analytics-history-periods {
    padding: 3px;
    display: inline-flex;
    gap: 2px;
    background: var(--surface-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
}

.analytics-history-periods a {
    padding: 5px 8px;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 650;
    text-decoration: none;
    border-radius: 6px;
}

.analytics-history-periods a.is-active {
    color: var(--text-primary);
    background: var(--surface-primary);
    box-shadow: var(--shadow-xs);
}

.analytics-history-body {
    min-height: 238px;
}

.analytics-history-chart-wrap {
    height: 220px;
    padding: 12px 14px 4px;
}

.analytics-history-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.analytics-history-note {
    padding: 0 14px 12px;
    color: var(--text-muted);
    font-size: 9px;
}

.analytics-history-status,
.analytics-history-empty {
    min-height: 220px;
    padding: 22px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
}

.analytics-history-status.is-error {
    color: var(--danger);
}

@media (max-width: 760px) {
    .analytics-history-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-history-periods {
        width: 100%;
    }

    .analytics-history-periods a {
        flex: 1 1 0;
        text-align: center;
    }

    .analytics-history-chart-wrap {
        height: 205px;
        padding-left: 8px;
        padding-right: 8px;
    }
}
