/* Centra il form e limita la larghezza */
form#bookingForm,
.modal-content form {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Scroll verticale se il modale è lungo */
.modal-content {
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: 16px;
}

.modal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: #222;
}

/* Messaggi di errore */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.92rem;
    margin-top: 0.4rem;
    text-align: center;
}

/* Evidenziazione dei campi errati */
input.error,
textarea.error,
select.error,
.form-row input.error,
.form-row select.error,
.form-row textarea.error {
    border: 2px solid #ef4444 !important;
    background-color: #ffe6e6 !important;
}

/* Feedback generale */
.feedback,
.form-feedback {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: red;
}

/* Layout dei campi */
.form-row,
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-row label,
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.3;
    background: #fff;
}

/* Box privacy leggibile */
.privacy-box {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    font-size: 0.95em;
    line-height: 1.4;
    text-align: justify;
}

/* Checkbox su una riga */
.privacy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    text-align: left;
}

/* ——————————————————————————————— */
/* Stile UNIVERSALE del checkbox */
/* ——————————————————————————————— */
.privacy-row input[type="checkbox"] {
    /* azzera gli stili nativi/Bootstrap */
    -webkit-appearance: none;
    appearance: none;
    outline: none;

    /* dimensioni e box */
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid #1e3a8a;
    /* bordo scuro coerente con l’immagine */
    border-radius: 6px;
    /* angoli arrotondati */
    background-color: #e6f0ff;
    /* azzurro chiaro coerente con l’immagine */
    position: relative;
    box-sizing: border-box;

    /* evita shrink in layout stretti */
    flex-shrink: 0;
}

/* stato hover/focus (discreto, non invasivo) */
.privacy-row input[type="checkbox"]:hover {
    filter: brightness(0.98);
}

.privacy-row input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* Stato selezionato */
.privacy-row input[type="checkbox"]:checked {
    background-color: #0cc44a;
    border-color: #0cc44a;
}

/* Spunta centrata */
.privacy-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    display: none;
}

.privacy-row input[type="checkbox"]:checked::after {
    display: block;
    width: 6px;
    height: 12px;
    top: 1px;
    left: 6px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ----------------------------------------------------
   TESTI PRIVACY
---------------------------------------------------- */

.required {
    color: #c40000;
}

.privacy-title {
    font-weight: 600;
    margin-top: 0.8em;
}

.privacy-required {
    color: #c40000;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.privacy-required i {
    font-size: 1.1em;
}

.privacy-info {
    margin-top: 0.4em;
    line-height: 1.5;
}

.privacy-link {
    color: #c40000;
    text-decoration: underline;
    font-weight: 600;
}

.privacy-link:hover {
    color: #a00000;
}

.privacy-row {
    margin-top: 0.8em;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.6;
    font-weight: 500;
    color: #222;
    text-align: left;
}

/* Pulsanti */
.primary-btn,
.secondary-btn,
.form-buttons button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
}

.primary-btn {
    background-color: #007bff;
}

.secondary-btn {
    background-color: #888;
}

.form-buttons {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-buttons button {
    background-color: #2c7a2c;
}

.form-buttons button:hover {
    background-color: #256025;
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 0.5rem;
}

#error-privacy {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    color: red;
    font-size: 0.95rem;
}

/* ——————————————————————————————— */
/* Mobile: iPhone verticale (layout-only, NON tocca i colori del check) */
/* ——————————————————————————————— */
@media screen and (max-width: 600px) {
    .form-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .form-buttons button {
        width: 100%;
        max-width: 320px;
    }

    .privacy-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
        padding: 0 1rem;
        max-width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
    }

    .privacy-row label {
        flex: 1;
        min-width: 0;
        font-size: 0.95rem;
        line-height: 1.45;
        font-weight: bold;
        text-align: left;
        word-break: break-word;
        max-width: calc(100% - 30px);
        box-sizing: border-box;
    }
}

/* ——————————————————————————————— */
/* Stile premium coerente con il coupon */
/* ——————————————————————————————— */

/* Contenitore principale del form */
form#bookingForm {
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    max-width: none;
}

/* Titolo del modale */
.modal-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #7b0046;
    /* rosa scuro Le Rêve */
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Etichette */
.form-group label {
    color: #7b0046;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

/* Campi input */
.form-group input,
.form-group select,
.form-group textarea {
    border: 2px solid #006633;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #7b0046;
    box-shadow: 0 0 6px rgba(123, 0, 70, 0.2);
    outline: none;
}

/* Divider */
.divider-corso {
    border: none;
    border-top: 1px solid #7b0046;
    margin: 1rem 0;
}

/* Privacy box */
.privacy-box {
    border: 2px solid #006633;
    border-radius: 10px;
    background: #f9f9f9;
    padding: 1rem 1.2rem;
    margin-top: 1.5rem;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.05);
}

.privacy-box p {
    font-family: "Quicksand", sans-serif;
    line-height: 1.6;
}

