/* ---------- Historical chart cards ---------- */

.historical-chart {
    min-width: 0;
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.historical-chart h4 {
    margin: 0 0 var(--space-3);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.historical-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.historical-chart canvas {
    width: 100%;
}


/* ---------- Price chart ---------- */

#price-chart-container {
    width: 100%;
    margin-bottom: var(--space-6);
    padding: var(--space-4) var(--space-4) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* Chart.js sizes the canvas to its parent, so the canvas gets a parent
   of its own that holds only the chart (not the header above it). */
.price-chart-frame {
    position: relative;
    width: 100%;
    height: 360px;
}

#price-chart-header {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

#price-chart-header h3 {
    margin: 0;
    margin-right: auto;
}

.price-chart-period {
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.price-chart-period:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.price-chart-period.active {
    color: var(--gold);
    background: var(--gold-soft);
    border-color: var(--gold-line);
}

@media (max-width: 720px) {
    .historical-chart-grid {
        grid-template-columns: 1fr;
    }

    .price-chart-frame {
        height: 280px;
    }
}
