/* =============================================================================
   Richiesta informazioni — modale unico del sito
   Markup: template-parts/forms/info-request.php · JS: assets/js/info-form.js

   Il foglio è autonomo di proposito: il modale compare in ogni pagina del
   sito, comprese quelle che non caricano academy-base.css, quindi qui dentro
   non si può usare nessuna classe `.mca-*` di quel foglio. I token del
   layout Academy sono ripetuti sul blocco: sono cinque valori, e la
   dipendenza sarebbe costata un modale senza stile fuori dalle sue pagine.
   ========================================================================== */

.mca-if {
    --if-ink: #0e0e0e;
    --if-body: #5a564f;
    --if-muted: #8a8580;
    --if-cream: #f5f4f2;
    --if-line: rgba(14, 14, 14, .14);
    --if-radius: 20px;

    position: fixed;
    inset: 0;
    /* L'header del tema arriva a 10050 e il modale di ricerca a 10070. */
    z-index: 10090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Jost', sans-serif;
}
.mca-if[hidden] { display: none; }

body.mca-if-open { overflow: hidden; }

.mca-if__veil {
    position: absolute;
    inset: 0;
    background: rgba(14, 14, 14, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: mcaIfVeil .3s ease both;
}

.mca-if__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    color: var(--if-ink);
    border-radius: var(--if-radius);
    padding: 44px 44px 40px;
    box-shadow: 0 40px 90px rgba(14, 14, 14, .35);
    animation: mcaIfRise .34s cubic-bezier(.22, .8, .3, 1) both;
}

@keyframes mcaIfVeil { from { opacity: 0; } to { opacity: 1; } }
@keyframes mcaIfRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .mca-if__veil,
    .mca-if__dialog { animation: none; }
}

.mca-if__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--if-cream);
    color: var(--if-ink);
    cursor: pointer;
    transition: background .25s ease;
}
.mca-if__close:hover { background: rgba(14, 14, 14, .1); }

/* ── Testata ──────────────────────────────────────────────────────────────── */
.mca-if__head { margin-bottom: 26px; padding-right: 40px; }
.mca-if__eyebrow {
    display: block;
    font-size: 11px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--if-muted);
}
.mca-if__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 12px 0 0;
    color: var(--if-ink);
}
.mca-if__lead {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 300;
    color: var(--if-body);
}

/* ── Campi ────────────────────────────────────────────────────────────────── */
.mca-if__form { display: flex; flex-direction: column; gap: 20px; }

.mca-if__group,
.mca-if__field { border: 0; margin: 0; padding: 0; min-width: 0; }

.mca-if__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.mca-if__label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--if-ink);
    margin-bottom: 8px;
    padding: 0;
}
.mca-if__optional { color: var(--if-muted); font-weight: 300; }
.mca-if__optional::before { content: ' · '; }

