/* =========================================================
   LEGALESS — IL BLOCCO DI ACCESSO DEI FORM (02/10/2026)
   =========================================================
   «Accesso o Registrazione»: il passo che compare nei form a chi non
   ha fatto l'accesso. Lo accoda includes/forminator-auth-step.php su
   OGNI pagina pubblica per chi non e' connesso, perche' il blocco
   compare quasi ovunque (pagine servizio, articoli, contatti...),
   mentre legaless-popup.css si carica solo dove il registro dei popup
   lo chiede (cinque pagine al 02/10). Non spostare queste regole
   li' dentro.
   ========================================================= */

/* ---------------------------------------------------------
   1. PERCHE' QUESTI SELETTORI
   ---------------------------------------------------------
   PERCHE' QUI E CON QUESTI SELETTORI. Sul blocco di accesso scrivono
   in quattro: questo foglio, il CSS che functions.php stampa nell'head
   (#legaless-auth-step-force-styles), il «CSS aggiuntivo» del Customizer
   (#wp-custom-css, nel database: .legaless-auth-wrapper .auth-tab con
   !important, le «pillole» bordate) e i pulsanti dell'off-canvas di
   Avada. Il <style> dentro forminator-auth-step.php invece NON arriva
   mai: il blocco viene via AJAX, dove wp_footer non gira. Queste regole
   cominciano con .legaless-auth-container .legaless-auth-wrapper e
   portano !important: vincono su tutte senza toccarle.
   ⚠️ IL CUSTOMIZER SCRIVE ANCHE SULL'ID #forminator-auth-step-1 (il
   primo passo della pagina): una trentina di regole con !important su
   [role="tab"], p, input, etichette. Un ID batte qualunque fila di
   classi, quindi ogni selettore qui ha una GEMELLA che comincia con
   #forminator-auth-step-1.legaless-auth-container (e' lo stesso
   elemento). Chi aggiunge una regola aggiunge anche la gemella, o il
   primo passo di ogni pagina resta diverso dagli altri.
   Valgono anche fuori da .lgp-popup, quindi colori scritti in chiaro. */

/* Accedi / Registrati e Persona Fisica / Societa': un selettore a due
   posizioni. Nessuna riga sotto, nessun riquadro per pulsante. */
