/* Aggiunte per la messa online: errori del form, conferma, banner cookie, pagine legali */
.notice[hidden] { display: none; }
.store--off { opacity: .45; cursor: not-allowed; }
.form-msg { margin: 6px 0 0; font-size: 13px; line-height: 1.4; }
.form-msg--err { color: var(--c-alert); font-weight: 600; }
.field[aria-invalid="true"] { border-color: var(--c-alert); }
.check a, .cookie-banner a { color: inherit; text-decoration: underline; }
.btn[disabled] { opacity: .6; cursor: progress; }

.ticket--ok { text-align: center; }
.ticket--ok .ticket__step { align-items: center; gap: 14px; }
.ok__row { font-size: 18px; line-height: 1.5; color: var(--c-ink); }
.ok__code { font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-green-900); }
.ok__code b { font-size: 22px; }

.cookie-banner {
  position: fixed; z-index: 1000; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 760px;
  display: flex; gap: 16px; align-items: center; padding: 18px 20px;
  background: var(--c-green-900); color: var(--c-paper); border-radius: var(--r-card); box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-size: 14px; line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn--ghost { background: transparent; color: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-paper); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
@media (max-width: 640px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-banner__actions .btn { flex: 1; } }

/* pagine privacy / cookie */
.doc { max-width: 860px; margin: 0 auto; padding: 48px var(--gutter) 80px; color: var(--c-ink); line-height: 1.65; }
.doc h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin: 0 0 24px; }
.doc h2 { font-size: 22px; margin: 32px 0 10px; }
.doc h3 { font-size: 17px; margin: 22px 0 8px; }
.doc a { color: var(--c-green-900); }
.doc ul { padding-left: 20px; }
.doc .back { display: inline-block; margin-bottom: 24px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* thank you page */
.ty { background: var(--c-green-900); color: var(--c-paper); }
.ty__inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 440px); gap: clamp(32px, 5vw, 120px); align-items: center; padding-block: clamp(56px, 6vw, 120px); }
.ty__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.ty__title { margin: 0; font-weight: 700; font-size: clamp(42px, 4.8vw, 96px); line-height: .98; letter-spacing: -.035em; color: var(--c-paper); }
.ty__title span { display: block; color: var(--c-orange); }
.ty__lead { max-width: 720px; font-size: clamp(17px, 1.25vw, 24px); line-height: 1.45; opacity: .8; margin: 0; }
.ty__card { width: min(100%, 640px); margin: 8px 0 0; padding: 22px 28px; background: var(--c-paper); color: var(--c-ink); border-radius: var(--r-card); display: grid; gap: 12px; }
.ty__card[hidden], .ty__actions[hidden], .ty__qr[hidden] { display: none; }
.ty__card div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ty__card dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); white-space: nowrap; }
.ty__card dd { margin: 0; font-weight: 600; font-size: clamp(15px, 1vw, 19px); text-align: right; }
.ty__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn--outline { background: transparent; color: var(--c-paper); box-shadow: inset 0 0 0 1.5px rgba(245,247,243,.45); }
.btn--outline:hover { background: rgba(255,255,255,.08); }
.ty__qr { justify-self: end; width: 100%; max-width: 440px; background: var(--c-white); color: var(--c-ink); border-radius: 36px; padding: clamp(24px, 2.5vw, 44px); display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.ty__qrimg { width: 100%; aspect-ratio: 1; }
.ty__qrimg svg { width: 100%; height: 100%; display: block; }
.ty__code { margin: 6px 0 0; font-family: var(--f-mono); font-weight: 700; font-size: clamp(24px, 2vw, 34px); letter-spacing: .12em; }
.ty__hint { margin: 0; font-size: 15px; color: var(--c-muted); }
.ty__pill { background: var(--c-orange); color: var(--c-white); font-weight: 600; font-size: 14px; padding: 6px 16px; border-radius: var(--r-pill); }
.grazie__next { padding-block: clamp(48px, 5vw, 96px); }
.grazie__steps { list-style: none; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grazie__steps .step-head__num { display: block; margin-bottom: 8px; }
.grazie__back { margin-top: 40px; text-align: center; }
@media (max-width: 1100px) { .ty__inner { grid-template-columns: 1fr; } .ty__qr { justify-self: start; max-width: 420px; } }
@media (max-width: 760px) { .grazie__steps { grid-template-columns: 1fr !important; } .ty__card div { flex-direction: column; align-items: flex-start; gap: 2px; } .ty__card dd { text-align: left; } .ty__actions .btn { width: 100%; } }
@media print { .site-header, .grazie__next, .site-footer, .cookie-banner, .ty__actions { display: none !important; } .ty { background: #fff; color: #000; } }
