/*
 * Configuratore pubblico (wizard preventivo) - caricato solo dalle pagine /preventivo.
 *
 * Impostazione grafica da modulo di preventivo online (stile comparatore assicurativo):
 * una sola colonna centrata, un passo per schermata con il contatore in alto, domande
 * grandi con risposta Si/No, campi ampi e arrotondati, pulsante di avanzamento ben
 * visibile, riquadri di rassicurazione e aiuto. Il totale resta sempre in fondo allo schermo.
 */

.wizard-body {
    --co-ink: #16202c;          /* testo principale */
    --co-ink-soft: #5b6875;     /* testo secondario */
    --co-line: #dde3ea;         /* bordi dei riquadri */
    --co-surface: #ffffff;
    --co-surface-alt: #eef3f8;  /* fondo pagina */
    --co-accent: #0b63ce;       /* colore guida: pulsanti, avanzamento, scelte */
    --co-accent-dark: #094ea3;
    --co-accent-soft: #e8f1fd;
    --co-ok: #1a7f4b;
    --mobile-total-height: 76px;

    background-color: var(--co-surface-alt);
    color: var(--co-ink);
    -webkit-font-smoothing: antialiased;
}

/* la colonna del modulo: una sola, centrata, larga il giusto per leggere bene */
.wizard-column {
    max-width: 680px;
    margin-inline: auto;
}

/* la colonna di destra (prezzo e link di ripresa): sotto al modulo sui telefoni */
.wizard-aside {
    max-width: 680px;
    margin-inline: auto;
    margin-top: 1.5rem;
}

.wizard-aside #resume-box {
    margin-top: 1rem;
}

/* da schermo largo: modulo a sinistra, riepilogo del prezzo a destra e sempre in vista */
@media (min-width: 992px) {
    .wizard-layout {
        display: grid;
        grid-template-columns: minmax(0, 680px) 21rem;
        align-items: start;
        justify-content: center;
        column-gap: 1.75rem;
    }

    .wizard-layout .wizard-column,
    .wizard-layout .wizard-aside {
        max-width: none;
        margin-inline: 0;
    }

    .wizard-aside {
        position: sticky;
        top: 1.5rem;
        margin-top: 0;
    }
}

.wizard-narrow {
    max-width: 680px;
}

.public-main {
    min-height: 60vh;
}

/* spazio per la barra del totale, sempre presente */
body.has-mobile-total {
    padding-bottom: var(--mobile-total-height);
}

/* ------------------------------------------------------------ intestazione e chiusura */
.wizard-body > header:not(.consulting-header) {
    border-bottom: 1px solid var(--co-line) !important;
    background-color: var(--co-surface) !important;
}

.wizard-body .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--co-ink);
}

.wizard-body .wizard-footer {
    border-top: 1px solid var(--co-line) !important;
    background-color: var(--co-surface) !important;
}

/* riquadro di aiuto nell'intestazione ("ti aiutiamo noi") */
.wizard-help {
    font-size: 0.85rem;
    color: var(--co-ink-soft);
    text-align: right;
    line-height: 1.3;
}

.wizard-help strong {
    display: block;
    color: var(--co-accent);
    font-size: 1rem;
}

/* ------------------------------------------------------------ avanzamento */
/* resta in alto mentre si scorre la pagina, cosi' si vede sempre a che punto si e' */
.wizard-progress {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 1.5rem;
    padding: 0.85rem 0 0.75rem;
    background-color: var(--co-surface-alt);
    box-shadow: 0 10px 12px -10px rgba(16, 32, 56, 0.28);
}

.wizard-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.wizard-progress-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--co-accent);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.wizard-progress-name {
    font-size: 0.8rem;
    color: var(--co-ink-soft);
    text-align: right;
}

.wizard-progress-track {
    height: 6px;
    border-radius: 999px;
    background-color: #dbe4ee;
    overflow: hidden;
}

.wizard-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background-color: var(--co-accent);
    transition: width 0.3s ease;
}

/* pallini dei passi, solo da tablet in su */
.wizard-steps-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.wizard-step {
    flex: 1 1 0;
    min-width: 0;
}

.wizard-step-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--co-ink-soft);
}