.mca-if__input {
    width: 100%;
    border: 1px solid var(--if-line);
    border-radius: 12px;
    background: #fff;
    padding: 13px 15px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 300;
    color: var(--if-ink);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.mca-if__input::placeholder { color: var(--if-muted); }
.mca-if__input:focus {
    outline: none;
    border-color: var(--if-ink);
    box-shadow: 0 0 0 3px rgba(14, 14, 14, .07);
}
.mca-if__input--area { resize: vertical; min-height: 108px; line-height: 1.6; }

.is-invalid .mca-if__input { border-color: #b3261e; }

/* ── Scelte a pastiglia ───────────────────────────────────────────────────── */
.mca-if__choices { display: flex; flex-wrap: wrap; gap: 8px; }

.mca-if__choice input { position: absolute; opacity: 0; pointer-events: none; }
.mca-if__choice-label {
    display: inline-block;
    border: 1px solid var(--if-line);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 300;
    color: var(--if-body);
    cursor: pointer;
    transition: all .22s ease;
}
.mca-if__choices--sm .mca-if__choice-label { padding: 8px 14px; font-size: 13px; }
.mca-if__choice-label:hover { border-color: rgba(14, 14, 14, .35); }
.mca-if__choice input:checked + .mca-if__choice-label {
    background: var(--if-ink);
    border-color: var(--if-ink);
    color: #fff;
}
.mca-if__choice input:focus-visible + .mca-if__choice-label { box-shadow: 0 0 0 3px rgba(14, 14, 14, .18); }

/* ── Le tre modalità della Virtual Class ──────────────────────────────────── */
.mca-if__modes { display: grid; gap: 8px; }
.mca-if__mode { display: block; cursor: pointer; }
.mca-if__mode input { position: absolute; opacity: 0; pointer-events: none; }
.mca-if__mode > span {
    display: block;
    border: 1px solid var(--if-line);
    border-radius: 14px;
    padding: 14px 16px;
    transition: all .22s ease;
}
.mca-if__mode > span:hover { border-color: rgba(14, 14, 14, .35); }
.mca-if__mode input:checked + span {
    border-color: var(--if-ink);
    background: var(--if-cream);
}
.mca-if__mode input:focus-visible + span { box-shadow: 0 0 0 3px rgba(14, 14, 14, .18); }
.mca-if__mode-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
}
.mca-if__mode-note { display: block; margin-top: 3px; font-size: 13px; font-weight: 300; color: var(--if-muted); }

/* ── Consenso ─────────────────────────────────────────────────────────────── */
.mca-if__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    font-weight: 300;
    color: var(--if-body);
    cursor: pointer;
}
.mca-if__consent input { margin-top: 3px; accent-color: #0e0e0e; width: 16px; height: 16px; flex-shrink: 0; }
.mca-if__consent a { color: var(--if-ink); text-decoration: underline; }

/* ── Errori ───────────────────────────────────────────────────────────────── */
.mca-if__error:empty { display: none; }
.mca-if__error {
    margin: 7px 0 0;
    font-size: 12.5px;
    font-weight: 300;
    color: #b3261e;
}
.mca-if__alert {
    margin: 0;
    border-radius: 12px;
    background: rgba(179, 38, 30, .08);
    color: #b3261e;
    padding: 12px 15px;
    font-size: 13.5px;
    font-weight: 300;
}
.mca-if__alert[hidden] { display: none; }

/* ── Invio ────────────────────────────────────────────────────────────────── */
.mca-if__submit {
    width: 100%;
    border: 1px solid var(--if-ink);
    border-radius: 999px;
    background: var(--if-ink);
    color: #fff;
    padding: 16px 26px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: opacity .25s ease, background .25s ease, color .25s ease;
}
.mca-if__submit:hover { opacity: .86; }
.mca-if__submit:disabled { opacity: .55; cursor: default; }
.mca-if__submit--ghost { background: transparent; color: var(--if-ink); margin-top: 22px; }
.mca-if__submit--ghost:hover { background: var(--if-cream); opacity: 1; }

/* ── Conferma ─────────────────────────────────────────────────────────────── */
.mca-if__done { text-align: center; padding: 10px 0 6px; }
.mca-if__done[hidden] { display: none; }
.mca-if__done-mark {
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--if-cream);
    color: var(--if-ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mca-if__done-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}
.mca-if__done-text {
    margin: 10px auto 0;
    max-width: 400px;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 300;
    color: var(--if-body);
}

/* La trappola per i robot: fuori dallo schermo, mai `display:none` — un campo
   nascosto così lo saltano anche loro. */
.mca-if__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Bottone dello shortcode ──────────────────────────────────────────────── */
/* Serve anche dove academy-base.css non c'è: `.mca-btn` lì non esiste. */
.mca-if-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #0e0e0e;
    border-radius: 999px;
    background: #0e0e0e;
    color: #fff;
    padding: 15px 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: opacity .25s ease, background .25s ease, color .25s ease;
}
.mca-if-open-btn:hover { opacity: .86; }
.mca-if-open-btn--light { background: #fff; color: #0e0e0e; border-color: #fff; }
.mca-if-open-btn--outline { background: transparent; color: #0e0e0e; }
.mca-if-open-btn--outline:hover { background: #0e0e0e; color: #fff; opacity: 1; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .mca-if { padding: 0; align-items: flex-end; }
    .mca-if__dialog {
        max-width: none;
        max-height: 92vh;
        border-radius: var(--if-radius) var(--if-radius) 0 0;
        padding: 34px 24px 28px;
    }
    .mca-if__title { font-size: 25px; }
    .mca-if__row { grid-template-columns: 1fr; gap: 20px; }
}
