/* =====================================================================
   Funnel biglietti — carrello in pagina (prima di Stripe)
   Usa token e componenti di shared/css/style.css
   ===================================================================== */
.co-open, .co-open body { overflow: hidden; }

.co { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px 16px; }
.co[hidden] { display: none; }
.co__backdrop { position: absolute; inset: 0; background: rgba(7,26,51,.72); opacity: 0; transition: opacity .2s; backdrop-filter: blur(4px); }
.co__panel {
  position: relative; width: min(620px, 100%); max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--grey); color: var(--navy); border-radius: 24px; padding: 40px 40px 32px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
  opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .2s, transform .25s cubic-bezier(.2,.7,.2,1);
}
.co.is-open .co__backdrop { opacity: 1; }
.co.is-open .co__panel { opacity: 1; transform: none; }

.co__x { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--white); color: var(--navy); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 1px 2px rgba(11,37,69,.12); }
.co__x:hover { background: var(--ice); }
.co__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; padding-right: 48px; }
.co__title { font-size: clamp(28px, 4vw, 36px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; }

/* scelta biglietto */
.co__tickets { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.co__opt {
  position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center;
  padding: 18px 20px; background: var(--white); border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.co__opt:hover { border-color: #C9D6EA; }
.co__opt input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 50%; border: 2px solid #C9D6EA; display: grid; place-items: center; cursor: pointer; }
.co__opt input::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform .15s; }
.co__opt input:checked { border-color: var(--blue); }
.co__opt input:checked::after { transform: scale(1); }
.co__opt:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,232,.15); }
.co__opt input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.co__opt-body { display: flex; flex-direction: column; gap: 2px; }
.co__opt-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.co__opt-desc { font-size: 14px; line-height: 1.45; color: var(--muted); }
.co__opt-desc b { color: var(--navy); }
.co__opt-price { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; }
.co__opt-tag { position: absolute; top: -10px; right: 18px; background: var(--blue); color: var(--white); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.co__opt--best { background: linear-gradient(180deg, #F3F8FF 0%, var(--white) 100%); }

/* riepilogo */
.co__sum { background: #E8ECF2; border-radius: 16px; padding: 20px 22px; margin-bottom: 24px; }
.co__sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; padding-bottom: 14px; border-bottom: 1px solid #D5DCE6; }
.co__sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; }
.co__sum-total span { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.co__sum-total strong { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.03em; }
.co__sum-note { font-size: 13px; color: var(--muted); margin-top: 4px; text-align: right; }

/* campi */
.co__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 18px; }
.co__field { display: flex; flex-direction: column; gap: 6px; }
.co__field--full { grid-column: 1 / -1; }
.co__field[hidden] { display: none; }
.co__field span { font-size: 14px; font-weight: 700; }
.co__field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--navy); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 14px; transition: border-color .15s, box-shadow .15s;
}
.co__field input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,232,.15); }
.co__field input.is-invalid { border-color: #D64545; }
.co__tel {
  display: flex; align-items: stretch; background: var(--white);
  border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.co__tel:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,232,.15); }