.wizard-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background-color: #dbe4ee;
    color: var(--co-ink-soft);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.wizard-step-label {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-step.is-current .wizard-step-link,
.wizard-step.is-completed .wizard-step-link {
    color: var(--co-ink);
    font-weight: 500;
}

.wizard-step.is-current .wizard-step-number {
    background-color: var(--co-accent);
    color: #fff;
}

.wizard-step.is-completed .wizard-step-number {
    background-color: var(--co-ok);
    color: #fff;
}

.wizard-step.is-disabled .wizard-step-link {
    cursor: default;
    opacity: 0.7;
}

/* ------------------------------------------------------------ titoli */
.wizard-body h1 {
    font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.wizard-body .wizard-intro-text {
    font-size: 1rem;
    color: var(--co-ink-soft);
    margin-bottom: 1.5rem;
}

.wizard-body .wizard-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--co-ink-soft);
}

/* ------------------------------------------------------------ riquadri */
.wizard-body .card {
    border: 1px solid var(--co-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(22, 32, 44, 0.04);
    background-color: var(--co-surface);
    margin-bottom: 1rem;
}

.wizard-body .card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--co-line);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.wizard-body .card-body {
    padding: 1.25rem;
}

.wizard-body .list-group-item {
    border-color: var(--co-line);
    padding: 0.85rem 1.25rem;
}

.wizard-body .alert {
    border: 1px solid var(--co-line);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    font-size: 0.92rem;
}

.wizard-body .alert-light {
    background-color: var(--co-accent-soft);
    border-color: #cfe1fa;
    color: var(--co-ink);
}

.wizard-body hr {
    border-color: var(--co-line);
    opacity: 1;
}

/* ------------------------------------------------------------ domande */
.wizard-question {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--co-line);
}

.wizard-question:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.wizard-question-title {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.15rem;
}

.wizard-question-help {
    font-size: 0.85rem;
    color: var(--co-ink-soft);
    margin-bottom: 0.75rem;
}

.wizard-question.has-error {
    border-left: 3px solid #dc3545;
    padding-left: 0.75rem;
}

.wizard-question legend {
    font-weight: 600;
}

/* risposta Si/No: due pulsanti affiancati */
.wizard-choice {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wizard-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wizard-choice label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--co-line);
    border-radius: 999px;
    background-color: var(--co-surface);
    color: var(--co-ink);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wizard-choice label:hover {
    border-color: var(--co-accent);
    color: var(--co-accent);
}

.wizard-choice input[type="radio"]:checked + label {
    background-color: var(--co-accent);
    border-color: var(--co-accent);
    color: #fff;
}

.wizard-choice input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--co-accent);
    outline-offset: 2px;
}

/* campo numerico che compare dopo una risposta */
.wizard-followup {
    margin-top: 0.85rem;
    padding: 0.9rem 1rem;
    background-color: var(--co-accent-soft);
    border-radius: 12px;
}

.wizard-followup .form-label {
    font-weight: 600;
}

/* ------------------------------------------------------------ campi */
.wizard-body .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--co-ink);
    margin-bottom: 0.35rem;
}

.wizard-body .form-control,
.wizard-body .form-select {
    border: 1px solid #c9d4e0;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    background-color: var(--co-surface);
    color: var(--co-ink);
}

.wizard-body .form-control:focus,
.wizard-body .form-select:focus {
    border-color: var(--co-accent);
    box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.15);
}

.wizard-body .form-control::placeholder {
    color: #9aa7b4;
}

.wizard-body .form-text {
    color: var(--co-ink-soft);
    font-size: 0.82rem;
}

.wizard-body .form-check-input:checked {
    background-color: var(--co-accent);
    border-color: var(--co-accent);
}

.wizard-body .form-check-input:focus {
    border-color: var(--co-accent);
    box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.15);
}

.wizard-body .form-check-label {
    font-size: 0.95rem;
    line-height: 1.45;
}

/* ------------------------------------------------------------ pulsanti */
.wizard-body .btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
}

.wizard-body .btn-primary {
    background-color: var(--co-accent);
    border-color: var(--co-accent);
    box-shadow: 0 2px 10px rgba(11, 99, 206, 0.25);
}

.wizard-body .btn-primary:hover,
.wizard-body .btn-primary:focus {
    background-color: var(--co-accent-dark);
    border-color: var(--co-accent-dark);
}

.wizard-body .btn-outline-secondary {
    border-color: var(--co-line);
    color: var(--co-ink-soft);
    box-shadow: none;
}

.wizard-body .btn-outline-secondary:hover {
    background-color: #e4ebf3;
    border-color: var(--co-line);
    color: var(--co-ink);
}

.wizard-body .btn-outline-primary {
    border-color: var(--co-accent);
    color: var(--co-accent);
}

.wizard-body .btn-outline-primary:hover {
    background-color: var(--co-accent);
    color: #fff;
}

.wizard-body .btn-lg {
    font-size: 1.05rem;
    padding: 0.95rem 2.2rem;
}