/* Pulsanti */
.form-buttons button {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    transition: all 0.2s ease-in-out;
}

.primary-btn {
    background-color: #006633;
    box-shadow: 0 4px 0 #004d26;
}

.primary-btn:hover {
    background-color: #008040;
    box-shadow: 0 4px 0 #00592e;
}

.secondary-btn {
    background-color: #7b0046;
    box-shadow: 0 4px 0 #5a0033;
}

.secondary-btn:hover {
    background-color: #9b0058;
    box-shadow: 0 4px 0 #6a003f;
}

/* Feedback */
.feedback {
    color: #7b0046;
    font-weight: 600;
    margin-top: 1rem;
}

/* Ombra generale del modale */
.modal-content {
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

/* ——————————————————————————————— */
/* DISTACCO DALLA NAVBAR */
/* ——————————————————————————————— */
.modal-content {
    margin-top: 80px;
    /* distacco visivo dalla navbar */
}

/* ——————————————————————————————— */
/* EVIDENZIAZIONE CAMPI VUOTI */
/* ——————————————————————————————— */
input.error,
select.error,
textarea.error {
    border: 2px solid #7b0046 !important;
    /* rosa scuro Le Rêve */
    background-color: #fff0f0 !important;
    /* rosa chiaro */
    box-shadow: 0 0 6px rgba(123, 0, 70, 0.2);
}

/* Messaggi di errore sotto ogni campo */
.error-message {
    display: block;
    color: #7b0046;
    font-size: 0.95rem;
    margin-top: 0.3rem;
    text-align: left;
    font-weight: 500;
}

/* Feedback generale sotto i pulsanti */
.form-feedback {
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
    color: #7b0046;
}

/* Pulsanti coerenti con coupon */
.form-buttons button {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    transition: all 0.2s ease-in-out;
}

.primary-btn {
    background-color: #006633;
    box-shadow: 0 4px 0 #004d26;
}

.primary-btn:hover {
    background-color: #008040;
    box-shadow: 0 4px 0 #00592e;
}

.secondary-btn {
    background-color: #7b0046;
    box-shadow: 0 4px 0 #5a0033;
}

.secondary-btn:hover {
    background-color: #9b0058;
    box-shadow: 0 4px 0 #6a003f;
}


.pagina-conferma {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    background: linear-gradient(180deg, #fff 0%, #f9f9f9 100%);
}

.conferma-box {
    text-align: center;
    background: #ffffff;
    border: 2px solid #006633;
    border-radius: 12px;
    padding: 2rem 3rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    max-width: 600px;
}

.conferma-box h1 {
    color: #7b0046;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.conferma-box p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.btn-home {
    display: inline-block;
    margin-top: 1.5rem;
    background-color: #006633;
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 0 #004d26;
    transition: all 0.2s ease-in-out;
}

.btn-home:hover {
    background-color: #008040;
    box-shadow: 0 4px 0 #00592e;
}

/* ——————————————————————————————— */
/* iPhone landscape (layout-only) */
/* ——————————————————————————————— */
@media screen and (max-width: 812px) and (orientation: landscape) {

    .privacy-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 1rem !important;
        overflow-x: hidden !important;
        min-height: 32px;
    }

    .privacy-row label {
        flex: 1;
        min-width: 0;
        font-size: 16px;
        line-height: 1.4;
        word-break: break-word;
        max-width: calc(100% - 34px);
        box-sizing: border-box;
    }

    /* FIX DEFINITIVO: distacco dalla navbar */
    #bookingModal {
        padding-top: 80px !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    /* Mantiene proporzioni identiche al coupon */
    #bookingModal .modal-content {
        width: min(480px, 92vw) !important;
        max-width: min(480px, 92vw) !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        padding: 45px !important;
        border: 3px solid #0a7a2f !important;
        border-radius: 14px !important;
        box-shadow: 0 8px 28px rgba(0, 80, 20, 0.35) !important;
    }

    /* Il form non deve restringere il contenitore */
    #bookingForm {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
}

/* ——————————————————————————————— */
/* iPad verticale e orizzontale (layout-only) */
/* ——————————————————————————————— */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    .privacy-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 1rem !important;
        overflow-x: hidden !important;
        min-height: 32px;
    }

    .privacy-row label {
        flex: 1;
        min-width: 0;
        font-size: 16px;
        line-height: 1.4;
        word-break: break-word;
        max-width: calc(100% - 34px);
        box-sizing: border-box;
    }

    /* Mantiene proporzioni identiche al coupon */
    #bookingModal .modal-content {
        width: min(480px, 92vw) !important;
        max-width: min(480px, 92vw) !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
}

/* ——————————————————————————————— */
/* Mobile verticale (VE) */
/* ——————————————————————————————— */
@media screen and (max-width: 600px) and (orientation: portrait) {

    #bookingModal .modal-content {
        width: 96vw !important;
        /* più largo */
        padding: 32px !important;
        /* leggermente ridotto */
    }
}