/* ==========================================================================
   HYDRABOOKING PREMIUM FORM STYLES (DYNAMIC VARIABLE-DRIVEN ARCHITECTURE)
   Infallibile: Layout responsive dinamico e stile grafico premium integrato.
   ========================================================================== */

:root {
    /* --- TAVOLOZZA COLORI PREMIUM (BLU ELEGANTE #253688) --- */
    --tfhb-primary: #253688;          /* Blu elegante del brand */
    --tfhb-primary-hover: #1b2972;    /* Tonalità più scura per hover */
    --tfhb-primary-light: #f2f4fa;    /* Sfondo delle card selezionate */
    --tfhb-primary-focus: rgba(37, 54, 136, 0.12); /* Bagliore di selezione */
    
    /* --- COLORI DEL TESTO --- */
    --tfhb-text-main: #0f172a;        /* Testo principale (Slate 900) */
    --tfhb-text-muted: #64748b;       /* Testo secondario e placeholder (Slate 500) */
    --tfhb-required-color: #ef4444;   /* Colore degli asterischi dei campi obbligatori */
    
    /* --- ELEMENTI DEL FORM & BORDI --- */
    --tfhb-field-bg: #f8fafc;         /* Sfondo neutro dei campi */
    --tfhb-field-bg-hover: #f1f5f9;   /* Sfondo dei campi hover */
    --tfhb-border: #cbd5e1;           /* Bordo grigio chiaro */
    --tfhb-border-hover: #94a3b8;     /* Bordo hover */
    
    /* --- ARROTONDAMENTI E OMBRE --- */
    --tfhb-radius: 16px;              /* Smussatura del contenitore form */
    --tfhb-radius-small: 8px;         /* Smussatura di campi, card e pulsante */
    --tfhb-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --tfhb-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    --tfhb-shadow-lg: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -5px rgba(15, 23, 42, 0.03);
    
    /* --- TRANSIZIONI --- */
    --tfhb-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- PARAMETRI DI LAYOUT (DESKTOP DI DEFAULT) --- */
    --tfhb-form-max-width: 900px;
    --tfhb-form-padding: 40px;
    --tfhb-form-margin: 30px auto;
    --tfhb-grid-columns: repeat(2, 1fr); /* 2 colonne speculari per affiancamento al 50% */
    --tfhb-grid-gap: 28px 24px;
    --tfhb-span-2: span 2;
    --tfhb-checkbox-columns: repeat(auto-fill, minmax(260px, 1fr));
    --tfhb-checkbox-bg: #f8fafc;         /* Sfondo del box di raggruppamento */
    --tfhb-checkbox-border: #e2e8f0;     /* Bordo grigio chiaro per raggruppamento */
    --tfhb-checkbox-padding: 10px;       /* Padding intorno ai gruppi (ridotto a 10px!) */
    --tfhb-checkbox-margin-top: 10px;    /* Spazio tra etichetta e box */
    --tfhb-checkbox-card-bg: #ffffff;    /* Sfondo delle singole card */
    --tfhb-submit-width: auto;
    --tfhb-submit-margin: 0 auto;
    --tfhb-submit-align: center;
}

/* --- 📱 SOVRASCRITTURA VARIABILI PER MOBILE --- */
@media (max-width: 768px) {
    :root {
        --tfhb-form-max-width: 100%;
        --tfhb-form-padding: 24px 16px;
        --tfhb-form-margin: 10px auto;
        --tfhb-grid-columns: 1fr !important; /* Forza colonna singola su mobile */
        --tfhb-grid-gap: 20px;
        --tfhb-span-2: span 1 !important;    /* Forza tutti i campi a span singolo */
        --tfhb-checkbox-columns: 1fr !important;
        --tfhb-checkbox-padding: 10px !important; /* Mantiene 10px anche su mobile */
        --tfhb-checkbox-margin-top: 6px !important;
        --tfhb-submit-width: 100% !important;
        --tfhb-submit-align: stretch !important;
        --tfhb-submit-margin: 0 !important;
    }
}

/* ==========================================================================
   APPLICAZIONE STILI (Completamente privi di :has() sul contenitore principale)
   ========================================================================== */

/* --- APPLICAZIONE DEL BOX-SIZING UNIVERSALE AL FORM --- */
html body .tfhb-frontend-from.hbc-customized-form,
html body .tfhb-frontend-from.hbc-customized-form *,
html body .tfhb-frontend-from.hbc-customized-form *::before,
html body .tfhb-frontend-from.hbc-customized-form *::after {
    box-sizing: border-box !important;
}

