/**
 * Chart.js Custom Styles for RoamingPigs
 * Loaded conditionally only on pages with charts
 */

/* Chart container - responsive wrapper */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Let Chart.js handle canvas sizing */
.chart-container canvas {
    display: block;
    width: 100% !important;
}

/* Chart title */
.chart-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Chart caption/source */
.chart-caption {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* Dark theme adjustments */
[data-theme="dark"] .chart-container {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .chart-container {
        padding: 0.75rem;
        margin: 1.5rem -0.75rem;
        max-width: none;
        width: calc(100% + 1.5rem);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .chart-title {
        font-size: 1rem;
    }

    .chart-caption {
        font-size: 0.8rem;
    }
}