.wizard-actions {
    margin-top: 1.75rem !important;
    padding-top: 1.25rem !important;
    border-top: 1px solid var(--co-line) !important;
}

/* su telefono il pulsante principale occupa tutta la larghezza */
@media (max-width: 575.98px) {
    .wizard-actions .btn {
        width: 100%;
    }
}

/* ------------------------------------------------------------ rassicurazioni */
/* Una fascia unica: tre garanzie distinte, senza sembrare pulsanti. */
.wizard-body .wizard-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 1.125rem 0;
    border: 1px solid var(--co-line);
    border-radius: 14px;
    background: #f8fafb;
    color: var(--co-ink);
}
.wizard-trust-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-width: 0;
    padding: .25rem 1rem;
}
.wizard-trust-item + .wizard-trust-item { border-left: 1px solid var(--co-line); }
.wizard-body .wizard-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #e6efed;
    color: #26584d;
    font-size: 1.2rem;
}
.wizard-trust-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}
.wizard-trust-item span {
    display: block;
    margin-top: .2rem;
    color: var(--co-ink-soft);
    font-size: .9375rem;
    line-height: 1.5;
}
@media (max-width: 767.98px) {
    .wizard-body .wizard-trust { grid-template-columns: 1fr; padding: 0 1rem; }
    .wizard-trust-item { align-items: center; padding: 1rem 0; }
    .wizard-trust-item + .wizard-trust-item { border-left: 0; border-top: 1px solid var(--co-line); }
}

/* ------------------------------------------------------------ riepilogo prezzi */
.wizard-body #pricing-sidebar .card-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--co-ink);
}

.pricing-lines .list-group-item {
    border-left: 0;
    border-right: 0;
}

.wizard-body .pricing-grand {
    border-top: 1px solid var(--co-line) !important;
    padding-top: 0.9rem !important;
}

.wizard-body .pricing-grand .fs-4 {
    font-size: 1.55rem !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--co-accent) !important;
}

.wizard-body .badge {
    font-weight: 600;
    border-radius: 999px;
}

.wizard-body .pricing-lines,
.wizard-body .pricing-totals,
.wizard-body .summary-table,
.wizard-body .mobile-total-bar {
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ tabella del riepilogo */
.wizard-body .summary-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--co-ink-soft);
    border-bottom-color: var(--co-line);
}

.wizard-body .summary-table td {
    border-bottom-color: var(--co-line);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.wizard-body .table > thead {
    --bs-table-bg: transparent;
}

/* ------------------------------------------------------------ barra del totale, sempre visibile */
.mobile-total-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
    padding: 0.75rem 1rem;
    background-color: var(--co-surface);
    border-top: 1px solid var(--co-line);
    box-shadow: 0 -2px 12px rgba(22, 32, 44, 0.06);
}

.mobile-total-bar > * {
    max-width: 680px;
}

.mobile-total-bar .fs-5 {
    font-weight: 700;
    color: var(--co-accent);
}

.mobile-total-text {
    color: inherit;
}

/* ------------------------------------------------------------ elementi minori */
.wizard-intro-steps .wizard-step-number {
    background-color: var(--co-accent);
    color: #fff;
}

.consent-box {
    background-color: var(--co-surface);
    border-color: var(--co-line) !important;
    border-radius: 12px;
    transition: border-color 0.15s ease;
    /* spunta e testo sulla stessa riga: il testo sta accanto alla casella, non sotto */
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
}

.consent-box > .form-check-input {
    flex: 0 0 auto;
    margin: 0.2rem 0 0;
}

.consent-box > .form-check-label {
    flex: 1 1 0;
    min-width: 0;
}

/* eventuali messaggi d'errore vanno a capo, sotto la riga della spunta */
.consent-box > :not(.form-check-input):not(.form-check-label) {
    flex: 1 0 100%;
}

.consent-box.is-selected,
.consent-box:has(input:checked) {
    border-color: var(--co-accent) !important;
    background-color: var(--co-accent-soft);
}

.notice-body {
    max-height: 200px;
    overflow-y: auto;
}

.notice-body > :last-child,
.notice-inline > :last-child {
    margin-bottom: 0;
}

.sdi-input {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.summary-total-label {
    white-space: nowrap;
}

.done-icon {
    font-size: 3.5rem;
    line-height: 1;
    color: var(--co-ok);
}

#autosave-status {
    min-height: 1.2rem;
}

/* ------------------------------------------------------------ barra in basso con i pulsanti */
.mobile-total-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
}

.mobile-total-bar .wizard-back {
    padding: 0.6rem 0.9rem;
    flex: 0 0 auto;
}

