/* ─────────────────────────────────────────────────────────────────
 * macc-public-booking — Custom CSS (BI-first + musei-civici)
 * ─────────────────────────────────────────────────────────────────
 *
 * Stack riutilizzato:
 *   - Bootstrap Italia v2.17.0 (caricato dal tema musei-unica)
 *   - mockup/musei-civici.css (.mc-lhero, .mc-c-accent, ecc.)
 *
 * Custom solo per:
 *   1. Soppressione elementi tema (TOC, breadcrumb, "Ultimo agg", Forminator)
 *   2. Espansione main full-width quando sidebar TOC nascosta
 *   3. Hero .mc-lhero replicato + trick 100vw per uscire dal container parent
 *   4. Stepper override: "01." senza cerchio + nowrap (UNA riga) + mobile collapse
 *   5. Card-as-radio (radio nascosto + label cliccabile)
 *   6. Selected highlight viola + cerchio radio visuale
 *   7. Focus-visible WCAG
 */

/* ─── 1. Soppressione elementi tema su pagina flow ─── */
/* Nota: il form Forminator del rating (rating.php) RESTA visibile in fondo.
 * Sopprimere solo il form senza il wrapper bg-primary genera una striscia
 * viola vuota. Decisione: mostriamo l'intero widget rating. */
body.macc-pb-flow-active .cmp-navscroll,
body.macc-pb-flow-active aside:has(.cmp-navscroll),
body.macc-pb-flow-active aside.col-lg-3,
body.macc-pb-flow-active #ultimo-aggiornamento,
body.macc-pb-flow-active section[id="ultimo-aggiornamento"],
body.macc-pb-flow-active section[aria-label="breadcrumbs"],
body.macc-pb-flow-active .breadcrumb-container,
body.macc-pb-flow-active .cmp-breadcrumbs,
body.macc-pb-flow-active .breadcrumbs,
body.macc-pb-flow-active .mc-bc,
body.macc-pb-flow-active nav[aria-label="breadcrumb"],
body.macc-pb-flow-active nav[aria-label*="briciole"] {
    display: none !important;
}

/* Striscia viola rating: respiro fra contenuto main e widget rating. */
body.macc-pb-flow-active div.bg-primary:has(#rating) {
    margin-top: 4rem;
}

/* ─── 2. Main full-width quando sidebar TOC nascosta ─── */
body.macc-pb-flow-active .it-page-sections-container,
body.macc-pb-flow-active .row > .col-md-10,
body.macc-pb-flow-active .row > .col-lg-9,
body.macc-pb-flow-active .row > .col-xl-8 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
body.macc-pb-flow-active .it-page-sections-container,
body.macc-pb-flow-active .it-page-sections-container.ps-0,
body.macc-pb-flow-active .it-page-sections-container.ps-md-5 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Annulla padding/margin sui wrapper section che il tema mette intorno
   a the_content (#scheda.py-4 + section[role=contentinfo].mb-4) — causano
   gap tra header → hero e tra hero → stepper. */
body.macc-pb-flow-active #scheda,
body.macc-pb-flow-active section#scheda.py-4 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.macc-pb-flow-active section[role="contentinfo"][aria-label="Corpo"],
body.macc-pb-flow-active section[role="contentinfo"].mb-4 {
    margin-bottom: 0 !important;
}
body.macc-pb-flow-active #main_container,
body.macc-pb-flow-active main#main_container.pb-5 {
    padding-bottom: 0 !important;
}

/* ─── 3. Hero .mc-lhero — trick 100vw per edge-to-edge ─── */
body.macc-pb-flow-active .mc-lhero {
    /* Uscire dal container parent del tema (esce dal .container BI) */
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Stili tema replicati senza scope .mc-page. Padding solo verticale:
     * il .container interno gestisce il padding laterale per allineare
     * l'H1 al main content (pattern uguale a hero collezioni). */
    background: var(--bs-primary);
    color: #fff;
    padding: 48px 0;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
}
body.macc-pb-flow-active .mc-lhero > .container {
    /* z-index sopra la wave decorativa ::before. */
    position: relative;
    z-index: 2;
}
body.macc-pb-flow-active .mc-lhero__copy {
    /* Niente max-width custom: il .container BI già limita alla larghezza
     * del main content del tema. */
    position: relative;
    z-index: 2;
}
body.macc-pb-flow-active .mc-lhero h1 {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.17;
    letter-spacing: -1px;
    color: #fff;
    margin: 0;
}
/* Wave decorativa (SVG inline) — 3 onde a destra, opacità leggera */
body.macc-pb-flow-active .mc-lhero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 300' preserveAspectRatio='none'><path d='M0,200 Q200,140 400,200 T800,200 V300 H0 Z' fill='white' opacity='0.06'/><path d='M0,230 Q200,170 400,230 T800,230 V300 H0 Z' fill='white' opacity='0.06'/><path d='M0,260 Q200,200 400,260 T800,260 V300 H0 Z' fill='white' opacity='0.07'/></svg>");
    background-size: cover;
    background-position: right bottom;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