.legaless-auth-container .legaless-auth-wrapper .auth-tabs,
.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-tabs,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs {
    display: flex !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 20px !important;
    padding: 4px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #e9eef1 !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab,
.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    color: #56636f !important;
    -webkit-text-fill-color: #56636f !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer !important;
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab {
    min-height: 40px !important;
    font-size: 14px !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab:not(.active):hover,
.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab:not(.active):hover,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab:not(.active):hover,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.6) !important;
    box-shadow: none !important;
    transform: none !important;
    color: #072938 !important;
    -webkit-text-fill-color: #072938 !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab.active,
.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab.active,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab.active,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab.active {
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(7, 41, 56, 0.10), 0 3px 10px rgba(7, 41, 56, 0.07) !important;
    color: #072938 !important;
    -webkit-text-fill-color: #072938 !important;
    font-weight: 700 !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab:focus-visible,
.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab:focus-visible,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab:focus-visible,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab:focus-visible {
    outline: 2px solid #02b1ae !important;
    outline-offset: 2px !important;
}

/* La spunta dei T&C: niente riquadro intorno. Resta grande da toccare
   (tutta la riga e' il pulsante), la scritta e' testo normale e solo
   «Termini e condizioni» e «Privacy Policy» sono evidenziati. */
.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field {
    margin: 18px 0 6px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
    text-align: left !important;
    white-space: normal !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    cursor: pointer !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field input.checkbox-accettazione,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field input.checkbox-accettazione {
    display: none !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link .auth-acceptance-testo,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link .auth-acceptance-testo {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link .auth-acceptance-evidenza,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link .auth-acceptance-evidenza {
    color: #028f8c !important;
    -webkit-text-fill-color: #028f8c !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link .auth-acceptance-check,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link .auth-acceptance-check {
    display: inline-block !important;
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 1px 0 0 !important;
    box-sizing: border-box !important;
    border: 2px solid #94a3b8 !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    background-image: none !important;
    transition: background-color 150ms ease, border-color 150ms ease !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link:hover .auth-acceptance-check,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link:hover .auth-acceptance-check {
    border-color: #02b1ae !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link.checked .auth-acceptance-check,
.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field.accepted .auth-acceptance-link .auth-acceptance-check,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link.checked .auth-acceptance-check,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field.accepted .auth-acceptance-link .auth-acceptance-check {
    border-color: #02b1ae !important;
    background-color: #02b1ae !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 11px 9px !important;
}

.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link:focus-visible,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-acceptance-field .auth-acceptance-link:focus-visible {
    outline: 2px solid #02b1ae !important;
    outline-offset: 3px !important;
}

/* I requisiti della password nel passo «Registrati»: gli stessi di
   /registrazione/ (legaless-compat, sezione 9), stesse classi. */
.legaless-auth-container .lgl-pwd,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd { margin: 10px 0 2px; padding: 12px 14px; border: 1px solid #e2e8ee; border-radius: 10px; background: #f6f8fa; font-size: 13px; line-height: 1.4; text-align: left; transition: border-color .2s ease, background-color .2s ease; }
.legaless-auth-container .lgl-pwd .lgl-pwd__titolo,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__titolo { margin: 0 0 7px !important; padding: 0 !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.3 !important; color: #072938 !important; -webkit-text-fill-color: #072938 !important; text-align: left !important; }
.legaless-auth-container .lgl-pwd .lgl-pwd__lista,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__lista { display: grid; gap: 6px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.legaless-auth-container .lgl-pwd .lgl-pwd__req,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req { display: flex; align-items: center; gap: 9px; margin: 0 !important; padding: 0 !important; color: #55626e !important; -webkit-text-fill-color: #55626e !important; font-size: 13px !important; transition: color .2s ease; }
.legaless-auth-container .lgl-pwd .lgl-pwd__req::before, .legaless-auth-container .lgl-pwd .lgl-pwd__req::marker,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req::before,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req::marker { content: none !important; }
.legaless-auth-container .lgl-pwd .lgl-pwd__req[hidden],
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req[hidden] { display: none !important; }
.legaless-auth-container .lgl-pwd .lgl-pwd__icona,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__icona { display: inline-flex; flex: 0 0 18px; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #b4c0cb; transition: background-color .2s ease, box-shadow .2s ease; }
.legaless-auth-container .lgl-pwd .lgl-pwd__icona svg,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__icona svg { display: block; width: 11px; height: 11px; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .2s ease; }
.legaless-auth-container .lgl-pwd .lgl-pwd__req--ok,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req--ok { color: #15803d !important; -webkit-text-fill-color: #15803d !important; }
.legaless-auth-container .lgl-pwd .lgl-pwd__req--ok .lgl-pwd__icona,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req--ok .lgl-pwd__icona { background: #16a34a; box-shadow: none; }
.legaless-auth-container .lgl-pwd .lgl-pwd__req--ok .lgl-pwd__icona svg,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__req--ok .lgl-pwd__icona svg { opacity: 1; transform: scale(1); }
.legaless-auth-container .lgl-pwd.lgl-pwd--ok,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd.lgl-pwd--ok { border-color: #b7e2c4; background: #f0faf3; }
.legaless-auth-container .lgl-pwd.lgl-pwd--errore,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd.lgl-pwd--errore { border-color: #f3c3be; background: #fff7f6; }
.legaless-auth-container .lgl-pwd.lgl-pwd--errore .lgl-pwd__req:not(.lgl-pwd__req--ok),
#forminator-auth-step-1.legaless-auth-container .lgl-pwd.lgl-pwd--errore .lgl-pwd__req:not(.lgl-pwd__req--ok) { color: #b42318 !important; -webkit-text-fill-color: #b42318 !important; }
.legaless-auth-container .lgl-pwd.lgl-pwd--errore .lgl-pwd__req:not(.lgl-pwd__req--ok) .lgl-pwd__icona,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd.lgl-pwd--errore .lgl-pwd__req:not(.lgl-pwd__req--ok) .lgl-pwd__icona { box-shadow: inset 0 0 0 1.5px #d92d20; }
.legaless-auth-container .lgl-pwd .lgl-pwd__sr,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd .lgl-pwd__sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (prefers-reduced-motion: reduce) {
    .legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab,
    .legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab,
    .legaless-auth-container .lgl-pwd,
    .legaless-auth-container .lgl-pwd *,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-tabs .auth-tab,
#forminator-auth-step-1.legaless-auth-container .legaless-auth-wrapper .auth-role-tabs .auth-role-tab,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd,
#forminator-auth-step-1.legaless-auth-container .lgl-pwd * {
        transition: none !important;
    }
}
