/* AB Digit Check-up IA: i colori si possono cambiare dal tema ridefinendo queste variabili su .abdc */
.abdc {
    --abdc-ink: #12253f;
    --abdc-blue: #1457a6;
    --abdc-orange: #fe9a00;
    --abdc-orange-text: #a65600;
    --abdc-muted: #44546a;
    --abdc-line: #d3deec;
    --abdc-field: #8497b3;
    --abdc-tint: #eef4fb;
    --abdc-cream: #fff4e0;
    --abdc-radius: 12px;
    max-width: 760px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--abdc-line);
    border-radius: 16px;
    color: var(--abdc-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
}
.abdc *, .abdc *::before, .abdc *::after { box-sizing: border-box; }
.abdc [hidden] { display: none !important; }

.abdc-noscript { margin: 0; padding: 12px 14px; background: var(--abdc-cream); border-left: 4px solid var(--abdc-orange); font-weight: 600; }

.abdc-progress { margin-bottom: 28px; }
.abdc-progress__label { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; font-weight: 700; color: var(--abdc-muted); }
.abdc-bar { height: 8px; margin-top: 10px; background: var(--abdc-tint); border-radius: 999px; overflow: hidden; }
.abdc-bar__fill { display: block; height: 8px; background: var(--abdc-orange); border-radius: 999px; transition: width .2s ease; }

.abdc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.abdc-step__title { margin: 0 0 20px; font-size: 24px; font-weight: 800; line-height: 1.25; outline: none; }

.abdc-q { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.abdc-q legend { padding: 0; margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.abdc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.abdc-chip { position: relative; display: inline-block; cursor: pointer; }
.abdc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.abdc-chip span {
    display: inline-block;
    min-height: 44px;
    padding: 11px 18px;
    border: 2px solid var(--abdc-field);
    border-radius: 999px;
    background: #fff;
    color: var(--abdc-ink);
    font-weight: 700;
    line-height: 1.25;
}
.abdc-chip:hover span { border-color: var(--abdc-blue); }
.abdc-chip input:checked + span { background: var(--abdc-blue); border-color: var(--abdc-blue); color: #fff; }
.abdc-chip input:checked + span::before { content: "✓ "; }
.abdc-chip input:focus-visible + span { outline: 3px solid var(--abdc-ink); outline-offset: 2px; }

.abdc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.abdc-field label { font-size: 15px; font-weight: 700; }
.abdc-field input, .abdc-field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--abdc-field);
    border-radius: 8px;
    background: #fff;
    color: var(--abdc-ink);
    font: inherit;
}
.abdc-field textarea { resize: vertical; }
.abdc-field input:focus-visible, .abdc-field textarea:focus-visible { outline: 3px solid var(--abdc-ink); outline-offset: 2px; }
.abdc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.abdc-req { color: var(--abdc-orange-text); }

.abdc-consents { margin-top: 8px; }
.abdc-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.abdc-check input { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.abdc-check input:focus-visible { outline: 3px solid var(--abdc-ink); outline-offset: 2px; }
.abdc-check a { color: var(--abdc-blue); }

.is-invalid > legend, .is-invalid > label { color: var(--abdc-ink); }
.abdc-field.is-invalid input, .abdc-field.is-invalid textarea { border-color: var(--abdc-orange-text); border-width: 2px; }
.abdc-q__error, .abdc-field__error { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--abdc-orange-text); }
.abdc-error { margin: 20px 0 0; padding: 12px 14px; background: var(--abdc-cream); border-left: 4px solid var(--abdc-orange); font-weight: 600; }

.abdc-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.abdc-nav > :only-child, .abdc-nav [data-abdc-next] { margin-left: auto; }
.abdc-btn { min-height: 48px; padding: 14px 26px; border-radius: 8px; font: inherit; font-weight: 800; cursor: pointer; }
.abdc-btn--primary { border: 0; background: var(--abdc-orange); color: var(--abdc-ink); }
.abdc-btn--primary:hover { filter: brightness(0.95); }
.abdc-btn--primary[disabled] { opacity: .7; cursor: wait; }
.abdc-btn--ghost { padding: 12px 22px; border: 2px solid var(--abdc-blue); background: #fff; color: var(--abdc-blue); }
.abdc-btn:focus-visible { outline: 3px solid var(--abdc-ink); outline-offset: 2px; }

.abdc-done { outline: none; }
.abdc-done__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--abdc-orange); color: var(--abdc-ink); font-size: 28px; font-weight: 800; }
.abdc-done__title { margin: 20px 0 12px; font-size: 32px; line-height: 1.2; font-weight: 800; }
.abdc-done p { margin: 0 0 20px; font-size: 18px; line-height: 1.6; color: var(--abdc-muted); }
.abdc-done__sub { margin-bottom: 8px !important; font-size: 16px !important; font-weight: 800; color: var(--abdc-ink) !important; }
.abdc-done ol { margin: 0 0 24px; padding-left: 22px; line-height: 1.8; color: var(--abdc-muted); }
.abdc-done__phone { font-size: 15px !important; }

@media (max-width: 640px) {
    .abdc { padding: 20px; border-radius: 12px; }
    .abdc-grid { grid-template-columns: 1fr; }
    .abdc-step__title { font-size: 21px; }
    .abdc-progress__title { text-align: right; }
    .abdc-nav { flex-direction: column-reverse; align-items: stretch; }
    .abdc-nav .abdc-btn { width: 100%; }
    .abdc-nav [data-abdc-next] { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .abdc-bar__fill { transition: none; }
}
