/* JetForm Popup Styles - Design Français */
.jetform-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.jetform-popup-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 900px; /* Popup più largo per form multi-step */
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.jetform-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.jetform-popup-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #000000;
}

.jetform-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #666666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jetform-popup-close:hover {
    background-color: #f5f5f5;
    color: #000000;
}

.jetform-popup-close svg {
    width: 20px;
    height: 20px;
}

.jetform-popup-body {
    padding: 24px;
    background: #ffffff;
}

/* Nascondi la barra di step superiore */
.jetform-popup-body .jet-form-builder-progress-pages {
    display: none !important;
}

/* Nascondi la progress bar dal body (spostata nell'header) */
.jetform-popup-body::before,
.jetform-popup-body::after {
    display: none;
}

/* Progress bar personalizzata elegante nell'header */
.jetform-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e5e5e5 0%, #e5e5e5 100%);
    border-radius: 12px 12px 0 0;
}

.jetform-popup-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #3EC9F3, #A31798, #3EC9F3, #A31798);
    background-size: 300% 100%;
    border-radius: 12px 12px 0 0;
    transition: width 0.3s ease;
    width: 0%;
    animation: gradientMove 8s ease-in-out infinite alternate;
}

/* Progress bar per step 1 - quando il form è attivo */
.jetform-container.active ~ .jetform-popup-content .jetform-popup-header::after,
.jetform-container.active .jetform-popup-content .jetform-popup-header::after {
    width: 25%;
}

/* Progress bar per step 2 - quando il body ha data-current-step="2" */
.jetform-popup-content:has(.jetform-popup-body[data-current-step="2"]) .jetform-popup-header::after {
    width: 50%;
}

/* Progress bar per step 3 - quando il body ha data-current-step="3" */
.jetform-popup-content:has(.jetform-popup-body[data-current-step="3"]) .jetform-popup-header::after {
    width: 75%;
}

/* Progress bar per step 4 - quando il body ha data-current-step="4" */
.jetform-popup-content:has(.jetform-popup-body[data-current-step="4"]) .jetform-popup-header::after {
    width: 100%;
}

/* Stili per il form JetFormBuilder */
.jetform-popup-body .jet-form-builder {
    margin: 0;
    position: relative;
    overflow: hidden; /* Nasconde le pagine fuori dal viewport */
}