/* --- CONTENITORE FORM PRINCIPALE --- */
html body .tfhb-frontend-from.hbc-customized-form {
    width: 100% !important;
    max-width: var(--tfhb-form-max-width) !important;
    margin: var(--tfhb-form-margin) !important;
    background: #ffffff !important;
    padding: var(--tfhb-form-padding) !important;
    border-radius: var(--tfhb-radius) !important;
    box-shadow: var(--tfhb-shadow-lg) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    display: block !important;
}

/* --- GRIGLIA DIMEZZATA DINAMICA --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-wrap {
    display: grid !important;
    grid-template-columns: var(--tfhb-grid-columns) !important;
    gap: var(--tfhb-grid-gap) !important;
    width: 100% !important;
}

/* Struttura base dei singoli campi */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: block; /* Rimosso !important per consentire le animazioni fluide di jQuery (slideDown/slideUp) */
}

/* LARGHEZZA CAMPI DI BASE: 100% (occupa 2 colonne su desktop) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item {
    grid-column: var(--tfhb-span-2) !important;
}

/* CAMPI IMPOSTATI AL 50% DALL'UTENTE (classe .tfhb-field-half): occupano 1 sola colonna */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-field-half {
    grid-column: span 1 !important;
}

/* Forza l'invio a tutta larghezza (2 colonne) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-submit-wrapper {
    grid-column: var(--tfhb-span-2) !important;
}

/* Di default, i blocchi di checkbox/radio occupano tutta la larghezza (2 colonne) A MENO CHE non siano impostati al 50% (.tfhb-field-half) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-checkbox-group:not(.tfhb-field-half),
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-radio-group:not(.tfhb-field-half) {
    grid-column: var(--tfhb-span-2) !important;
}

/* --- ETICHETTE DEI CAMPI (LABELS) --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item > label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--tfhb-text-main) !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.2px !important;
    line-height: 1.5 !important;
    font-family: inherit !important;
}

/* Asterisco obbligatorio */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item > label .tfhb-required-asterisk {
    color: var(--tfhb-required-color) !important;
    margin-left: 4px !important;
    font-weight: bold !important;
}

/* --- INPUTS DI TESTO, MENU A TENDINA E TEXTAREA --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="text"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="email"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="tel"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="url"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner select,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner textarea {
    width: 100% !important;
    height: 46px !important;
    padding: 10px 16px !important;
    background: var(--tfhb-field-bg) !important;
    border: 1px solid var(--tfhb-border) !important;
    border-radius: var(--tfhb-radius-small) !important;
    font-size: 15px !important;
    color: var(--tfhb-text-main) !important;
    font-family: inherit !important;
    transition: var(--tfhb-transition) !important;
    box-shadow: none !important;
}

/* Personalizzazione per select */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* Personalizzazione per textarea */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner textarea {
    height: auto !important;
    min-height: 110px !important;
    resize: vertical !important;
}

/* Placeholder */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input::placeholder,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner textarea::placeholder {
    color: var(--tfhb-text-muted) !important;
    opacity: 0.8 !important;
}

/* Stato Hover */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="text"]:hover,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="email"]:hover,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="tel"]:hover,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="url"]:hover,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner select:hover,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner textarea:hover {
    border-color: var(--tfhb-border-hover) !important;
    background: var(--tfhb-field-bg-hover) !important;
}

/* Stato Focus */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="text"]:focus,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="email"]:focus,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="tel"]:focus,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner input[type="url"]:focus,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner select:focus,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner textarea:focus {
    border-color: var(--tfhb-primary) !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px var(--tfhb-primary-focus) !important;
}

/* --- TRASFORMAZIONE SELEZIONE MULTIPLA (CHECKBOX CARDS) --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Se l'elemento contiene checkbox, lo trasforma in griglia (selettore standard con fallback :has e classi JS per compatibilità totale) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner:has(input[type="checkbox"]),
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner:has(input[type="radio"]),
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-checkbox-group .tfhb-frontend-from__field-item__inner,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-radio-group .tfhb-frontend-from__field-item__inner {
    display: grid !important;
    grid-template-columns: var(--tfhb-checkbox-columns) !important;
    gap: 12px !important;
    margin-top: var(--tfhb-checkbox-margin-top) !important;
    background: var(--tfhb-checkbox-bg) !important;
    border: 1px solid var(--tfhb-checkbox-border) !important;
    border-radius: 12px !important;
    padding: var(--tfhb-checkbox-padding) !important;
}

/* NUOVO: Disposizione "Incolonnata (Lista / Singola colonna)" per le opzioni */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-layout-list .tfhb-frontend-from__field-item__inner {
    grid-template-columns: 1fr !important;
}

