.nf-before-form-content,
.nf-form-title,
.nf-mp-header {
    display: none;
}

.it-page-section .it-page-section .card.has-bkg-grey {
    background-color: #fff;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
}

.it-page-section .it-page-section .card .form-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.cmp-input:first-child {
    margin-top: 0rem !important;
}

.cmp-input:last-child {
    margin-bottom: 0rem !important;
}

/* La label del select (Bootstrap Italia) e' absolute e sporge sopra il blocco,
   con il badge OOTS arriva a coprire il campo precedente: si riserva lo spazio sopra. */
.page-step .select-wrapper,
.modal-body .select-wrapper {
    margin-top: 2.5rem;
}

.page-step .select-wrapper:first-child {
    margin-top: 0;
}

/* Nella modale (campo address) il primo select non ha nulla sopra se non il titolo:
   lo spazio per la label serve comunque. */
.modal-body .select-wrapper:first-child {
    margin-top: 2.5rem;
}

/* Campo address: la label e' dentro l'input-group (flex), quindi si manda a capo
   a tutta larghezza e l'input scende sotto. */
.page-step .form-group > .input-group {
    flex-wrap: wrap;
}

/* Anche senza .active: Bootstrap Italia la toglie al blur su campo vuoto
   e la label tornerebbe floating assoluta (sembra "sparita" in errore). */
.page-step .form-group > .input-group > label.cmp-input__label {
    position: static;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transform: none;
}

/* Titolo della modale: e' la label del campo e puo' essere lungo. */
.it-example-modal .modal-header {
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.it-example-modal .modal-title {
    line-height: 1.3;
}

/* Label lunghe sui campi (testo, numero, data, ora, email, telefono).
   Bootstrap Italia le posiziona in absolute con line-height 2.5rem e translateY(-85%):
   se vanno a capo crescono verso l'alto e coprono descrizione e campo precedenti.
   Si riportano nel flusso, cosi' la label occupa l'altezza che le serve.
   Non dipendere da .active: InputLabel di BI la rimuove al blur su campo vuoto
   e, con is-invalid + icona errore, la label floating sembrava sparita. */
.page-step .form-group.cmp-input.mb-3 > label {
    position: static;
    display: block;
    width: auto;
    max-width: 100%;
    padding: 0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transform: none;
    /* Stile "active" di BI anche senza la classe (font-size/peso della label sopra). */
    font-size: 0.875rem;
    font-weight: 600;
}

/* Descrizione del campo: staccata dalla linea dell'input e leggibile se lunga. */
.page-step .form-group.cmp-input.mb-3 > span.label {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #455a64;
}

.page-step .form-group.cmp-input.mb-3 > span.label:empty {
    display: none;
}

.modal.mieifile-modal {
    z-index: 99999;
}

.modal.mieifile-modal .modal-dialog {
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    height: 100%;
}

.modal.mieifile-modal .modal-title {
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .06);
    padding: 1.125rem 1.5rem;
    font-weight: 600;
    line-height: 1.5;
    color: #455a64;
    margin-bottom: 4.375rem;
}

@media (min-width: 768px) {
    .modal.mieifile-modal .modal-title {
        box-shadow: none;
        justify-content: space-between;
        line-height: 1.1;
    }
}

@media (min-width: 576px) {
    .modal.mieifile-modal .form-group {
        gap: 1.67rem;
        padding-left: 1.33rem;
        padding-right: 1.33rem;
    }
}