/* Container per le pagine con transizioni */
.jetform-popup-body .jet-form-builder-pages-container {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

/* Stili base per le pagine */
.jetform-popup-body .jet-form-builder-page {
    transition: none; /* Disabilita le transizioni CSS per usare GSAP */
    will-change: transform, opacity; /* Ottimizza le performance */
}

/* Pagina nascosta */
.jetform-popup-body .jet-form-builder-page--hidden {
    display: none;
}

/* Pagina attiva */
.jetform-popup-body .jet-form-builder-page:not(.jet-form-builder-page--hidden) {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

/* Nascondi tutti gli elementi prima dell'animazione */
.jetform-popup-body .jet-form-builder-page .jet-form-builder-row,
.jetform-popup-body .jet-form-builder-page .jet-form-builder__next-page-wrap,
.jetform-popup-body .jet-form-builder-page .wp-block-uagb-info-box,
.jetform-popup-body .jet-form-builder-page fieldset {
    opacity: 0;
}

/* Mostra gli elementi dopo che sono stati animati */
.jetform-popup-body .jet-form-builder-page .jet-form-builder-row.animated,
.jetform-popup-body .jet-form-builder-page .jet-form-builder__next-page-wrap.animated,
.jetform-popup-body .jet-form-builder-page .wp-block-uagb-info-box.animated,
.jetform-popup-body .jet-form-builder-page fieldset.animated {
    opacity: 1;
}

/* Nascondi anche checkbox e radio prima dell'animazione */
.jetform-popup-body .jet-form-builder-page .jet-form-builder__field-label {
    opacity: 0;
}

.jetform-popup-body .jet-form-builder-page .jet-form-builder__field-label.animated {
    opacity: 1;
}

.jetform-popup-body .jet-form-builder fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.jetform-popup-body .jet-form-builder .jet-form-builder__field {
    margin-bottom: 20px;
}

/* Container per floating label effect */
.jetform-popup-body .jet-form-builder-row {
    position: relative;
    margin-bottom: 40px;
    margin-top: 40px;
    will-change: transform, opacity; /* Ottimizza le animazioni */
}
.wp-block-column.is-layout-flow.wp-block-column-is-layout-flow .jet-form-builder-row.field-type-text-field, .wp-block-column.is-layout-flow.wp-block-column-is-layout-flow .jet-form-builder-row.field-type-number-field, .wp-block-column.is-layout-flow.wp-block-column-is-layout-flow .jet-form-builder-row.field-type-date-field {
    margin-top: 10px !important;
    margin-bottom: 5px !important;
}

/* Nascondi il placeholder del campo date finché non è in focus */
.jetform-popup-body input[type="date"]:not(:focus):not([value])::-webkit-datetime-edit {
    color: transparent;
}

.jetform-popup-body input[type="date"]:not(:focus):not([value])::-webkit-calendar-picker-indicator {
    opacity: 0.3;
}

/* Mostra il placeholder quando il campo è in focus o ha un valore */
.jetform-popup-body input[type="date"]:focus::-webkit-datetime-edit,
.jetform-popup-body input[type="date"][value]::-webkit-datetime-edit {
    color: #000;
}

.jetform-popup-body input[type="date"]:focus::-webkit-calendar-picker-indicator,
.jetform-popup-body input[type="date"][value]::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Label con effetto floating per campi text */
.jetform-popup-body .field-type-text-field .jet-form-builder__label-text,
.jetform-popup-body .field-type-email-field .jet-form-builder__label-text,
.jetform-popup-body .field-type-tel-field .jet-form-builder__label-text,
.jetform-popup-body .field-type-number-field .jet-form-builder__label-text,
.jetform-popup-body .field-type-date-field .jet-form-builder__label-text {
    position: absolute !important;
    left: 17px;
    top: 23px;
    font-size: 16px;
    color: #666666;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 400;
    background: transparent;
    z-index: 1;
    line-height: 1;
    display: inline-block !important;
    margin-bottom: 0 !important;
}

/* Label dentro le colonne con il wrapper del bordo */
.jetform-popup-body .wp-block-column .jet-form-builder-row .jet-form-builder__label-text {
    left: 19px;
    top: 25px;
}

/* Label attivo (quando input ha focus o è compilato) */
.jetform-popup-body .field-type-text-field .jet-form-builder__label-text.active,
.jetform-popup-body .field-type-email-field .jet-form-builder__label-text.active,
.jetform-popup-body .field-type-tel-field .jet-form-builder__label-text.active,
.jetform-popup-body .field-type-number-field .jet-form-builder__label-text.active,
.jetform-popup-body .field-type-date-field .jet-form-builder__label-text.active {
    top: 10px !important;
    left: 20px;
    font-size: 12px;
    color: #000000;
    font-weight: 600;
}

/* Input con stile moderno - wrapper per il bordo con sfumatura */
.jetform-popup-body .jet-form-builder__field-wrap,
.jetform-popup-body .wp-block-column .jet-form-builder-row {
    position: relative;
    border-radius: 12px;
    background: linear-gradient(90deg, #3EC9F3, #A31798, #3EC9F3, #A31798);
    background-size: 300% 100%;
    padding: 2px;
    animation: gradientMove 8s ease-in-out infinite alternate;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Input con stile minimalista */
.jetform-popup-body .jet-form-builder input[type="text"],
.jetform-popup-body .jet-form-builder input[type="email"],
.jetform-popup-body .jet-form-builder input[type="tel"],
.jetform-popup-body .jet-form-builder input[type="number"],
.jetform-popup-body .jet-form-builder input[type="date"],
.jetform-popup-body .jet-form-builder textarea,
.jetform-popup-body .jet-form-builder select {
    width: 100%;
    height: 56px;
    padding: 20px 15px 10px 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #000000;
    box-sizing: border-box;
    line-height: 1.5;
    outline: none;
    position: relative;
}

/* Input dentro le colonne - assicura che coprano il gradiente del wrapper */
.jetform-popup-body .wp-block-column .jet-form-builder-row input[type="text"],
.jetform-popup-body .wp-block-column .jet-form-builder-row input[type="email"],
.jetform-popup-body .wp-block-column .jet-form-builder-row input[type="tel"],
.jetform-popup-body .wp-block-column .jet-form-builder-row input[type="number"],
.jetform-popup-body .wp-block-column .jet-form-builder-row input[type="date"],
.jetform-popup-body .wp-block-column .jet-form-builder-row textarea,
.jetform-popup-body .wp-block-column .jet-form-builder-row select {
    border-radius: 10px;
}


/* Altezza speciale per textarea */
.jetform-popup-body .jet-form-builder textarea {
    height: 120px;
    resize: vertical;
    min-height: 120px;
}

.jetform-popup-body .jet-form-builder input[type="text"]:focus,
.jetform-popup-body .jet-form-builder input[type="email"]:focus,
.jetform-popup-body .jet-form-builder input[type="tel"]:focus,
.jetform-popup-body .jet-form-builder input[type="number"]:focus,
.jetform-popup-body .jet-form-builder input[type="date"]:focus,
.jetform-popup-body .jet-form-builder textarea:focus,
.jetform-popup-body .jet-form-builder select:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(62, 201, 243, 0.2);
    transform: translateY(-1px);
}

.jetform-popup-body .jet-form-builder textarea {
    min-height: 120px;
    resize: vertical;
}

.jetform-popup-body .jet-form-builder .jet-form-builder__submit {
    position: relative;
    background: linear-gradient(90deg, #3EC9F3, #A31798, #3EC9F3, #A31798);
    background-size: 300% 100%;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: gradientMove 8s ease-in-out infinite alternate;
    box-shadow: 0 4px 15px rgba(62, 201, 243, 0.3);
}

.jetform-popup-body .jet-form-builder .jet-form-builder__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 23, 152, 0.4);
}

/* Stili specifici per il form francese */
.jetform-popup-body .jet-form-builder-row {
    margin-bottom: 32px;
    position: relative;
}

/* Stili per label che NON sono floating (checkbox, radio, etc) */
.jetform-popup-body .field-type-checkbox-field .jet-form-builder__label-text,
.jetform-popup-body .field-type-radio-field .jet-form-builder__label-text {
    font-weight: 600;
    color: #000000;
    font-size: 16px;
    margin-bottom: 12px;
    display: block;
    line-height: 1.4;
    position: static;
}

/* Migliora la spaziatura delle colonne */
.jetform-popup-body .wp-block-columns {
    gap: 24px;
    margin-bottom: 0;
}

.jetform-popup-body .wp-block-column {
    flex: 1;
    min-width: 0;
}

.jetform-popup-body .jet-form-builder__required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 4px;
}

/* Stili per checkbox e radio */
.jetform-popup-body .checkradio-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jetform-popup-body .jet-form-builder__field-label {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 20px 24px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #ffffff;
    min-height: 56px; /* Stessa altezza degli input */
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    will-change: transform, opacity; /* Ottimizza le animazioni */
}

.jetform-popup-body .jet-form-builder__field-label:hover {
    border-color: #000000;
    background: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.jetform-popup-body .jet-form-builder__field-label input[type="checkbox"],
.jetform-popup-body .jet-form-builder__field-label input[type="radio"] {
    margin: 0;
    width: 20px;
    height: 20px;
    accent-color: #000000;
    flex-shrink: 0;
}

/* Stile per elementi selezionati */
.jetform-popup-body .jet-form-builder__field-label:has(input:checked) {
    border-color: #000000;
    background: #f0f0f0;
    font-weight: 600;
}

/* Stile per span del testo */
.jetform-popup-body .jet-form-builder__field-label span {
    flex: 1;
    line-height: 1.4;
}

/* Riordina elementi fieldset: label, descrizione, checkbox */
.jetform-popup-body .jet-form-builder-row.field-type-radio-field {
    display: flex;
    flex-direction: column;
}

.jetform-popup-body .jet-form-builder-row.field-type-radio-field .jet-form-builder__label {
    order: 1;
}

.jetform-popup-body .jet-form-builder-row.field-type-radio-field .jet-form-builder__desc {
    order: 2;
    margin-top: 25px;
    margin-bottom: 16px;
}

.jetform-popup-body .jet-form-builder-row.field-type-radio-field .jet-form-builder__fields-group {
    order: 3;
}

/* Pulsante AVANTI azzurro */
.jetform-popup-body .jet-form-builder__next-page {
    position: relative;
    background: #3EC9F3;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 8px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(62, 201, 243, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jetform-popup-body .jet-form-builder__next-page:hover {
    background: #2BB5DB;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 201, 243, 0.5);
}

/* Pulsante AVANTI disabilitato (grigio) quando i campi obbligatori non sono compilati */
.jetform-popup-body .jet-form-builder__next-page:disabled,
.jetform-popup-body .jet-form-builder__next-page.disabled {
    background: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
    box-shadow: none !important;
}

.jetform-popup-body .jet-form-builder__next-page:disabled:hover,
.jetform-popup-body .jet-form-builder__next-page.disabled:hover {
    background: #cccccc !important;
    color: #666666 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Pulsante INDIETRO minimalista */
.jetform-popup-body .jet-form-builder__prev-page {
    background: transparent;
    color: #666666;
    border: 2px solid #e5e5e5;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 8px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jetform-popup-body .jet-form-builder__prev-page:hover {
    border-color: #3EC9F3;
    color: #3EC9F3;
    background: rgba(62, 201, 243, 0.05);
}

/* Stili per pulsanti disabilitati durante le animazioni */
.jetform-popup-body .jet-form-builder__next-page:disabled,
.jetform-popup-body .jet-form-builder__prev-page:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.jetform-popup-body .jet-form-builder__next-page:disabled:hover,
.jetform-popup-body .jet-form-builder__prev-page:disabled:hover {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #666666;
    transform: none;
}


.jetform-popup-body .jet-form-builder__next-page-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.jetform-popup-body .jet-form-builder__next-page-msg {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
}

/* Stili per la descrizione */
.jetform-popup-body .jet-form-builder__desc {
    margin-top: 20px;
    padding: 20px 24px;
    background: #f8f8f8;
    border-radius: 12px;
    border-left: 4px solid #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.jetform-popup-body .jet-form-builder__desc small {
    color: #666666;
    line-height: 1.6;
    font-size: 14px;
}

/* Migliora la tipografia generale */
.jetform-popup-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Stili per i placeholder */
.jetform-popup-body .jet-form-builder input::placeholder,
.jetform-popup-body .jet-form-builder textarea::placeholder {
    color: #999999;
    font-style: italic;
    font-size: 15px;
}

/* Stili per i messaggi di errore */
.jetform-popup-body .jet-form-builder__next-page-msg {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
    background: #ffeaea;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 16px;
}

/* Messaggio di validazione personalizzato sotto l'input */
.jetform-custom-error {
    display: none;
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffeaea;
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
    animation: slideDown 0.3s ease;
}

.jetform-custom-error.show {
    display: block;
}

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

/* Input con errore - bordo rosso */
.jetform-popup-body .jet-form-builder__field-wrap.has-error,
.jetform-popup-body .wp-block-column .jet-form-builder-row.has-error {
    background: linear-gradient(90deg, #e74c3c, #c0392b, #e74c3c, #c0392b);
    background-size: 300% 100%;
    animation: gradientMove 8s ease-in-out infinite alternate;
}

/* Stili per l'info box */
.jetform-popup-body .uagb-ifb-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e5e5;
    margin-bottom: 24px;
}

.jetform-popup-body .uagb-ifb-title {
    color: #000000;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.jetform-popup-body .uagb-ifb-desc {
    color: #666666;
    line-height: 1.7;
    font-size: 15px;
}

/* Stili per il campo "Autre" personalizzato */
.autre-custom-input {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.autre-custom-input::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000 0%, #333333 100%);
    border-radius: 12px 12px 0 0;
}

.autre-custom-input .jet-form-builder__label-text {
    color: #000000;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
    display: block;
}

.autre-custom-input .autre-text-input {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.autre-custom-input .autre-text-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    outline: none;
}

.autre-custom-input .autre-text-input::placeholder {
    color: #999999;
    font-style: italic;
    font-size: 14px;
}

/* Animazione per l'apertura del campo */
.autre-custom-input.slide-down {
    animation: slideDown 0.3s ease-out;
}

.autre-custom-input.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
}

/* Stile per il checkbox "Autre" quando è selezionato */
.jetform-popup-body .jet-form-builder__field-label:has(input[value="Autre"]:checked) {
    border-color: #000000;
    background: #f0f0f0;
    font-weight: 600;
}

/* Stile per il checkbox "Autre" quando è selezionato e ha un valore personalizzato */
.jetform-popup-body .jet-form-builder__field-label:has(input[value="Autre"]:checked) + .autre-custom-input {
    border-color: #000000;
    background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .jetform-popup-overlay {
        padding: 10px;
    }
    
    .jetform-popup-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .jetform-popup-header {
        padding: 16px 20px;
        border-radius: 8px 8px 0 0;
    }
    
    .jetform-popup-header::before,
    .jetform-popup-header::after {
        border-radius: 8px 8px 0 0;
    }
    
    .jetform-popup-header h3 {
        font-size: 20px;
    }
    
    .jetform-popup-body {
        padding: 20px;
    }
    
    /* Input più piccoli su mobile */
    .jetform-popup-body .jet-form-builder input[type="text"],
    .jetform-popup-body .jet-form-builder input[type="email"],
    .jetform-popup-body .jet-form-builder input[type="tel"],
    .jetform-popup-body .jet-form-builder input[type="number"],
    .jetform-popup-body .jet-form-builder input[type="date"],
    .jetform-popup-body .jet-form-builder textarea,
    .jetform-popup-body .jet-form-builder select {
        height: 70px;
        padding: 20px 16px;
        font-size: 16px; /* Previene zoom su iOS */
    }
    
    /* Input specifico con larghezza 140px su mobile */
    #combien_de_personnes_managez_vous_copy {
        height: 140px !important;
    }
    
    .jetform-popup-body .jet-form-builder__field-label {
        padding: 16px 20px;
        min-height: 48px;
        font-size: 15px;
    }
    
    .jetform-popup-body .jet-form-builder__next-page,
    .jetform-popup-body .jet-form-builder__prev-page {
        padding: 12px 24px;
        min-height: 48px;
        font-size: 15px;
    }
    
    .jetform-popup-body .jet-form-builder .jet-form-builder__submit {
        min-height: 48px;
        font-size: 16px;
    }
    
    /* Colonne su una riga su mobile */
    .jetform-popup-body .wp-block-columns {
        flex-direction: column;
        gap: 16px;
    }
    
    /* Campo Autre su mobile */
    .autre-custom-input {
        padding: 16px 20px;
        margin-top: 12px;
    }
    
    .autre-custom-input .autre-text-input {
        padding: 10px 14px;
        font-size: 16px; /* Previene zoom su iOS */
    }
}

/* Animazioni */
.jetform-popup-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.jetform-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.jetform-popup-content {
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.jetform-popup-overlay.active .jetform-popup-content {
    transform: scale(1) translateY(0);
}

/* Icona del form con sfumatura */
.jetform-popup-body .uagb-ifb-icon-wrap {
    width: 50px;
    height: 40px;
    display: inline-block;
    position: relative;
}

.jetform-popup-body .uagb-ifb-icon-wrap svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Applica la sfumatura usando mask e background gradient */
.jetform-popup-body .uagb-ifb-icon-wrap {
    background: linear-gradient(90deg, #3EC9F3 0%, #A31798 100%);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M488 191.1h-152l.0001 51.86c.0001 37.66-27.08 72-64.55 75.77c-43.09 4.333-79.45-29.42-79.45-71.63V126.4l-24.51 14.73C123.2 167.8 96.04 215.7 96.04 267.5L16.04 313.8c-15.25 8.751-20.63 28.38-11.75 43.63l80 138.6c8.875 15.25 28.5 20.5 43.75 11.75l103.4-59.75h136.6c35.25 0 64-28.75 64-64c26.51 0 48-21.49 48-48V288h8c13.25 0 24-10.75 24-24l.0001-48C512 202.7 501.3 191.1 488 191.1zM635.7 154.5l-79.95-138.6c-8.875-15.25-28.5-20.5-43.75-11.75l-103.4 59.75h-62.57c-37.85 0-74.93 10.61-107.1 30.63C229.7 100.4 224 110.6 224 121.6l-.0004 126.4c0 22.13 17.88 40 40 40c22.13 0 40-17.88 40-40V159.1h184c30.93 0 56 25.07 56 56v28.5l80-46.25C639.3 189.4 644.5 169.8 635.7 154.5z"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M488 191.1h-152l.0001 51.86c.0001 37.66-27.08 72-64.55 75.77c-43.09 4.333-79.45-29.42-79.45-71.63V126.4l-24.51 14.73C123.2 167.8 96.04 215.7 96.04 267.5L16.04 313.8c-15.25 8.751-20.63 28.38-11.75 43.63l80 138.6c8.875 15.25 28.5 20.5 43.75 11.75l103.4-59.75h136.6c35.25 0 64-28.75 64-64c26.51 0 48-21.49 48-48V288h8c13.25 0 24-10.75 24-24l.0001-48C512 202.7 501.3 191.1 488 191.1zM635.7 154.5l-79.95-138.6c-8.875-15.25-28.5-20.5-43.75-11.75l-103.4 59.75h-62.57c-37.85 0-74.93 10.61-107.1 30.63C229.7 100.4 224 110.6 224 121.6l-.0004 126.4c0 22.13 17.88 40 40 40c22.13 0 40-17.88 40-40V159.1h184c30.93 0 56 25.07 56 56v28.5l80-46.25C639.3 189.4 644.5 169.8 635.7 154.5z"/></svg>') center / contain no-repeat;
}

/* Nascondi l'SVG originale e usa solo il background con sfumatura */
.jetform-popup-body .uagb-ifb-icon-wrap svg {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* Colore del titolo "Qu'est-ce que la Communauté?" */
.jetform-popup-body .uagb-ifb-title {
    color: #3EC9F3 !important;
}

/*jeft form desc*/
.jet-form-builder__desc {
    margin-top: 0px !important;
    box-shadow: none !important;
    background: none !important;
    border-left: none !important;
    padding: 0px 24px !important;
}
legend.jet-form-builder__label {
    margin-bottom: 0px;
}

/* ========================================
   SCHERMATA VERIFICA MANAGER
   ======================================== */

.manager-check-screen,
.non-manager-screen,
.jetform-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.manager-check-screen.active,
.non-manager-screen.active,
.jetform-container.active {
    display: block;
    opacity: 1;
}

/* Rimuovi overflow hidden dal body del popup per permettere scroll se necessario */
.jetform-popup-body {
    position: relative;
    min-height: 400px;
}

.manager-check-content {
    text-align: center;
    padding: 60px 30px;
    max-width: 600px;
    margin: 0 auto;
}

.manager-check-content h2 {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: bold;
    color: #333333;
    background: linear-gradient(90deg, #3EC9F3 0%, #A31798 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.manager-check-content p {
    margin: 0 0 40px 0;
    font-size: 18px;
    color: #666666;
    line-height: 1.6;
}

.manager-check-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.manager-check-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px 60px;
    border: 3px solid #e5e5e5;
    border-radius: 16px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.manager-check-btn svg {
    transition: all 0.3s ease;
}

.manager-check-btn span {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    transition: all 0.3s ease;
}

.manager-check-btn path {
    color: #e5e5e5;
}

.manager-check-yes:hover {
    border-color: #3EC9F3;
    background: rgba(62, 201, 243, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(62, 201, 243, 0.2);
}

.manager-check-yes:hover path {
    stroke: #3EC9F3;
}

.manager-check-yes:hover span {
    color: #3EC9F3;
}

.manager-check-no:hover {
    border-color: #A31798;
    background: rgba(163, 23, 152, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(163, 23, 152, 0.2);
}

.manager-check-no:hover path {
    stroke: #A31798;
}

.manager-check-no:hover span {
    color: #A31798;
}

/* Schermata rifiuto non-manager */
.non-manager-content {
    text-align: center;
    padding: 60px 30px;
    max-width: 600px;
    margin: 0 auto;
}

.non-manager-icon {
    margin-bottom: 30px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.non-manager-content h2 {
    margin: 0 0 20px 0;
    font-size: 36px;
    font-weight: bold;
    color: #A31798;
}

.non-manager-content p {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333333;
    line-height: 1.6;
}

.non-manager-subtitle {
    font-size: 16px !important;
    color: #666666 !important;
    margin-bottom: 40px !important;
}

.non-manager-close {
    padding: 14px 40px;
    background: linear-gradient(90deg, #3EC9F3 0%, #A31798 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.non-manager-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 201, 243, 0.4);
}

/* Animazione slide */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.slide-in {
    animation: slideInFromRight 0.5s ease forwards;
}

.slide-out {
    animation: slideOutToLeft 0.5s ease forwards;
}

/* Responsive per la schermata manager check */
@media (max-width: 768px) {
    .manager-check-content {
        padding: 40px 20px;
    }
    
    .manager-check-content h2 {
        font-size: 26px;
    }
    
    .manager-check-content p {
        font-size: 16px;
    }
    
    .manager-check-options {
        flex-direction: column;
        gap: 20px;
    }
    
    .manager-check-btn {
        width: 100%;
        padding: 30px 40px;
    }
    
    .non-manager-content {
        padding: 40px 20px;
    }
    
    .non-manager-content h2 {
        font-size: 28px;
    }
    
    .non-manager-icon svg {
        width: 60px;
        height: 60px;
    }
}

/* ========================================
   ANIMAZIONE LETTERA SUCCESSO INVIO
   ======================================== */

.jetform-success-animation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.jetform-success-animation.show {
    display: flex;
}

.letter-image {
    position: relative;
    width: 200px;
    height: 200px;
    cursor: pointer;
    animation: letterBounce 2s ease-in-out infinite;
}

@keyframes letterBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animated-mail {
    position: absolute;
    height: 150px;
    width: 200px;
    transition: .4s;
}

.animated-mail .body {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 100px 200px;
    border-color: transparent transparent #3EC9F3 transparent;
    z-index: 2;
}

.animated-mail .top-fold {
    position: absolute;
    top: 50px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 100px 0 100px;
    transform-origin: 50% 0%;
    transition: transform .4s .4s, z-index .2s .4s;
    border-color: #2BB5DB transparent transparent transparent;
    z-index: 2;
}

.animated-mail .back-fold {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 100px;
    background: #2BB5DB;
    z-index: 0;
}

.animated-mail .left-fold {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 0 50px 100px;
    border-color: transparent transparent transparent #3EC9F3;
    z-index: 2;
}

.animated-mail .letter {
    left: 20px;
    bottom: 0px;
    position: absolute;
    width: 160px;
    height: 60px;
    background: white;
    z-index: 1;
    overflow: hidden;
    transition: .4s .2s;
}

.animated-mail .letter .letter-border {
    height: 10px;
    width: 100%;
    background: repeating-linear-gradient(
        -45deg,
        #3EC9F3,
        #3EC9F3 8px,
        transparent 8px,
        transparent 18px
    );
}

.animated-mail .letter .letter-title {
    margin-top: 10px;
    margin-left: 5px;
    height: 10px;
    width: 40%;
    background: #3EC9F3;
}

.animated-mail .letter .letter-context {
    margin-top: 10px;
    margin-left: 5px;
    height: 10px;
    width: 20%;
    background: #3EC9F3;
}

.animated-mail .letter .letter-stamp {
    margin-top: 30px;
    margin-left: 120px;
    border-radius: 100%;
    height: 30px;
    width: 30px;
    background: #A31798;
    opacity: 0.3;
}

.letter-shadow {
    position: absolute;
    top: 200px;
    left: 50%;
    width: 400px;
    height: 30px;
    transition: .4s;
    transform: translateX(-50%);
    border-radius: 100%;
    background: radial-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.0), rgba(0,0,0,0.0));
}

/* Animazione apertura automatica */
.letter-image.open .animated-mail {
    transform: translateY(50px);
}

.letter-image.open .animated-mail .top-fold {
    transition: transform .4s, z-index .2s;
    transform: rotateX(180deg);
    z-index: 0;
}

.letter-image.open .animated-mail .letter {
    height: 180px;
}

.letter-image.open .letter-shadow {
    width: 250px;
}

/* Messaggio di successo */
.jetform-success-message {
    margin-top: 40px;
    text-align: center;
    color: #ffffff;
}

.jetform-success-message h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(90deg, #3EC9F3 0%, #A31798 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jetform-success-message p {
    margin: 10px 0;
    font-size: 18px;
    color: #cccccc;
    line-height: 1.6;
}

.jetform-success-close {
    margin-top: 30px;
    padding: 12px 30px;
    background: linear-gradient(90deg, #3EC9F3 0%, #A31798 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jetform-success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 201, 243, 0.4);
}