/* ! body */
body {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* =========================
   LAYOUT
========================= */

main {
    padding-top: 65px;
    display: flex;
    width: 100%;
    min-height: 110vh;
    position: relative;
}

/* =========================
   FORM SIDE
========================= */

#form-container {
    width: 100%;
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

#form-container h2 {
    margin: 0 auto;
    text-align: center;
    color: var(--black-premium);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

#form-container p.sottotitolo {
    color: var(--black-soft);
    font-size: 15px;
    max-width: 420px;
    margin-bottom: 24px;
    text-align: center;
}

/* =========================
   FORM
========================= */

#formPrenotazione {
    max-width: 1250px;
    min-width: 500px;
    width: 28%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#formPrenotazione .cta {
    margin: 0 auto;
}

/* =========================
   CAMPO + FLOAT LABEL
========================= */

.campo {
    position: relative;
}

.label-style {
    width: 100%;
    padding: 24px 16px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: var(--white-premium);
    color: var(--black-premium);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.campo label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--gray-medium);
    pointer-events: none;
    transition: all 0.18s ease;
    padding: 0 4px;
}

.label-style:focus + label,
.label-style:not(:placeholder-shown) + label {
    top: 10px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 600;
    color: var(--blue-accent);
}

.label-style:hover {
    border-color: rgba(0, 0, 0, 0.375);
}

.label-style:focus {
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(var(--blue-accent-rgb), 0.15);
}

.label-style::placeholder {
    color: transparent;
}

.label-message {
    min-height: 130px;
    resize: none;
}

.label-message + label {
    top: 28px;
    transform: none;
}

/* =========================
   ERROR STATE
========================= */

.label-style.errore {
    border-color: var(--error-soft);
    background: rgba(var(--error-soft-rgb), 0.04);
    box-shadow: 0 0 0 3px rgba(var(--error-soft-rgb), 0.12);
}

.label-style.errore:focus,
.label-style.errore:hover {
    border-color: var(--blue-accent);
    background: var(--white-premium);
    box-shadow: 0 0 0 3px rgba(var(--blue-accent-rgb), 0.15);
}

/* =========================
   METODO RITIRO
========================= */

.campo-ritiro {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.ritiro-titolo {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-dark);
}

.ritiro-opzioni {
    display: flex;
    gap: 8px;
}

.ritiro-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: var(--white-soft);
    color: var(--black-premium);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ritiro-btn.selezionato {
    background: var(--blue-premium);
    border-color: var(--blue-premium);
    color: var(--white-premium);
    font-weight: 600;
}

.ritiro-btn:hover:not(.selezionato) {
    border-color: var(--blue-accent);
    color: var(--blue-accent);
}

/* =========================
   DATA RITIRO
========================= */

.campo-data {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

input[type="date"].label-style {
    padding: 14px 16px;
    cursor: pointer;
}

/* =========================
   FASCIA ORARIA
========================= */

.fascia-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.fascia-titolo {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0;
}

.fascia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.fascia-slot {
    padding: 12px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: var(--white-soft);
    color: var(--black-premium);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.fascia-slot:hover:not(.occupato) {
    border-color: var(--blue-accent);
    background: var(--blue-soft);
    color: var(--blue-accent);
}

.fascia-slot.selezionato {
    background: var(--blue-premium);
    border-color: var(--blue-premium);
    color: var(--white-premium);
    font-weight: 600;
}

.fascia-slot.occupato {
    background: var(--white-muted);
    border-color: var(--gray-light);
    color: var(--gray-medium);
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

.fascia-container.errore .fascia-slot:not(.occupato):not(.selezionato) {
    border-color: var(--error-soft);
    background: rgba(var(--error-soft-rgb), 0.04);
}

.fascia-errore {
    font-size: 12px;
    color: var(--error-soft);
    margin-top: -4px;
}

/* =========================
   TERMINI
========================= */

.termini-container {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 10px;
    margin-top: 6px;
}

.termini-container input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--blue-accent);
    flex-shrink: 0;
    border-radius: 50%;
}

.termini-container input[type="checkbox"].errore {
    outline: 2px solid var(--error-soft);
    border-radius: 3px;
}

.termini-container label {
    font-size: 13px;
    color: var(--gray-medium);
    line-height: 1.5;
}

.termini-container a {
    color: var(--blue-accent);
    text-decoration: underline;
}

/* =========================
   ESITI
========================= */

.nascosto {
    display: none;
}

.esito-successo {
    margin-top: 16px;
    max-width: 420px;
    padding: 14px 16px;
    background: rgba(var(--success-trust-rgb), 0.08);
    color: var(--success-trust);
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid rgba(var(--success-trust-rgb), 0.2);
    text-align: center;
    white-space: pre-line;
}

.esito-errore {
    margin-top: 16px;
    max-width: 420px;
    padding: 14px 16px;
    background: rgba(var(--error-soft-rgb), 0.08);
    color: var(--error-soft);
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid rgba(var(--error-soft-rgb), 0.2);
    text-align: center;
    white-space: pre-line;
}

/* =========================
   ANIMAZIONE SUCCESS
========================= */
.animazione{
    width: 100%;
    height: 85vh;
}
.animazione_container{
    font-weight: 800;
    width: 100%;
    left: 0;top: 0;right: 0;
    display: flex;justify-content: center;align-items: center;flex-direction: column;
}
.animazione_container .cta{
    background-color: transparent;
    padding: 10px;
    color: var(--black-premium);
    text-decoration: underline;
    font-size: 13px;
}
.animazione_container .cta:hover{
    color: var(--blue-accent);
    transform: translateY(0);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {
    main {
        flex-direction: column;
        min-height: 100vh;
    }

    #form-container {
        width: 100%;
        padding: 80px 24px 60px;
        align-items: flex-start;
    }

    #form-container h2 {
        font-size: 28px;
    }

    #formPrenotazione {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
}