/* Styles specific to reports and catalog of studies */

/* Stile Filtri Attivi (elenco-studi.html) */
.filter-chip.active {
    background-color: #044732;
    color: white;
    border-color: #044732;
}

/* Chart Container rules for layout and responsiveness */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    height: 180px; /* Responsive mobile height */
}

@media (min-width: 768px) {
    .chart-container {
        height: 300px; /* Desktop height */
    }
}

/* Higher chart container for sirfidi */
.chart-container.sirfidi-chart {
    height: 50vh;
    max-height: 450px;
}

@media (max-width: 768px) {
    .chart-container.sirfidi-chart {
        height: 350px;
    }
}

/* Area Button in dati-api-2024 */
.area-btn {
    transition: all 0.2s ease-in-out;
}
.area-btn.active {
    background-color: #044732;
    color: white;
    border-color: #044732;
    transform: scale(1.02);
    box-shadow: 0 4px 6px -1px rgba(4, 71, 50, 0.2);
}
.area-btn:hover:not(.active) {
    border-color: #317c33;
    color: #317c33;
}

/* Fade In animation for dynamic panels */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Strict size constraints on Chart.js canvas elements to fix iOS layout bugs */
.chart-container canvas {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
}