.co__tel:has(input.is-invalid) { border-color: #D64545; }
.co__field .co__tel-cc {
  display: flex; align-items: center; gap: 8px; flex: none; padding: 0 12px 0 14px;
  font-size: 16px; font-weight: 600; color: var(--navy); border-right: 1.5px solid var(--line);
}
.co__tel-cc svg { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.co__field .co__tel input, .co__field .co__tel input:focus { border: 0; box-shadow: none; background: transparent; padding-left: 12px; min-width: 0; }

.co__check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--muted); margin-bottom: 16px; cursor: pointer; }
.co__check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--blue); }
.co__check input.is-invalid { outline: 2px solid #D64545; outline-offset: 2px; }
.co__check a { color: var(--blue); font-weight: 700; }
.co__error { font-size: 14px; font-weight: 700; color: #C53030; margin-bottom: 12px; }

.co__submit { width: 100%; box-shadow: 0 14px 30px -12px rgba(30,111,232,.8); }
.co__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 18px 0 14px; font-size: 13px; color: var(--muted); }
.co__trust li { display: inline-flex; align-items: center; gap: 6px; }
.co__trust svg { width: 16px; height: 16px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.co__fine { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }

@media (max-width: 560px) {
  .co { padding: 0; place-items: end stretch; }
  .co__panel { width: 100%; max-height: 94svh; border-radius: 22px 22px 0 0; padding: 32px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(40px); }
  .co__x { top: 16px; right: 16px; }
  .co__fields { grid-template-columns: 1fr; }
  .co__opt { padding: 16px; gap: 12px; }
  .co__opt-price { font-size: 19px; }
  .co__sum-total strong { font-size: 28px; }
}

/* ---------- righe biglietto con quantità ---------- */
.co__row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 22px; background: var(--white); border: 1.5px solid var(--line); border-radius: 18px;
  transition: border-color .15s, box-shadow .15s;
}
.co__row.is-on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,232,.12); }
.co__row--vip { background: linear-gradient(180deg, #F3F8FF 0%, var(--white) 100%); }
.co__row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co__row-price { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.co__row-deal { font-family: var(--font-body); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.co__row-deal b { color: var(--blue); }

.co__qty { flex: none; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); }
.co__qty button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--navy); font-size: 22px; line-height: 1; cursor: pointer; transition: background .15s; }
.co__qty button:hover:not(:disabled) { background: var(--ice); }
.co__qty button:disabled { color: #C3CCD8; cursor: default; }
.co__qty output { min-width: 28px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

.co__nudge { margin: 2px 4px 0; padding: 10px 14px; border-radius: 12px; background: rgba(30,111,232,.1); font-size: 14px; color: var(--navy); }
.co__nudge b { color: var(--blue); }
.co__nudge small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.co__nudge small[hidden] { display: none; }

/* riepilogo con sconto */
.co__sum-row { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #D5DCE6; align-items: flex-start; }
.co__sum-row small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.co__sum-row--empty { color: var(--muted); font-weight: 400; }
.co__sum-save { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; color: #11845B; padding-bottom: 12px; border-bottom: 1px solid #D5DCE6; }
.co__sum-total { padding-top: 12px; }
.co__field em { font-style: normal; font-weight: 400; color: var(--muted); }

.co__submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.co__submit.is-loading { opacity: .8; cursor: progress; }
.co__submit.is-loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: var(--white); animation: co-spin .7s linear infinite; }
@keyframes co-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .co__row { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 16px; }
  .co__qty { align-self: flex-start; }
}

/* codice sconto (solo se attivo su Stripe) */
.co__promo { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: #FFF6D6; border: 1px dashed #E9CF6B; font-size: 14px; color: var(--navy); }
.co__promo[hidden] { display: none; }
.co__promo svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
/* link sconto personale: riga nel riepilogo e avviso se scaduto/usato */
.co__sum-promo small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.co__sum-promo small[hidden] { display: none; }
.co__promo--off { background: #FDECEC; border-color: #F0B4B4; }
.co__field span em { font-size: 12px; }

/* un solo biglietto nel carrello */
.co__row[hidden] { display: none; }

/* upsell Standard → VIP */
.co__upsell { display: flex; align-items: center; gap: 18px; margin-top: 4px; padding: 20px 22px; border-radius: 18px; color: var(--white);
  background: linear-gradient(160deg, #12355F 0%, var(--navy) 60%, var(--navy-deep) 100%); box-shadow: 0 18px 40px -24px rgba(11,37,69,.8); }
.co__upsell[hidden] { display: none; }
.co__upsell-text { flex: 1; min-width: 0; }
.co__upsell-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.3; margin-bottom: 8px; }
.co__upsell-title b { color: #B7CFFF; }
.co__upsell ul { display: grid; gap: 4px; margin-bottom: 10px; }
.co__upsell li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.45; color: #D5E1F2; }
.co__upsell li::before { content: '+'; position: absolute; left: 2px; top: -1px; color: #B7CFFF; font-weight: 700; }
.co__upsell-total { font-size: 13px; color: var(--muted-dark); }
.co__upsell-total b { color: var(--white); }
.co__upsell-btn { flex: none; padding: 10px 10px 10px 20px; font-size: 15px; }
@media (max-width: 560px) { .co__upsell { flex-direction: column; align-items: stretch; } .co__upsell-btn { justify-content: space-between; } }

/* VIP: "Vieni con un'altra persona?" */
.co__nudge { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.co__nudge[hidden] { display: none; }
.co__nudge p { flex: 1; font-size: 14px; line-height: 1.5; }
.co__nudge-btn { flex: none; border: 0; cursor: pointer; padding: 10px 16px; border-radius: 999px; background: var(--blue); color: var(--white); font: 700 14px var(--font-body); white-space: nowrap; transition: background .2s; }
.co__nudge-btn:hover { background: var(--blue-dark); }
@media (max-width: 560px) { .co__nudge { flex-direction: column; align-items: stretch; } }

/* ---------- pagina lead: niente prezzi, modulo al posto del carrello ---------- */
.only-lead { display: none !important; }
.is-lead .only-lead { display: revert !important; }
.is-lead .only-checkout { display: none !important; }
.is-lead .ticket__price + .ticket__chips, .is-lead .ticket__head { padding-bottom: 12px; }

.lead__intro { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0 0 22px; }

/* modulo in pagina sotto l'hero + stessa testata nel popup */
.leadbox { padding: 40px 0 clamp(56px, 7vw, 96px); }
.leadbox__card { width: min(680px, 100%); margin-inline: auto; background: var(--grey); border: 1px solid var(--line); border-radius: 24px; padding: 36px 40px 30px; box-shadow: 0 30px 70px -40px rgba(11,37,69,.45); }
.leadbox__ticket { display: block; width: min(420px, 100%); height: auto; margin: -4px auto 22px; filter: drop-shadow(0 16px 24px rgba(11,37,69,.25)); }
.leadbox__panel .leadbox__ticket { width: min(320px, 80%); margin-top: 8px; }
.leadbox__title { font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 10px; text-align: center; }
.leadbox__brand { color: var(--blue); }
.leadbox__when { text-align: center; padding-inline: 48px; margin-bottom: 18px; }
/* popup su mobile: al centro dello schermo, immagine e titolo grandi, tutto visibile senza scrollare */
@media (max-width: 560px) {
  #lead.co { place-items: center; padding: 12px; }
  #lead .leadbox__panel { border-radius: 20px; max-height: calc(100svh - 24px); padding: 18px 18px 16px; transform: translateY(16px) scale(.98); }
  #lead.is-open .leadbox__panel { transform: none; }
  .leadbox__panel .co__x { top: 8px; right: 8px; width: 32px; height: 32px; font-size: 22px; }
  .leadbox__panel .leadbox__when { font-size: 11px; letter-spacing: .14em; padding-inline: 34px; margin-bottom: 8px; }
  .leadbox__panel .leadbox__ticket { width: 92%; margin: 0 auto 10px; }
  .leadbox__panel .leadbox__title { font-size: 20px; line-height: 1.2; margin-bottom: 12px; }
  .leadbox__panel .lead__intro, .leadbox__panel .co__fine { display: none; }
  .leadbox__panel .lead__steps { font-size: 11px; margin-bottom: 8px; }
  .leadbox__panel .co__fields { gap: 10px; margin-bottom: 14px; }
  .leadbox__panel .co__field { gap: 4px; }
  .leadbox__panel .co__field span { font-size: 14px; }
  .leadbox__panel .co__field input { padding: 11px 12px; }
  .leadbox__panel .co__submit { padding: 16px 22px; font-size: 16px; }
  .leadbox__panel .lead__q { margin-bottom: 10px; }
  .leadbox__panel .lead__q legend { margin-bottom: 6px; font-size: 14px; }
  .leadbox__panel .lead__q span { padding: 9px 18px; font-size: 15px; }
  .leadbox__panel .co__check { font-size: 13px; line-height: 1.45; margin-bottom: 12px; }
  .leadbox__panel .lead__step .co__submit + .lead__back { margin-top: 4px; }
}
/* telefoni bassi e browser di Instagram/Facebook: stringe gli spazi */
@media (max-width: 560px) and (max-height: 680px) {
  .leadbox__panel .leadbox__ticket { width: 80%; margin-bottom: 6px; }
  .leadbox__panel .leadbox__title { font-size: 18px; margin-bottom: 8px; }
  .leadbox__panel .co__fields { gap: 8px; margin-bottom: 10px; }
  .leadbox__panel .co__field input { padding: 9px 12px; }
  .leadbox__panel .co__submit { padding: 14px 22px; }
  .leadbox__panel .lead__q { margin-bottom: 6px; }
  .leadbox__panel .co__check { margin-bottom: 8px; }
@media (max-width: 560px) and (max-height: 580px) {
  .leadbox__panel .leadbox__when { margin-bottom: 4px; }
  .leadbox__panel .leadbox__ticket { width: 56%; }
  .leadbox__panel .lead__steps { margin-bottom: 4px; }
  .leadbox__panel .leadbox__title { font-size: 17px; }
}
}
@media (max-width: 560px) { .leadbox__card .leadbox__when { padding-inline: 0; } .leadbox__when span { display: block; } .leadbox__when .leadbox__sep { display: none; } }
.leadbox__card .lead__intro, .leadbox__panel .lead__intro { text-align: center; }
.lead__steps { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.lead__step[hidden] { display: none; }
.lead__step .co__submit + .lead__back { margin-top: 12px; }
.lead__back { display: block; margin: 0 auto; border: 0; background: none; padding: 6px; font: 700 14px var(--font-body); color: var(--muted); cursor: pointer; }
.lead__back:hover { color: var(--navy); }
.lead__form .co__error { margin: 14px 0 0; text-align: center; }
.lead__form .co__fine { margin-top: 14px; }
@media (max-width: 560px) {
  .leadbox { padding-top: 24px; }
  .leadbox__card { padding: 26px 18px 22px; border-radius: 18px; }
}

/* riquadro al posto delle schede dei biglietti */
.leadcta__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.leadcta__ticket { width: 100%; height: auto; filter: drop-shadow(0 20px 30px rgba(11,37,69,.25)); }
.leadcta__text { font-size: 17px; line-height: 1.6; color: var(--muted); margin-bottom: 28px; max-width: 46ch; }
@media (max-width: 860px) { .leadcta__inner { grid-template-columns: 1fr; text-align: center; } .leadcta__ticket { width: min(440px, 100%); margin-inline: auto; } .leadcta__text { margin-inline: auto; } }
.lead__intro b { color: var(--blue); }
.lead__pick, .lead__q { border: 0; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lead__pick legend, .lead__q legend { width: 100%; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--navy); }
.lead__pick label, .lead__q label { position: relative; cursor: pointer; }
.lead__pick input, .lead__q input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lead__pick span, .lead__q span {
  display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: var(--white); color: var(--navy); border: 1.5px solid var(--line); transition: border-color .15s, background .15s, color .15s;
}
.lead__q span { min-width: 72px; justify-content: center; }
.lead__pick input:checked + span, .lead__q input:checked + span { background: var(--navy); color: var(--white); border-color: var(--navy); }
.lead__pick input:focus-visible + span, .lead__q input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.lead__q.is-invalid span { border-color: #D64545; }
/* pagina lead: niente widget WhatsApp fisso (resta solo nella sua thank-you) */
.is-lead #wa { display: none !important; }

/* ---- Hero del funnel lead: il titolo grande è il beneficio ---- */
.hero__pill { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 16px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.is-lead .hero__pill { display: inline-flex !important; }
.hero__pill svg { width: 14px; height: 14px; fill: #6FA8FF; flex: none; }
.hero__kicker { font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #6FA8FF; margin-bottom: 12px; }
.hero .hero__title.hero__title--lead { font-size: clamp(32px, 3.1vw, 46px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 22px; }
.hero__title--lead .hl { color: #6FA8FF; }
@media (max-width: 720px) {
  .hero .hero__title.hero__title--lead { font-size: clamp(26px, 7.5vw, 34px); }
  .hero__pill { font-size: 11px; letter-spacing: .1em; padding: 7px 12px; }
  .hero__kicker { font-size: 11px; }
}

/* ---- Menu da telefono (biglietti e lead): logo al posto dei due relatori ---- */
@media (max-width: 720px) {
  .nav .logo { display: inline-flex; margin-inline: auto; }
  .nav .logo__img { height: 20px; }
  .nav__duo { display: none; }
}

/* Nomi di Mauro e Chiara evidenziati nel sottotitolo dell'hero lead */
.hero__sub.only-lead .hl-name { background: var(--blue); color: var(--white); padding: 1px 6px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Hero lead: meno spazio sopra la pillola della data */
@media (max-width: 720px) { .is-lead .hero { padding-top: calc(64px + var(--topbar)); } }