/* Stile per ciascuna card di opzione (etichetta che avvolge il checkbox) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    background: var(--tfhb-checkbox-card-bg) !important;
    border: 1px solid var(--tfhb-border) !important;
    border-radius: var(--tfhb-radius-small) !important;
    cursor: pointer !important;
    transition: var(--tfhb-transition) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: var(--tfhb-text-main) !important;
    font-weight: 500 !important;
    margin: 0 !important;
    user-select: none !important;
}

/* Hover sulle schede checkbox */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label:hover {
    border-color: var(--tfhb-border-hover) !important;
    background: var(--tfhb-field-bg-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--tfhb-shadow-sm) !important;
}

/* Scheda Checkbox Selezionata (attiva) usando :has() solo internamente all'elemento label */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label:has(input:checked) {
    border-color: var(--tfhb-primary) !important;
    background: var(--tfhb-primary-light) !important;
    box-shadow: 0 0 0 1px var(--tfhb-primary) !important;
}

/* --- NASCONDI CHECKBOX STANDARD E CREA SELETTORE CUSTOM --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="checkbox"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid var(--tfhb-border) !important;
    border-radius: 4px !important;
    outline: none !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    display: inline-grid !important;
    place-content: center !important;
    transition: var(--tfhb-transition) !important;
    flex-shrink: 0 !important;
    margin: 2px 0 0 0 !important;
}

/* Per radio, usa bordi tondi */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="radio"] {
    border-radius: 50% !important;
}

/* Segno di spunta elegante dentro il checkbox custom */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="checkbox"]::before {
    content: "" !important;
    width: 10px !important;
    height: 10px !important;
    transform: scale(0) !important;
    transition: 120ms transform cubic-bezier(0.4, 0, 0.2, 1) !important;
    background-color: var(--tfhb-primary) !important;
    transform-origin: center !important;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%) !important;
}

/* Pallino dentro il radio button custom */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="radio"]::before {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    transform: scale(0) !important;
    transition: 120ms transform cubic-bezier(0.4, 0, 0.2, 1) !important;
    background-color: var(--tfhb-primary) !important;
}

/* Stato del checkbox spuntato */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="checkbox"]:checked,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="radio"]:checked {
    border-color: var(--tfhb-primary) !important;
    background-color: #ffffff !important;
}

html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="checkbox"]:checked::before,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item__inner label input[type="radio"]:checked::before {
    transform: scale(1) !important;
}

/* --- PULSANTE DI INVIO (SUBMIT BUTTON) --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-submit-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: var(--tfhb-submit-align, flex-start) !important;
    justify-content: var(--tfhb-submit-align, flex-start) !important;
    margin-top: 16px !important;
    gap: 15px !important;
}

html body .tfhb-frontend-from.hbc-customized-form button[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    background: linear-gradient(135deg, var(--tfhb-primary) 0%, var(--tfhb-primary-hover) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: var(--tfhb-radius-small) !important;
    cursor: pointer !important;
    transition: var(--tfhb-transition) !important;
    box-shadow: 0 4px 14px rgba(37, 54, 136, 0.25) !important;
    margin: var(--tfhb-submit-margin) !important;
    width: var(--tfhb-submit-width) !important;
    min-width: 220px !important;
}

/* Hover sul pulsante */
html body .tfhb-frontend-from.hbc-customized-form button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 54, 136, 0.35) !important;
}

/* Clic sul pulsante */
html body .tfhb-frontend-from.hbc-customized-form button[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(37, 54, 136, 0.2) !important;
}

/* Micro-animazione per far scivolare l'icona freccia a destra al passaggio */
html body .tfhb-frontend-from.hbc-customized-form button[type="submit"] .tfhb-submit-icon svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
}

html body .tfhb-frontend-from.hbc-customized-form button[type="submit"]:hover .tfhb-submit-icon svg {
    transform: translateX(4px) !important;
}

/* --- 🚫 NASCONDI IL BLOCCO LOGIN/ACCEDI IN BASSO --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item--center {
    display: none !important;
}

/* --- 📝 DESCRIZIONE / SOTTOTITOLO DEI CAMPI (FRONTEND) --- */
/* Stile base comune delle descrizioni */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-field-description {
    font-size: 13px !important;
    color: var(--tfhb-text-muted) !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    display: block !important;
}

/* Sottotitolo posizionato in alto (solo per checkbox e radio) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-field-description.tfhb-field-description-top {
    margin-top: -2px !important; /* Compensa il margine inferiore del label */
    margin-bottom: 10px !important; /* Distanzia in modo calibrato le schede di opzione sottostanti */
}

/* Sottotitolo posizionato in basso (per tutti gli altri campi standard) */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-field-description.tfhb-field-description-bottom {
    margin-top: 6px !important; /* Spazio elegante tra l'input e il sottotitolo */
    margin-bottom: 0 !important;
}