.wizard-back-placeholder {
    flex: 0 0 auto;
    width: 2.6rem;
}

.mobile-total-bar .mobile-total-text {
    flex: 1 1 auto;
    text-align: center;
    line-height: 1.15;
}

.mobile-total-bar .btn-lg {
    flex: 0 0 auto;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

@media (max-width: 420px) {
    .mobile-total-bar .btn-lg {
        padding: 0.7rem 1rem;
    }
}


/* Passo 3: ogni voce ha una descrizione ampia e una fascia di importi. */
.wizard-body .quote-breakdown {
    border: 1px solid var(--co-line);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--co-surface);
}
.wizard-body .quote-breakdown-table {
    display: block;
    margin: 0;
    color: var(--co-ink);
}
.wizard-body .quote-breakdown-table .quote-breakdown-title {
    display: block;
    caption-side: top;
    padding: 1.25rem 1.5rem;
    color: var(--co-ink);
    font-size: 1.05rem;
    font-weight: 700;
    border-bottom: 1px solid var(--co-line);
}
.wizard-body .quote-breakdown-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}
.wizard-body .quote-breakdown-table tbody,
.wizard-body .quote-breakdown-table tfoot { display: block; }
.wizard-body .quote-breakdown-table tbody tr {
    display: grid;
    grid-template-columns: 1.15fr 1.2fr 1.2fr .55fr 1.3fr;
    gap: 1rem .75rem;
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid var(--co-line);
}
.wizard-body .quote-breakdown-table tbody td {
    display: block !important;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    font-size: .9rem;
    text-align: left !important;
    white-space: normal !important;
}
.wizard-body .quote-breakdown-table tbody td:first-child {
    grid-column: 1 / -1;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.wizard-body .quote-breakdown-table tbody td:not(:first-child)::before {
    display: block;
    margin-bottom: .35rem;
    color: var(--co-ink-soft);
    font-size: .72rem;
    font-weight: 400;
}
.wizard-body .quote-breakdown-table tbody td:nth-child(2)::before { content: "Quantità"; }
.wizard-body .quote-breakdown-table tbody td:nth-child(3)::before { content: "Prezzo unitario"; }
.wizard-body .quote-breakdown-table tbody td:nth-child(4)::before { content: "Imponibile"; }
.wizard-body .quote-breakdown-table tbody td:nth-child(5)::before { content: "IVA"; }
.wizard-body .quote-breakdown-table tbody td:nth-child(6)::before { content: "Totale IVA inclusa"; }
.wizard-body .quote-breakdown-table tbody td:last-child {
    text-align: right !important;
    color: var(--co-accent-dark);
}
.wizard-body .quote-breakdown-table tfoot {
    padding: 1rem 1.5rem 0;
    background: #f7f9fc;
}
.wizard-body .quote-breakdown-table tfoot tr {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}
.wizard-body .quote-breakdown-table tfoot tr[hidden] { display: none; }
.wizard-body .quote-breakdown-table tfoot th,
.wizard-body .quote-breakdown-table tfoot td {
    padding: .4rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    font-size: .9rem;
}
.wizard-body .quote-breakdown-table tfoot th { text-align: left !important; }
.wizard-body .quote-breakdown-table tfoot td { white-space: nowrap; }
.wizard-body .quote-breakdown-table tfoot tr:last-child {
    border-top: 1px solid var(--co-line);
    margin-top: .8rem;
    padding: 1rem 0;
}
.wizard-body .quote-breakdown-table tfoot tr:last-child th {
    font-size: 1rem;
    color: var(--co-ink);
}
.wizard-body .quote-breakdown-table tfoot tr:last-child td { font-size: 1.55rem !important; }
@media (max-width: 575.98px) {
    .wizard-body .quote-breakdown-table .quote-breakdown-title { padding: 1rem; }
    .wizard-body .quote-breakdown-table tbody tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 1.1rem 1rem;
    }
    .wizard-body .quote-breakdown-table tbody td:last-child {
        grid-column: 1 / -1;
        padding-top: .7rem;
        border-top: 1px dashed var(--co-line);
        font-size: 1.05rem;
    }
    .wizard-body .quote-breakdown-table tfoot { padding: 1rem 1rem 0; }
}

/* Nota sotto il riepilogo (voci da quotare a mano). */
.wizard-body .quote-breakdown-note {
    padding: 0 1.5rem 1.25rem;
    background: #f7f9fc;
    color: var(--co-ink-soft);
    font-size: .8125rem;
    line-height: 1.6;
}
@media (max-width: 575.98px) {
    .wizard-body .quote-breakdown-note { padding: 0 1rem 1.1rem; }
}