/* ─── 4. Stepper: full-width edge-to-edge + 01. format + nowrap ─── */
body.macc-pb-flow-active .steppers {
    /* Trick 100vw — esce dal container parent come fa l'hero. */
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0 !important;
    margin-bottom: 4rem;
    background: #fff;
    border-bottom: 1px solid var(--bs-gray-200, #dee2e6);
    padding: 0;
}
body.macc-pb-flow-active .steppers-header {
    /* Contenuto interno limitato a container width, centrato. */
    max-width: 100%;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
}
body.macc-pb-flow-active .steppers-header ul {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow-x: unset;
    scrollbar-width: unset;
}
body.macc-pb-flow-active .steppers-header li {
    flex: 1 1 auto;
    min-width: max-content;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    color: var(--bs-gray-700, #495057);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
body.macc-pb-flow-active .steppers-header li {
    position: relative; /* Necessario per ::after underline desktop (>=992px) */
}
body.macc-pb-flow-active .steppers-header li.active {
    border-bottom-color: var(--bs-primary);
    color: var(--bs-primary);
    font-weight: 600;
}
/* Underline centrato corto sul desktop (replica regola _steppers.scss riga 218).
   `background` rimosso volutamente — il colore della linea arriva dal
   `border-bottom-color` sopra. */
/* Underline desktop (>=992px) — replica regola _steppers.scss riga 218 */
@media (min-width: 992px) {
    body.macc-pb-flow-active .steppers .steppers-header li.active::after {
        content: "";
        position: absolute;
        bottom: 0;
        width: calc(100% - 2.222rem);
        height: 2px;
        background: none;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Numero step .active desktop (>=992px) — replica regola _steppers.scss riga 226.
   `!important` necessario per vincere la regola generica `.steppers-number`
   sopra (decisione Paolo, opzione A). */
@media (min-width: 992px) {
    body.macc-pb-flow-active .steppers .steppers-header li.active .steppers-number {
        color: var(--bs-primary) !important;
        background: none !important;
        border-color: rgb(94.35, 29.2485, 84.584775) !important;
    }
}
body.macc-pb-flow-active .steppers-header li.disabled {
    color: var(--bs-gray-500, #6c757d);
}
body.macc-pb-flow-active .steppers-header .steppers-number {
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    padding: 0 !important;
    color: inherit;
    font-weight: 700;
    font-size: 1rem;
}
/* Mobile: collapse, mostra solo "01. Esperienza — Passo 1 di 7" */
@media (max-width: 767.98px) {
    body.macc-pb-flow-active .steppers-header li:not(.active) {
        display: none;
    }
    body.macc-pb-flow-active .steppers-header li.active {
        flex: 1 1 100%;
        justify-content: space-between;
    }
    body.macc-pb-flow-active .steppers-header li.active::after {
        content: " — Passo " attr(data-step) " di 7";
        color: var(--bs-gray-600, #6c757d);
        font-weight: 400;
        margin-left: auto;
        font-size: 0.875rem;
    }
}

/* ─── 5. Card-as-radio Step 1 (pixel-perfect mockup Designers Italia) ─── */

body.macc-pb-flow-active .macc-pb-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* ~20px tra card */
    margin: 0 0 1rem 0;
    padding: 0;
}

body.macc-pb-flow-active .macc-pb-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin: 0;
}
body.macc-pb-flow-active .macc-pb-card:hover {
    background: #efefef;
}
body.macc-pb-flow-active .macc-pb-card.is-selected,
body.macc-pb-flow-active .macc-pb-card:has(.macc-pb-card__radio:checked) {
    /* sfondo rosa chiaro tinto col primario (alone selected, pattern mockup) */
    background: rgba(var(--bs-primary-rgb), 0.06);
    border-color: var(--bs-primary);
}

/* Radio nativo, visibile in alto-sx */
body.macc-pb-flow-active .macc-pb-card__radio {
    margin-top: 0.35rem;
    flex-shrink: 0;
    accent-color: var(--bs-primary);
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
}

body.macc-pb-flow-active .macc-pb-card__content {
    flex: 1;
    min-width: 0;
}
body.macc-pb-flow-active .macc-pb-card__title {
    margin: 0 0 0.4rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-card__subtitle {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    color: #555;
    line-height: 1.55;
}

/* Layout 2 colonne desktop */
body.macc-pb-flow-active .macc-pb-card__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
body.macc-pb-flow-active .macc-pb-card__col-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* "Comprende:" e "Prezzi:" — labels in bold */
body.macc-pb-flow-active .macc-pb-card__includes strong,
body.macc-pb-flow-active .macc-pb-card__prices strong {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

/* Bullet list "Comprende" */
body.macc-pb-flow-active .macc-pb-card__includes ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}
body.macc-pb-flow-active .macc-pb-card__includes li {
    font-size: 1rem;
    line-height: 1.55;
    color: #333;
    margin-bottom: 0.25rem;
}

/* Tabella prezzi: label vs valore con space-between */
body.macc-pb-flow-active .macc-pb-card__prices ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
body.macc-pb-flow-active .macc-pb-card__prices li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1rem;
    line-height: 1.55;
    color: #333;
    margin-bottom: 0.25rem;
    max-width: 320px;
}
body.macc-pb-flow-active .macc-pb-card__price-label { color: #333; }
body.macc-pb-flow-active .macc-pb-card__price-value {
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

/* Colonna destra: orari (definition list a 2 colonne stretti) */
body.macc-pb-flow-active .macc-pb-card__schedule {
    margin: 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.55;
    align-content: start;
}
body.macc-pb-flow-active .macc-pb-card__schedule dt {
    font-weight: 700;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-card__schedule dd {
    margin: 0;
    color: #333;
}

/* Mobile: 1 colonna */
@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-card {
        padding: 1.25rem 1.25rem;
        gap: 0.75rem;
    }
    body.macc-pb-flow-active .macc-pb-card__columns {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    body.macc-pb-flow-active .macc-pb-card__title {
        font-size: 1.125rem;
    }
}

/* ─── 6. (legacy) cerchio radio visuale — rimosso, ora il radio nativo è visibile ─── */

/* ─── 7. Focus visible (WCAG 2.4.7) ─── */
.macc-pb-card__radio:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
body.macc-pb-flow-active .macc-pb-card:has(.macc-pb-card__radio:focus-visible) {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
#macc-pb-step-title:focus {
    outline: 3px solid var(--bs-primary);
    outline-offset: 4px;
}


/* ─── 8. Alpine x-cloak (evita flash markup prima del mount) ─── */
[x-cloak] { display: none !important; }

/* ─── 9. (legacy) Spinner Step 3 — sostituito da combobox in sezione 13 ─── */

/* ─── 10. Step 7 — payment methods ─── */
.macc-pb-pm-card { cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.macc-pb-pm-card:hover { border-color: var(--bs-primary) !important; background: rgba(94, 29, 84, 0.03); }
.macc-pb-pm-card:has(input:checked) { border-color: var(--bs-primary) !important; background: rgba(94, 29, 84, 0.05); }
.macc-pb-pm-icon img { max-height: 24px; width: auto; }

/* Card disabled: grigia, cursore not-allowed, hover non evidenzia */
.macc-pb-pm-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f6f6f6;
}
.macc-pb-pm-disabled:hover {
    border-color: #dee2e6 !important;
    background: #f6f6f6 !important;
}
.macc-pb-pm-disabled input[type="radio"] { cursor: not-allowed; }

/* ─── 11. Page.php container outer mt-4 reset ─── */
/* musei-unica/page.php:50 ha `<div class="d-flex flex-column flex-md-row mt-4">`
 * che aggiunge margin-top inutile sopra il flow (la stepper full-width gestisce
 * già la separazione). Override scoped per non rompere altre pagine. */
body.macc-pb-flow-active .container > .d-flex.flex-column.flex-md-row.mt-4 {
    margin-top: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 12 — Step 2 pixel-perfect (card grigia + custom combobox WAI-ARIA)
 * ═══════════════════════════════════════════════════════════════════════ */

/* Subtitle Step 2: testo grigio scuro + link viola sottolineato */
body.macc-pb-flow-active .macc-pb-step-subtitle {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    line-height: 1.55;
    color: #333;
}
body.macc-pb-flow-active .macc-pb-step-subtitle a {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Card container che racchiude i 3 combobox — sfondo rosa chiaro tinto del primary
 * (consistente con pattern card selected step 1). */
body.macc-pb-flow-active .macc-pb-step2-card {
    background: rgba(var(--bs-primary-rgb), 0.06);
    padding: 2.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Sezioni interne (Mese / Giorno+Ora) */
body.macc-pb-flow-active .macc-pb-step2-section {
    margin-bottom: 2rem;
}
body.macc-pb-flow-active .macc-pb-step2-section:last-child { margin-bottom: 0; }

body.macc-pb-flow-active .macc-pb-step2-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-step2-section-desc {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.55;
    color: #555;
}

/* Grid 2 colonne Giorno + Orario */
body.macc-pb-flow-active .macc-pb-step2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
body.macc-pb-flow-active .macc-pb-combobox-field { min-width: 0; }
body.macc-pb-flow-active .macc-pb-combobox-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: #555;
    margin-bottom: 0.35rem;
}

/* ───── Combobox container ───── */
body.macc-pb-flow-active .macc-pb-combobox {
    position: relative;
    max-width: 320px;
}

/* Toggle button visuale */
body.macc-pb-flow-active .macc-pb-combobox-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #5c6f82;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.3;
    color: #1a1a1a;
    /* Il valore corrente (selezionato) appare in grassetto nel button. */
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle:hover { border-color: var(--bs-primary); }
body.macc-pb-flow-active .macc-pb-combobox-toggle:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-color: var(--bs-primary);
}
body.macc-pb-flow-active .macc-pb-combobox-toggle[aria-expanded="true"] {
    border-color: var(--bs-primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f0f0f0;
}
body.macc-pb-flow-active .macc-pb-combobox-chevron {
    flex-shrink: 0;
    color: #5c6f82;
    transition: transform 0.15s ease;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle[aria-expanded="true"] .macc-pb-combobox-chevron {
    transform: rotate(180deg);
}

/* Listbox overlay */
body.macc-pb-flow-active .macc-pb-combobox-listbox {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #ffffff;
    border: 1px solid var(--bs-primary);
    border-top: 0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"] {
    padding: 0.625rem 1rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.1s ease;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"] strong {
    display: block;
    font-size: 1rem;
    font-weight: 300;       /* light di default per le opzioni non selezionate */
    color: #1a1a1a;
    line-height: 1.3;
}
/* L'opzione corrispondente al valore selezionato è in grassetto. */
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"].is-selected strong {
    font-weight: 700;
}
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"] small {
    display: block;
    font-size: 0.875rem;
    color: #5c6f82;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"].is-active {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border-left-color: var(--bs-primary);
}
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"].is-selected {
    background: rgba(var(--bs-primary-rgb), 0.10);
    border-left-color: var(--bs-primary);
}
body.macc-pb-flow-active .macc-pb-combobox-listbox [role="option"].is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
body.macc-pb-flow-active .macc-pb-combobox-empty {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    color: #5c6f82;
    font-style: italic;
}

/* Native select: nascosto su desktop, visibile su mobile come picker OS */
body.macc-pb-flow-active .macc-pb-combobox-native {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    pointer-events: none;
}

/* Loading / error helpers */
body.macc-pb-flow-active .macc-pb-step2-loading {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #5c6f82;
    font-style: italic;
}

/* ───── Mobile (< 768px): native select visibile, combobox nascosto ───── */
@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-step2-card {
        padding: 1.5rem 1.25rem;
    }
    body.macc-pb-flow-active .macc-pb-step2-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    body.macc-pb-flow-active .macc-pb-step2-card .macc-pb-combobox { max-width: none; }
    /* Scope a .macc-pb-step2-card: SOLO Step 2 usa native picker OS su mobile.
     * Step 3 e altri combobox custom restano visibili (decisione Paolo:
     * consistenza UI desktop+mobile). */
    body.macc-pb-flow-active .macc-pb-step2-card .macc-pb-combobox-toggle,
    body.macc-pb-flow-active .macc-pb-step2-card .macc-pb-combobox-toggle--borderless,
    body.macc-pb-flow-active .macc-pb-step2-card .macc-pb-combobox-toggle--compact,
    body.macc-pb-flow-active .macc-pb-step2-card .macc-pb-combobox-listbox { display: none !important; }
    body.macc-pb-flow-active .macc-pb-step2-card .macc-pb-combobox-native {
        position: static;
        opacity: 1;
        pointer-events: auto;
        width: 100%;
        padding: 0.75rem 1rem;
        background: #ffffff;
        border: 1px solid #5c6f82;
        border-radius: 4px;
        font-size: 1rem;
        line-height: 1.3;
        color: #1a1a1a;
        appearance: auto;
        -webkit-appearance: menulist;
    }
    body.macc-pb-flow-active .macc-pb-step2-section-title { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 13 — Step 3 pixel-perfect (tabella biglietti + combobox compatti)
 * ═══════════════════════════════════════════════════════════════════════ */

/* Tabella container */
body.macc-pb-flow-active .macc-pb-step3-table {
    margin-top: 1.5rem;
    border-top: 1px solid #d4d4d4;
}

/* Header — ordine: Tipologia | Importo | Quantità */
body.macc-pb-flow-active .macc-pb-step3-thead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 120px;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #d4d4d4;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Riga — stesso ordine */
body.macc-pb-flow-active .macc-pb-step3-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 120px;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid #d4d4d4;
}
body.macc-pb-flow-active .macc-pb-step3-row:last-child { border-bottom: 0; }

/* Cella tipologia: solo nome + tooltip, nessun prezzo unitario sotto */
body.macc-pb-flow-active .macc-pb-step3-cell--type {
    display: flex;
    align-items: center;
    min-width: 0;
}
body.macc-pb-flow-active .macc-pb-step3-pt-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    /* Nomi lunghi (es. "Accompagnatori visitatori con disabilità") wrappano */
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Cella importo: subtotale dinamico (cost × qty) o "Gratis" */
body.macc-pb-flow-active .macc-pb-step3-cell--amount {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-step3-amount { color: #1a1a1a; }
body.macc-pb-flow-active .macc-pb-step3-free {
    color: #008a3a;
    font-weight: 600;
}

/* Cella quantità: combobox borderless */
body.macc-pb-flow-active .macc-pb-combobox--qty {
    max-width: 110px;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle--borderless {
    background: transparent;
    border: 0;
    padding: 0.5rem 0;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 700;
    min-width: 70px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s ease;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle--borderless:hover { color: var(--bs-primary); }
body.macc-pb-flow-active .macc-pb-combobox-toggle--borderless:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 2px;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle--borderless .macc-pb-combobox-chevron {
    color: var(--bs-primary);
    transition: transform 0.15s ease;
}
body.macc-pb-flow-active .macc-pb-combobox-toggle--borderless[aria-expanded="true"] .macc-pb-combobox-chevron {
    transform: rotate(180deg);
}

/* Listbox quantità (toggle borderless): bordo completo (no border-top:0) */
body.macc-pb-flow-active .macc-pb-combobox--qty .macc-pb-combobox-listbox {
    max-height: 260px;
    border: 1px solid var(--bs-primary);
    border-radius: 4px;
    margin-top: 4px;
}
body.macc-pb-flow-active .macc-pb-combobox--qty .macc-pb-combobox-listbox [role="option"] {
    padding: 0.4rem 1rem;
}
body.macc-pb-flow-active .macc-pb-combobox--qty .macc-pb-combobox-listbox [role="option"] strong {
    font-size: 1rem;
}
body.macc-pb-flow-active .macc-pb-combobox--qty .macc-pb-combobox-listbox [role="option"].is-disabled {
    opacity: 0.4;
}

/* Tooltip (i) */
body.macc-pb-flow-active .macc-pb-tooltip {
    position: relative;
    display: inline-flex;
}
body.macc-pb-flow-active .macc-pb-tooltip-trigger {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: help;
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
}
body.macc-pb-flow-active .macc-pb-tooltip-trigger:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 50%;
}
body.macc-pb-flow-active .macc-pb-tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 4px;
    width: max-content;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body.macc-pb-flow-active .macc-pb-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
}

/* Footer totale parziale */
body.macc-pb-flow-active .macc-pb-step3-total {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(var(--bs-primary-rgb), 0.06);
}
body.macc-pb-flow-active .macc-pb-step3-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
body.macc-pb-flow-active .macc-pb-step3-total-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-step3-total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary);
}
body.macc-pb-flow-active .macc-pb-step3-total-count {
    font-size: 0.875rem;
    color: #555;
    margin-top: 0.25rem;
}

/* Warning */
body.macc-pb-flow-active .macc-pb-step3-warning {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef3e0;
    border-left: 4px solid #d4880a;
    color: #5e3a00;
    font-size: 0.9375rem;
    line-height: 1.4;
}
body.macc-pb-flow-active .macc-pb-step3-warning svg {
    flex-shrink: 0;
    color: #d4880a;
}

/* ═══════════════════════════════════════════════════════════════
 * MOBILE: replica mockup esatto — tabella compatta 3 colonne
 * Header VISIBILE, righe single-line con nomi che wrappano.
 * Native <select> al posto del custom combobox.
 * ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    /* Header rimane visibile (con typo più compatta) */
    body.macc-pb-flow-active .macc-pb-step3-thead {
        grid-template-columns: minmax(0, 1fr) 80px 70px;
        gap: 0.5rem;
        padding: 0.75rem 0;
        font-size: 0.875rem;
    }
    body.macc-pb-flow-active .macc-pb-step3-row {
        grid-template-columns: minmax(0, 1fr) 80px 70px;
        gap: 0.5rem;
        padding: 1rem 0;
        align-items: center;
    }
    body.macc-pb-flow-active .macc-pb-step3-pt-name {
        font-size: 0.9375rem;
        line-height: 1.35;
        flex: 1 1 auto;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    body.macc-pb-flow-active .macc-pb-step3-cell--amount {
        font-size: 0.9375rem;
    }

    /* Quantità mobile: STESSO custom combobox borderless del desktop.
     * Nessun fallback native — il listbox Alpine si apre anche al tap.
     * (Decisione Paolo: consistenza UI cross-device, no picker OS qui.) */
    body.macc-pb-flow-active .macc-pb-step3-cell--qty .macc-pb-combobox {
        max-width: 70px;
        flex: 0 0 auto;
    }
    body.macc-pb-flow-active .macc-pb-step3-cell--qty .macc-pb-combobox-toggle--borderless {
        min-width: 50px;
        font-size: 0.9375rem;
    }
    /* Listbox opzioni touch-friendly */
    body.macc-pb-flow-active .macc-pb-step3-cell--qty .macc-pb-combobox-listbox [role="option"] {
        padding: 0.625rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Tooltip mobile: testo più piccolo, posizione a sx per non uscire dallo schermo */
    body.macc-pb-flow-active .macc-pb-tooltip-content {
        font-size: 0.8125rem;
        left: 0;
        max-width: min(280px, calc(100vw - 32px));
    }
    body.macc-pb-flow-active .macc-pb-tooltip-content::after {
        left: 12px;
    }

    /* Totale parziale: meno enfatico su mobile */
    body.macc-pb-flow-active .macc-pb-step3-total-amount { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 14 — Step 5 dati personali (pixel-perfect mockup)
 * ═══════════════════════════════════════════════════════════════════════ */

/* Fieldset intestatario: sfondo rosa chiaro, padding generoso */
body.macc-pb-flow-active .macc-pb-step5-fieldset {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-radius: 0;
    padding: 2rem;
    margin: 1rem 0 1.5rem 0;
}
/* Titolo card "Intestatario prenotazione" — h3 in alto-sinistra, niente
 * più <legend> che ha rendering nativo che taglia il bordo del fieldset. */
body.macc-pb-flow-active .macc-pb-step5-fieldset-title {
    margin: 0 0 1.25rem 0;
    padding: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-step5-fieldset .form-control {
    background: #ffffff;
    border: 1px solid #5c6f82;
    border-radius: 4px;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
}
body.macc-pb-flow-active .macc-pb-step5-fieldset .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
    outline: none;
}
body.macc-pb-flow-active .macc-pb-step5-fieldset label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-step5-fieldset .form-text {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #5c6f82;
    line-height: 1.4;
}

/* Sezione Consensi */
body.macc-pb-flow-active .macc-pb-step5-consensi {
    padding: 0;
    border: 0;
    margin: 1rem 0 1.5rem 0;
}
body.macc-pb-flow-active .macc-pb-step5-consensi-title {
    margin: 0 0 0.75rem 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-step5-consensi .form-check {
    margin-bottom: 0.5rem;
}
body.macc-pb-flow-active .macc-pb-step5-consensi .form-check-input {
    accent-color: var(--bs-primary);
}
body.macc-pb-flow-active .macc-pb-step5-consensi a {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-step5-fieldset {
        padding: 1.25rem 1rem;
        margin-left: 0;
        margin-right: 0;
    }
    body.macc-pb-flow-active .macc-pb-step5-fieldset-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    body.macc-pb-flow-active .macc-pb-step5-fieldset .form-control {
        font-size: 16px; /* >= 16px previene zoom automatico iOS Safari sull'input focus */
    }
    body.macc-pb-flow-active .macc-pb-form--step-5 .row.g-3 > [class*="col-"] {
        margin-bottom: 0.75rem;
    }
}
@media (max-width: 480px) {
    body.macc-pb-flow-active .macc-pb-step5-fieldset {
        padding: 1rem 0.875rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 15 — Stepper: check verde sugli step completati
 * ═══════════════════════════════════════════════════════════════════════ */

body.macc-pb-flow-active .macc-pb-stepper-check {
    /* Allinea l'icona alla baseline del testo dell'item stepper
     * (il <li> usa align-items: baseline da BI). */
    display: inline-block;
    margin-left: 0.35rem;
    line-height: 1;
    align-self: center;
    vertical-align: middle;
    transform: translateY(0.15em);
}
/* Override BI: `.steppers-header li.confirmed .icon { fill: viola }` ha
 * specificità più alta del mio default. Replico la specificità BI E aggiungo
 * .confirmed per battere il fill viola con il verde. */
body.macc-pb-flow-active .steppers .steppers-header ul li.confirmed .macc-pb-stepper-check .icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: #008a3a !important;
    margin: 0;
}

/* Mobile stepper: l'attuale CSS già nasconde i testi degli step non-current.
 * Su mobile l'icona check non è significativa (lo step "corrente" è l'unico
 * visibile come label esteso). Nascondiamo per consistenza. */
@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-stepper-check { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 16 — Step 6 riepilogo (replica mockup Designers Italia)
 *  4 card rosa chiaro: Esperienza, Data e orario, Intestatario, Stai acquistando.
 *  Link "Modifica" in alto a destra di ogni card.
 * ═══════════════════════════════════════════════════════════════════════ */

body.macc-pb-flow-active .macc-pb-form--step-6 > .macc-pb-step6-card {
    margin-bottom: 1.25rem;
}
body.macc-pb-flow-active .macc-pb-form--step-6 > .macc-pb-step6-card:last-of-type {
    margin-bottom: 1.5rem;
}

body.macc-pb-flow-active .macc-pb-step6-card {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-radius: 0;
    padding: 1.75rem 2rem;
}

body.macc-pb-flow-active .macc-pb-step6-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.macc-pb-flow-active .macc-pb-step6-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

body.macc-pb-flow-active .macc-pb-step6-modifica {
    color: var(--bs-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
    transition: color 0.15s ease;
}
body.macc-pb-flow-active .macc-pb-step6-modifica:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

body.macc-pb-flow-active .macc-pb-step6-card-body {
    color: #1a1a1a;
}

body.macc-pb-flow-active .macc-pb-step6-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}
body.macc-pb-flow-active .macc-pb-step6-value--strong {
    font-weight: 700;
    font-size: 1.0625rem;
}

body.macc-pb-flow-active .macc-pb-step6-value-muted {
    margin: 0.25rem 0 0 0;
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.4;
}
body.macc-pb-flow-active .macc-pb-step6-separator {
    margin: 0 0.375rem;
    color: #999;
}

body.macc-pb-flow-active .macc-pb-step6-field-group {
    margin-bottom: 0.875rem;
}
body.macc-pb-flow-active .macc-pb-step6-field-group:last-child {
    margin-bottom: 0;
}
body.macc-pb-flow-active .macc-pb-step6-label {
    margin: 0 0 0.125rem 0;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.3;
}

body.macc-pb-flow-active .macc-pb-step6-section {
    margin-bottom: 1rem;
}
body.macc-pb-flow-active .macc-pb-step6-section:last-child {
    margin-bottom: 0;
}
body.macc-pb-flow-active .macc-pb-step6-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.75rem 0;
}

body.macc-pb-flow-active .macc-pb-step6-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.375rem 0;
    font-size: 1rem;
    line-height: 1.4;
}
body.macc-pb-flow-active .macc-pb-step6-row-label { color: #1a1a1a; }
body.macc-pb-flow-active .macc-pb-step6-row-amount {
    font-weight: 600;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-step6-free {
    color: #008a3a;
    font-weight: 600;
}

body.macc-pb-flow-active .macc-pb-step6-divider {
    border: 0;
    border-top: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    margin: 1.25rem 0;
}

body.macc-pb-flow-active .macc-pb-step6-coupon-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}
body.macc-pb-flow-active .macc-pb-step6-coupon-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}
body.macc-pb-flow-active .macc-pb-step6-coupon-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    background: #ffffff;
    border: 1px solid #5c6f82;
    border-radius: 4px;
    font-size: 1rem;
    color: #1a1a1a;
    box-sizing: border-box;
    min-width: 0;
}
body.macc-pb-flow-active .macc-pb-step6-coupon-input:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
}
body.macc-pb-flow-active .macc-pb-step6-coupon-input:disabled {
    background: #f0f0f0;
    color: #999;
}
body.macc-pb-flow-active .macc-pb-step6-coupon-btn {
    flex-shrink: 0;
    min-width: 100px;
}
body.macc-pb-flow-active .macc-pb-step6-coupon-error {
    margin-top: 0.5rem;
    color: #d4380a;
    font-size: 0.875rem;
}
body.macc-pb-flow-active .macc-pb-step6-coupon-success {
    margin-top: 0.5rem;
    color: #008a3a;
    font-size: 0.875rem;
    font-weight: 600;
}

body.macc-pb-flow-active .macc-pb-step6-totals {
    margin-top: 0.5rem;
}
body.macc-pb-flow-active .macc-pb-step6-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.375rem 0;
    font-size: 1rem;
    line-height: 1.4;
}
body.macc-pb-flow-active .macc-pb-step6-total-label { color: #555; }
body.macc-pb-flow-active .macc-pb-step6-total-value {
    color: #1a1a1a;
    font-weight: 600;
}
body.macc-pb-flow-active .macc-pb-step6-total-value--discount {
    color: #008a3a;
}
body.macc-pb-flow-active .macc-pb-step6-total-row--final {
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(var(--bs-primary-rgb), 0.3);
}
body.macc-pb-flow-active .macc-pb-step6-total-label-final {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-step6-total-value-final {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary);
}

@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-step6-card {
        padding: 1.25rem 1.5rem;
    }
    body.macc-pb-flow-active .macc-pb-step6-card-title {
        font-size: 1rem;
    }
    body.macc-pb-flow-active .macc-pb-step6-modifica {
        font-size: 0.9375rem;
    }
    body.macc-pb-flow-active .macc-pb-step6-coupon-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    body.macc-pb-flow-active .macc-pb-step6-coupon-btn {
        width: 100%;
    }
    body.macc-pb-flow-active .macc-pb-step6-total-label-final {
        font-size: 1rem;
    }
    body.macc-pb-flow-active .macc-pb-step6-total-value-final {
        font-size: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 17 — Step 7 metodo di pagamento (replica mockup Designers Italia)
 *  Callout TOTALE DA PAGARE in alto + lista gateway radio+label con badge.
 * ═══════════════════════════════════════════════════════════════════════ */

body.macc-pb-flow-active .macc-pb-step7-total-callout {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border-left: 4px solid var(--bs-primary);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
body.macc-pb-flow-active .macc-pb-step7-total-label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bs-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
body.macc-pb-flow-active .macc-pb-step7-total-amount {
    margin: 0.5rem 0 0 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bs-primary);
    line-height: 1.1;
}

body.macc-pb-flow-active .macc-pb-step7-gateways {
    border: 0;
    margin: 0 0 1.5rem 0;
    padding: 0;
}
body.macc-pb-flow-active .macc-pb-step7-gateways-legend {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.75rem 0;
    padding: 0;
    width: auto;
}

body.macc-pb-flow-active .macc-pb-step7-gateway {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: #f5f5f5;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
body.macc-pb-flow-active .macc-pb-step7-gateway:hover:not(.is-disabled) {
    background: #efefef;
}
body.macc-pb-flow-active .macc-pb-step7-gateway:has(input:checked) {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border-color: var(--bs-primary);
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
body.macc-pb-flow-active .macc-pb-step7-gateway input[type="radio"] {
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--bs-primary);
    width: 1.125rem;
    height: 1.125rem;
}
body.macc-pb-flow-active .macc-pb-step7-gateway input[type="radio"]:disabled {
    accent-color: #999;
}

body.macc-pb-flow-active .macc-pb-step7-gateway-content {
    flex: 1;
    min-width: 0;
}
body.macc-pb-flow-active .macc-pb-step7-gateway-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-disabled .macc-pb-step7-gateway-title {
    color: #5c6f82;
}

body.macc-pb-flow-active .macc-pb-step7-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
body.macc-pb-flow-active .macc-pb-step7-badge--disabled {
    background: #e0e0e0;
    color: #5c6f82;
}
body.macc-pb-flow-active .macc-pb-step7-badge--test {
    background: #fef3e0;
    color: #d4880a;
}

body.macc-pb-flow-active .macc-pb-step7-gateway-icon {
    flex-shrink: 0;
}
body.macc-pb-flow-active .macc-pb-step7-gateway-icon img {
    max-height: 24px;
    width: auto;
}

@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-step7-total-amount {
        font-size: 1.5rem;
    }
    body.macc-pb-flow-active .macc-pb-step7-gateway {
        padding: 0.875rem 1rem;
    }
    body.macc-pb-flow-active .macc-pb-step7-gateway-title {
        font-size: 0.9375rem;
    }
    body.macc-pb-flow-active .macc-pb-step7-badge {
        font-size: 0.6875rem;
    }
}

/* ─── Sezione 17.b — Demo gateway (badge DEMO + cornice arancio) ─── */
body.macc-pb-flow-active .macc-pb-step7-badge--demo {
    background: #ffe5b3;
    color: #b35900;
    border: 1px solid #d4880a;
    font-weight: 700;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-demo {
    background: #fff8e7;
    border-left: 4px solid #d4880a;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-demo:hover {
    background: #fff0d4;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-demo:has(input:checked) {
    background: #ffe5b3;
    border-color: #d4880a;
}

/* ═══════════════════════════════════════════════════════════════════════
 *  SEZIONE 18 — Step Conferma "Acquisto effettuato" (pixel-perfect mockup)
 *  Hero usa STEP_TITLES['conferma'] = "Acquisto effettuato" (flow-shell);
 *  stepper soppresso sullo step conferma; check verde + card + box info + ICS.
 * ═══════════════════════════════════════════════════════════════════════ */

/* Success block centrato sotto l'hero */
body.macc-pb-flow-active .macc-pb-conferma-success {
    text-align: center;
    padding: 3rem 1rem 2rem;
    max-width: 720px;
    margin: 0 auto;
}
body.macc-pb-flow-active .macc-pb-conferma-check {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    line-height: 0;
}
body.macc-pb-flow-active .macc-pb-conferma-check .icon {
    width: 4rem;
    height: 4rem;
    fill: #008a3a !important;
}
body.macc-pb-flow-active .macc-pb-conferma-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-conferma-text {
    font-size: 1rem;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.6;
}
body.macc-pb-flow-active .macc-pb-conferma-email {
    color: var(--bs-primary);
    text-decoration: underline;
    word-break: break-all;
}
body.macc-pb-flow-active .macc-pb-conferma-email:hover {
    color: #1a1a1a;
}

/* Card riepilogo */
body.macc-pb-flow-active .macc-pb-conferma-card {
    margin-bottom: 2rem;
}
body.macc-pb-flow-active .macc-pb-conferma-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}
body.macc-pb-flow-active .macc-pb-conferma-detail {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-conferma-detail strong {
    color: var(--bs-primary);
    font-weight: 700;
    margin-right: 0.25rem;
}

/* Tabella biglietti */
body.macc-pb-flow-active .macc-pb-conferma-table {
    width: 100%;
    margin-top: 1.5rem;
    border-collapse: collapse;
}
body.macc-pb-flow-active .macc-pb-conferma-table thead th {
    border-bottom: 1px solid #cccccc;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: left;
    background: transparent;
}
body.macc-pb-flow-active .macc-pb-conferma-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #efefef;
    font-size: 1rem;
    color: #1a1a1a;
    vertical-align: middle;
}
body.macc-pb-flow-active .macc-pb-conferma-table tfoot td {
    padding: 1rem;
    border-top: 2px solid #1a1a1a;
    font-size: 1.0625rem;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-conferma-table .text-end {
    text-align: right;
}
body.macc-pb-flow-active .macc-pb-conferma-free {
    color: #008a3a;
    font-weight: 600;
}

/* Dettagli pagamento (Stripe) */
body.macc-pb-flow-active .macc-pb-conferma-payment {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e6e6e6;
}
body.macc-pb-flow-active .macc-pb-conferma-payment-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.875rem 0;
}
body.macc-pb-flow-active .macc-pb-conferma-payment-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    margin: 0;
}
body.macc-pb-flow-active .macc-pb-conferma-payment-list dt {
    font-weight: 600;
    color: #5a6772;
}
body.macc-pb-flow-active .macc-pb-conferma-payment-list dd {
    margin: 0;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-conferma-payment-list code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875rem;
    background: #f5f5f5;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    color: #1a1a1a;
}
@media (max-width: 480px) {
    body.macc-pb-flow-active .macc-pb-conferma-payment-list {
        grid-template-columns: 1fr;
        row-gap: 0.25rem;
    }
    body.macc-pb-flow-active .macc-pb-conferma-payment-list dd {
        margin-bottom: 0.5rem;
    }
}

/* Box "Cosa sapere per prepararsi" */
body.macc-pb-flow-active .macc-pb-conferma-info-box {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border-left: 4px solid var(--bs-primary);
    padding: 1.75rem 2rem;
    margin: 2rem 0;
}
body.macc-pb-flow-active .macc-pb-conferma-info-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
}
body.macc-pb-flow-active .macc-pb-conferma-info-content ul {
    margin: 0;
    padding-left: 1.25rem;
}
body.macc-pb-flow-active .macc-pb-conferma-info-content li {
    margin-bottom: 0.5rem;
    line-height: 1.55;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-conferma-info-content li:last-child {
    margin-bottom: 0;
}
body.macc-pb-flow-active .macc-pb-conferma-info-content a {
    color: var(--bs-primary);
    text-decoration: underline;
}
body.macc-pb-flow-active .macc-pb-conferma-info-content a:hover {
    color: #1a1a1a;
}

/* Sezione calendario */
body.macc-pb-flow-active .macc-pb-conferma-calendar {
    margin: 2rem 0 3rem;
}
body.macc-pb-flow-active .macc-pb-conferma-calendar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
}
body.macc-pb-flow-active .macc-pb-conferma-calendar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: underline;
    font-size: 1rem;
}
body.macc-pb-flow-active .macc-pb-conferma-calendar-link .icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}
body.macc-pb-flow-active .macc-pb-conferma-calendar-link:hover {
    color: #1a1a1a;
}

/* Mobile */
@media (max-width: 767.98px) {
    body.macc-pb-flow-active .macc-pb-conferma-success {
        padding: 2rem 1rem 1.5rem;
    }
    body.macc-pb-flow-active .macc-pb-conferma-check .icon {
        width: 3.25rem;
        height: 3.25rem;
    }
    body.macc-pb-flow-active .macc-pb-conferma-title {
        font-size: 1.375rem;
    }
    body.macc-pb-flow-active .macc-pb-conferma-card-title {
        font-size: 1.25rem;
    }
    body.macc-pb-flow-active .macc-pb-conferma-table thead th,
    body.macc-pb-flow-active .macc-pb-conferma-table tbody td,
    body.macc-pb-flow-active .macc-pb-conferma-table tfoot td {
        padding: 0.625rem 0.5rem;
        font-size: 0.9375rem;
    }
    body.macc-pb-flow-active .macc-pb-conferma-info-box {
        padding: 1.25rem 1.5rem;
    }
}

/* ─── Sezione 17.c — Badge "Solo cassa" per gateway offline (POS/Contanti) ─── */
body.macc-pb-flow-active .macc-pb-step7-badge--offline {
    background: #e6f3fa;
    color: #005f94;
    border: 1px solid #007BBD;
    font-weight: 700;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-offline {
    background: #f0f7fb;
    border-left: 4px solid #007BBD;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-offline:hover {
    background: #e1eef6;
}
body.macc-pb-flow-active .macc-pb-step7-gateway.is-offline:has(input:checked) {
    background: #d4e9f2;
    border-color: #007BBD;
}

/* ─── Sezione 17.d — Stripe Elements inline in Step 7 ─── */
body.macc-pb-flow-active .macc-pb-step7-stripe {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 6px;
}
body.macc-pb-flow-active .macc-pb-step7-stripe-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
}
body.macc-pb-flow-active .macc-pb-step7-stripe-element {
    min-height: 200px;
}
body.macc-pb-flow-active .macc-pb-step7-stripe-error {
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: #fef2f2;
    border: 1px solid #d4380a;
    color: #d4380a;
    border-radius: 4px;
    font-size: 0.9375rem;
}

/* ─── Sezione 17.e — QR Stripe inline in Step 7 ─── */
body.macc-pb-flow-active .macc-pb-step7-qr .macc-pb-step7-qr-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}
body.macc-pb-flow-active .macc-pb-step7-qr-image {
    width: 240px;
    height: 240px;
    image-rendering: pixelated;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #ffffff;
    padding: 8px;
}
body.macc-pb-flow-active .macc-pb-step7-qr-help {
    margin: 1rem 0 0.25rem;
    font-size: 0.95rem;
    color: #1a1a1a;
}
body.macc-pb-flow-active .macc-pb-step7-qr-fallback {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #555;
}
body.macc-pb-flow-active .macc-pb-step7-qr-fallback a {
    color: #007BBD;
    text-decoration: underline;
}
body.macc-pb-flow-active .macc-pb-step7-qr-status {
    margin: 0;
    font-size: 0.875rem;
    color: #5a6772;
    font-style: italic;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
body.macc-pb-flow-active .macc-pb-step7-qr-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #007BBD;
    border-radius: 50%;
    animation: macc-pb-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes macc-pb-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50%      { opacity: 1;   transform: scale(1.1); }
}

/* ─── QR top (immagine + helper + fallback link), sempre visibile finché non paid ─── */
body.macc-pb-flow-active .macc-pb-step7-qr-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-bottom: 1rem;
}
body.macc-pb-flow-active .macc-pb-step7-qr-top[hidden] {
    display: none;
}

/* ─── Box di stato sotto il QR (waiting/method/paying/paid/confirmed) ─── */
body.macc-pb-flow-active .macc-pb-step7-qr-statusbox {
    border-top: 1px solid #e6e6e6;
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}
body.macc-pb-flow-active .macc-pb-step7-qr-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}
body.macc-pb-flow-active .macc-pb-step7-qr-state[hidden] {
    display: none;
}
/* waiting: il QR è dentro a .macc-pb-step7-qr-state[data-state="waiting"] e usa
   le classi .macc-pb-step7-qr-image / -help / -fallback / -status già esistenti. */
body.macc-pb-flow-active .macc-pb-step7-qr-step-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e6e6e6;
    border-top-color: #007BBD;
    border-radius: 50%;
    animation: macc-pb-step7-spin 0.8s linear infinite;
}
body.macc-pb-flow-active .macc-pb-step7-qr-step-check {
    width: 56px;
    height: 56px;
    background: #008a3a;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    animation: macc-pb-pop 0.35s ease-out;
}
@keyframes macc-pb-pop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
body.macc-pb-flow-active .macc-pb-step7-qr-step-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #007BBD;
}
body.macc-pb-flow-active .macc-pb-step7-qr-step-title--success {
    color: #008a3a;
}
body.macc-pb-flow-active .macc-pb-step7-qr-step-text {
    margin: 0;
    max-width: 380px;
    font-size: 0.9375rem;
    color: #1a1a1a;
    line-height: 1.5;
}
body.macc-pb-flow-active .macc-pb-step7-qr-step-text strong {
    color: #d4380a;
    font-weight: 700;
}
body.macc-pb-flow-active .macc-pb-step7-loading {
    align-self: center;
    color: #5a6772;
    font-size: 0.9375rem;
    font-style: italic;
}

/* ─── Loading card prominente Step 7 (Stripe activate) ─── */
body.macc-pb-flow-active .macc-pb-step7-loading-card {
    margin: 1.5rem 0;
    padding: 2rem 1rem;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}
body.macc-pb-flow-active .macc-pb-step7-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e6e6e6;
    border-top-color: #007BBD;
    border-radius: 50%;
    animation: macc-pb-step7-spin 0.8s linear infinite;
}
@keyframes macc-pb-step7-spin {
    to { transform: rotate(360deg); }
}
body.macc-pb-flow-active .macc-pb-step7-loading-text {
    margin: 0;
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

/* ─── AJAX step navigation overlay ─── */
#macc-pb-flow-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
#macc-pb-flow-overlay.is-visible {
    display: flex;
}
.macc-pb-flow-overlay-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e6e6e6;
    border-top-color: #007BBD;
    border-radius: 50%;
    animation: macc-pb-spin 0.8s linear infinite;
}
@keyframes macc-pb-spin {
    to { transform: rotate(360deg); }
}
body.macc-pb-flow-active .is-loading {
    opacity: 0.7;
    cursor: progress;
}
