/* ============================================
   GBN Ethiopia — Chart Styles
   ============================================ */

.chart-container {
    position: relative;
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--gray-200);
}

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

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.chart-header h3 {
    font-size: 1.1rem;
    font-family: var(--font-body);
}

.chart-toggle {
    display: flex;
    gap: var(--space-xs);
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 3px;
}

.chart-toggle-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-600);
}

.chart-toggle-btn.active {
    background: var(--white);
    color: var(--green);
    box-shadow: var(--shadow-sm);
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.chart-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: var(--space-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.chart-legend {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

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

.chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Ratings breakdown chart */
.ratings-chart-container {
    max-width: 500px;
}

.ratings-chart-container canvas {
    max-height: 250px;
}