/* Passo 1: dati aziendali e recapito, con gruppi distinti. */
.wizard-body .needs-panel {
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--co-line);
    border-radius: 16px;
    background: var(--co-surface);
}
.needs-panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-bottom: 1.4rem;
}
.wizard-body .needs-panel-heading h2 {
    margin: 0;
    color: var(--co-ink);
    font-size: 1.05rem;
    font-weight: 700;
}
.needs-required-note,
.needs-optional { color: var(--co-ink-soft); font-size: .75rem; font-weight: 400; }
.wizard-body .needs-panel .form-label { font-size: .875rem; margin-bottom: .5rem; }
.wizard-body .needs-panel .form-control,
.wizard-body .needs-panel .form-select {
    min-height: 50px;
    border-radius: 9px;
    background-color: #fcfdff;
}
.wizard-body .needs-panel .form-text { margin-top: .55rem; font-size: .78rem; line-height: 1.5; }
.wizard-body .needs-number-field .form-label { display: block; min-height: 1.4rem; }
.wizard-body .needs-contact { border-left: 3px solid var(--co-accent); }
.needs-privacy-notice {
    border: 1px solid var(--co-line);
    border-radius: 10px;
    margin-bottom: 1rem;
    background: var(--co-surface);
}
.needs-privacy-notice summary {
    padding: 1rem;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    color: var(--co-ink);
}
.needs-privacy-notice summary:focus-visible { outline: 2px solid var(--co-accent); outline-offset: 3px; }
.needs-privacy-notice .notice-body { padding: 0 1rem 1rem; line-height: 1.65; }
@media (max-width: 767.98px) {
    .wizard-body .needs-number-field:first-of-type { width: 100%; }
    .wizard-body .needs-panel .needs-number-field:nth-child(3) { width: 100%; }
}
@media (max-width: 575.98px) {
    .wizard-body .needs-panel { padding: 1.15rem; }
    .needs-panel-heading { margin-bottom: 1.15rem; }
}

.wizard-body .quote-breakdown-table tbody td[hidden] { display: none !important; }
.wizard-body .quote-breakdown-table tbody tr.summary-single-quantity {
    grid-template-columns: 1.2fr 1.2fr .55fr 1.3fr;
}
@media (max-width: 575.98px) {
    .wizard-body .quote-breakdown-table tbody tr.summary-single-quantity {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Privacy: testo compatto e titoli proporzionati al modulo. */
.wizard-body .needs-privacy-notice .notice-body {
    font-family: inherit;
    font-size: .8125rem;
    line-height: 1.6;
    color: var(--co-ink-soft);
}
.wizard-body .needs-privacy-notice .notice-body :is(h1, h2, h3, h4, h5, h6) {
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: normal;
    color: var(--co-ink);
    margin: 1.15rem 0 .45rem;
}
.wizard-body .needs-privacy-notice .notice-body > :first-child { margin-top: 0; }
.wizard-body .needs-privacy-notice .notice-body :is(p, ul, ol) {
    font-size: inherit;
    margin-bottom: .65rem;
}
.wizard-body .needs-privacy-notice .notice-body :is(ul, ol) { padding-left: 1.25rem; }
.wizard-body .needs-privacy-notice .notice-body li { margin-bottom: .2rem; }
.wizard-body .needs-privacy-notice .notice-body a { overflow-wrap: anywhere; }

/* Esito del salvataggio automatico: finora l'errore era grigio come il resto e non si
   notava, cosi' un prezzo che non si aggiornava sembrava un guasto del programma. */
#autosave-status.is-error {
    color: #b02a37;
    font-weight: 600;
}

#autosave-status.autosave-blocked {
    display: block;
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #f1aeb5;
    border-radius: 10px;
    background-color: #fff5f5;
    text-align: left;
}

/* I pulsanti flottanti seguono l’altezza reale della barra di navigazione. */
body.has-mobile-total .privacy-launcher,
body.has-mobile-total .whatsapp-contatto {
    bottom: calc(var(--mobile-total-height, 76px) + 12px);
}
.wizard-body .mobile-total-bar { padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }
.wizard-body .job-picker { min-height: 44px; font-size: 16px; }
@media (max-width: 575.98px) {
    .wizard-body .mobile-total-inner { flex-wrap: wrap; gap: .5rem; }
    .wizard-body .mobile-total-text { flex-basis: 100%; order: -1; }
    .wizard-body .mobile-total-inner .btn { min-height: 44px; }
    .wizard-body { padding-bottom: calc(var(--mobile-total-height, 120px) + 76px); }
}
