/*
VERSIONE: 00.00.01
=========================================
MODIFICHE E IMPLEMENTAZIONI EFFETTUATE (CHANGELOG):
=========================================
Percorso origine file: P:\gestione_spese\static\modal_responsive.css
Cartella backup versionati del progetto: H:\BackupSoftware\Backup_Progetti_Attivi\gestione_spese
-> 20/08/2026 10:41 - Versione 00.00.01 - Creato da Codex:
  - Modali responsive: aggiunte regole mobile dedicate per sbloccare scorrimento e pulsanti di chiusura senza modificare la visualizzazione desktop.
-----------------------------------------
*/

@media screen and (max-width: 768px) {
    body {
        overflow-y: auto !important;
    }

    .fixed.inset-0 {
        align-items: flex-start !important;
        justify-content: center !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom)) !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .fixed.inset-0 > div,
    .fixed.inset-0 > form,
    .fixed.inset-0 > section {
        width: min(100%, calc(100vw - 1.5rem)) !important;
        max-width: calc(100vw - 1.5rem) !important;
        max-height: calc(100dvh - 1.5rem) !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .fixed.inset-0 > .flex.flex-col,
    .fixed.inset-0 > div.flex.flex-col,
    .fixed.inset-0 > form.flex.flex-col,
    .fixed.inset-0 > section.flex.flex-col {
        min-height: 0 !important;
    }

    .fixed.inset-0 > div > .overflow-y-auto,
    .fixed.inset-0 > form > .overflow-y-auto,
    .fixed.inset-0 > section > .overflow-y-auto,
    .fixed.inset-0 > div > .flex-1,
    .fixed.inset-0 > form > .flex-1,
    .fixed.inset-0 > section > .flex-1 {
        min-height: 0 !important;
    }
}

@supports not (height: 100dvh) {
    @media screen and (max-width: 768px) {
        .fixed.inset-0 > div,
        .fixed.inset-0 > form,
        .fixed.inset-0 > section {
            max-height: calc(100vh - 1.5rem) !important;
        }
    }
}
