/* Charts Containers */

.chart-section {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.chart-legend-custom {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.legend-glossa .legend-color {
    background: #28a745;
}

.legend-math .legend-color {
    background: #2878EB;
}

.chart-container-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
}

.chart-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .chart-container-wrapper {
        height: 350px;
    }

    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .chart-section {
        padding: 1.5rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .chart-controls {
        width: 100%;
        justify-content: space-between;
    }

    .chart-container-wrapper {
        height: 300px;
    }

    .chart-legend-custom {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .legend-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .chart-container-wrapper {
        height: 250px;
    }
}