/* --- 🏷️ SEZIONE SEPARATORE / TITOLO DI SEZIONE (FRONTEND) --- */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-section-heading-item {
    grid-column: var(--tfhb-span-2) !important; /* Occupa sempre l'intera larghezza della griglia */
    margin-top: 35px !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 12px !important;
}

/* Il primo separatore in cima al form non necessita di un margine superiore eccessivo */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-section-heading-item:first-child {
    margin-top: 10px !important;
}

.tfhb-section-heading-wrapper {
    width: 100% !important;
    display: block !important;
}

.tfhb-section-heading-wrapper .tfhb-section-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--tfhb-primary) !important; /* Blu del brand #253688 */
    margin: 0 0 6px 0 !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
}

.tfhb-section-heading-wrapper .tfhb-section-subtitle {
    font-size: 13px !important;
    color: var(--tfhb-text-muted) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
}

/* --- 👁️ LOGICA CONDIZIONALE (FRONTEND) --- */
/* Forza lo stato nascosto per i campi condizionali disattivati sovrascrivendo qualsiasi !important esterno o di layout */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-conditional-field.tfhb-conditional-hidden {
    display: none !important;
}

/* --- 🚫 CONTROLLI DI DISATTIVAZIONE E SCADENZA (SUBMIT DISABLING) --- */
/* Stile premium del pulsante di invio disabilitato */
html body .tfhb-frontend-from.hbc-customized-form button[type="submit"]:disabled,
html body .tfhb-frontend-from.hbc-customized-form button[type="submit"].tfhb-submit-disabled {
    background: #cbd5e1 !important;
    background-image: none !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.75 !important;
}

html body .tfhb-frontend-from.hbc-customized-form button[type="submit"]:disabled:hover,
html body .tfhb-frontend-from.hbc-customized-form button[type="submit"].tfhb-submit-disabled:hover {
    background: #cbd5e1 !important;
    color: #64748b !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Banner di avviso inline (mostrato sotto il pulsante disabilitato) */
.tfhb-disabled-message-inline {
    width: 100% !important;
    background: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
    border-radius: 6px !important;
    padding: 14px 18px !important;
    margin-top: 15px !important;
    margin-bottom: 0px !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.tfhb-disabled-message-inline .tfhb-disabled-icon {
    color: #ffb300 !important;
    flex-shrink: 0 !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

.tfhb-disabled-message-inline .tfhb-disabled-text {
    font-size: 14px !important;
    color: #b78103 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    font-family: inherit !important;
}

/* Scheda centrale a schermo intero (mostrata quando l'intero modulo è nascosto) */
.tfhb-disabled-card-full {
    width: 100% !important;
    max-width: 900px !important;
    margin: 40px auto !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 40px 30px !important;
    text-align: center !important;
    box-shadow: 0 10px 25px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02) !important;
    box-sizing: border-box !important;
}

.tfhb-disabled-card-full .tfhb-card-icon {
    font-size: 48px !important;
    margin-bottom: 20px !important;
    line-height: 1 !important;
    display: block !important;
    color: #cbd5e1 !important;
}

.tfhb-disabled-card-full .tfhb-card-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 12px 0 !important;
    font-family: inherit !important;
}

.tfhb-disabled-card-full .tfhb-card-message {
    font-size: 15px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    font-family: inherit !important;
}

/* --- 🔴 VALIDAZIONE AVANZATA DEI CAMPI (FRONTEND VALIDATION) --- */
/* Bordo rosso per i campi in stato di errore */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active input[type="text"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active input[type="email"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active input[type="tel"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active input[type="url"],
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active textarea,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active select {
    border-color: #e63946 !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
}

/* Evidenziazione per gruppi checkbox e radio */
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active.tfhb-checkbox-group label,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active.tfhb-radio-group label {
    border-color: #fca5a5 !important;
}

html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active.tfhb-checkbox-group .tfhb-frontend-from__field-item__inner,
html body .tfhb-frontend-from.hbc-customized-form .tfhb-frontend-from__field-item.tfhb-custom-error-active.tfhb-radio-group .tfhb-frontend-from__field-item__inner {
    border: 1px solid #e63946 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
}

/* Stile del messaggio di errore in linea */
.tfhb-frontend-validation-error {
    color: #e63946 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-top: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    line-height: 1.4 !important;
    animation: tfhbErrorFadeIn 0.2s ease-out !important;
    font-family: inherit !important;
}

.tfhb-frontend-validation-error::before {
    content: "⚠️" !important;
    font-size: 14px !important;
}

@keyframes tfhbErrorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
