/* ============================================
   Chart Containers
   ============================================ */

.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.chart-container:hover {
    box-shadow: var(--shadow-md);
}

.chart-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dts-primary);
    text-align: center;
    margin-bottom: var(--space-md);
}

[data-theme="dark"] .chart-title {
    color: var(--dts-secondary);
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    max-height: 320px;
}

.chart-canvas-wrapper canvas {
    width: 100% !important;
    max-height: 320px;
}

/* Smaller chart variant for grids */
.chart-container.chart-sm .chart-canvas-wrapper {
    max-height: 240px;
}

.chart-container.chart-sm .chart-canvas-wrapper canvas {
    max-height: 240px;
}

/* Full width chart */
.chart-container.chart-full {
    grid-column: 1 / -1;
}

.chart-container.chart-full .chart-canvas-wrapper {
    max-height: 400px;
}

.chart-container.chart-full .chart-canvas-wrapper canvas {
    max-height: 400px;
}

/* Chart legend custom styles */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