.modal.mieifile-modal .form-group {
    display: flex;
    align-items: flex-end;
    gap: 1.875rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.modal.mieifile-modal .modal-body{
    min-height: 100vh;
    height: 100%;
}
/* ---- Interattivita' di compilazione (assets/js/form-validate.js) ---- */

/* Riepilogo errori: elenco di link ai campi da correggere. */
.h2o-error-summary ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.h2o-error-summary li + li {
    margin-top: 0.25rem;
}

.h2o-error-summary a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Avanzamento dei campi obbligatori dello step. */
.h2o-step-progress {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #d9dadb;
    border-radius: 0.25rem;
    background: #fff;
}

.h2o-step-progress[hidden] {
    display: none;
}

.h2o-step-progress__text {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #455a64;
}

.h2o-step-progress .progress {
    height: 0.5rem;
}

.h2o-step-progress .progress-bar {
    transition: width 0.25s ease-out;
}

.h2o-step-progress.is-complete .progress-bar {
    background-color: #008758 !important;
}

/* Sezione della navigazione laterale che contiene campi da controllare. */
.cmp-navscroll .nav-link.h2o-nav-error {
    color: #d9364f;
}

.cmp-navscroll .nav-link.h2o-nav-error::after {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: 0.5rem;
    border-radius: 50%;
    background: #d9364f;
}

/* Comparsa dei campi condizionali. */
@keyframes h2o-reveal {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.h2o-reveal {
    animation: h2o-reveal 0.25s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .h2o-reveal {
        animation: none;
    }

    .h2o-step-progress .progress-bar {
        transition: none;
    }
}

/* Elenco dei campi da controllare nella colonna laterale (sotto l'indice, sticky con essa). */
.h2o-nav-errors {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    /* La colonna e' sticky: indice + avanzamento + elenco devono stare nello schermo. */
    max-height: calc(100vh - 24rem);
    min-height: 8rem;
    overflow-y: auto;
    border: 1px solid #d9dadb;
    border-left: 4px solid #d9364f;
    border-radius: 0.25rem;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
}

.h2o-nav-errors__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #d9364f;
}

.h2o-nav-errors__close {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.25rem;
}

.h2o-nav-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.h2o-nav-errors li + li {
    margin-top: 0.375rem;
}

.h2o-nav-errors a {
    font-weight: 600;
    text-decoration: underline;
}

.h2o-nav-errors small {
    color: #455a64;
}

/* Avviso in fondo: da desktop, se l'elenco e' nella colonna laterale resta solo il conteggio. */
.h2o-error-summary .h2o-side-hint {
    display: none;
}

@media (min-width: 992px) {
    .h2o-error-summary--has-side ul {
        display: none;
    }

    .h2o-error-summary--has-side .h2o-side-hint {
        display: inline;
    }
}

/* Avanzamento nella colonna laterale: sotto l'indice, sticky con essa; il tempo va a capo. */
.h2o-step-progress--side {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
}

.h2o-step-progress--side .h2o-step-progress__text {
    line-height: 1.4;
}

.h2o-step-progress--side .h2o-step-progress__sep {
    display: none;
}

.h2o-step-progress--side .h2o-step-progress__time {
    display: block;
}

/* Stato del salvataggio automatico della bozza, sopra la barra dei pulsanti e il suo separatore. */
.h2o-autosave-status {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #455a64;
}

.h2o-autosave-status:empty {
    display: none;
}

.h2o-autosave-status.is-error {
    color: #d9364f;
    font-weight: 600;
}

/* Suggerimento consultivo sul formato (assets/js/form-format.js): non e' un errore e non blocca l'invio. */
.h2o-format-hint {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #7a5200;
}

/* Modalità guidata del passaggio (assets/js/form-guided.js) */
.h2o-guided-hidden {
    display: none !important;
}

.h2o-guided-nav {
    margin-bottom: 1.5rem;
}

.h2o-guided-status {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.h2o-guided-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.h2o-guided-step {
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: 2px solid var(--bs-primary, #0066cc);
    border-radius: 50%;
    background: #fff;
    color: var(--bs-primary, #0066cc);
    font-weight: 600;
    line-height: 1;
}

.h2o-guided-step.is-done {
    background: #e6f0fa;
}

.h2o-guided-step.is-current {
    background: var(--bs-primary, #0066cc);
    color: #fff;
}

.h2o-guided-step:disabled {
    border-color: #b1b1b1;
    color: #5c6f82;
    cursor: not-allowed;
}
