/* Pagina della famiglia per la Cena di Natale (cene-pub.js) — 21/11/2026. Pensata per il telefono. */
:root { --verde: #2f7a1f; --wa: #1fa855; --fondo: #f3f5f2; --testo: #1f2933; --grigio: #7b8794; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--fondo); color: var(--testo); -webkit-text-size-adjust: 100%; }
.vuoto { text-align: center; padding: 40px 16px; color: var(--grigio); }
.cap { background: linear-gradient(135deg, #2f7a1f, #3d9a2a); color: #fff; padding: 16px 16px 18px; }
.cap-in { max-width: 640px; margin: 0 auto; display: flex; gap: 12px; align-items: flex-start; }
.cap img { width: 46px; height: 46px; flex: none; background: #fff; border-radius: 50%; padding: 3px; }
.cap h1 { margin: 0 0 4px; font-size: 1.2rem; line-height: 1.25; }
.cap p { margin: 2px 0 0; font-size: .9rem; opacity: .95; }
.cap a { color: #fff; }
main { max-width: 640px; margin: 0 auto; padding: 12px 12px 140px; }
.box { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(11,20,26,.1); }
.box h2 { margin: 0 0 6px; font-size: 1.1rem; }
.box h3 { margin: 0 0 10px; font-size: 1rem; color: var(--verde); }
.box p { margin: 6px 0; font-size: .9rem; line-height: 1.45; }
.box.ok { background: #dcfce7; color: #14532d; }
.box.err { background: #fee2e2; color: #7f1d1d; }
.regole { margin: 8px 0 4px; padding: 0; list-style: none; font-size: .88rem; line-height: 1.45; }
.regole li { padding: 3px 0; }
.nota { color: #52606d; }
.fatto { background: #eef7ea; border-radius: 8px; padding: 8px 10px; color: #14532d; }
.lucchetto { color: var(--grigio); font-size: .8rem !important; }
.sub { color: var(--grigio); font-size: .82rem !important; margin-top: -4px !important; }
.pers { border: 1.5px solid #e4e7eb; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; transition: border-color .15s, background .15s; }
.pers.on { border-color: #9fd18f; background: #f6fbf4; }
.pers-top { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.pers-nome { flex: 1; min-width: 0; }
.pers-nome b { display: block; font-size: .95rem; }
.pers-nome small { color: var(--grigio); font-size: .78rem; }
.pers-prezzo { white-space: nowrap; font-size: .95rem; }
.pers-prezzo s { color: #9aa5b1; font-size: .82rem; }
.sw { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 14px; background: #cbd2d9; cursor: pointer; transition: background .15s; }
.sw::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.sw:checked { background: #25a244; }
.sw:checked::before { transform: translateX(20px); }
.det { margin-top: 8px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 42px; border: 1.5px solid #cbd2d9; background: #fff; border-radius: 21px; font-size: .92rem; font-weight: 600; color: #3e4c59; cursor: pointer; }
.seg button.on { border-color: var(--verde); background: var(--verde); color: #fff; }
.esig-tog { background: none; border: none; padding: 8px 0 2px; color: var(--verde); font-weight: 600; font-size: .86rem; cursor: pointer; text-align: left; }
.esig-tog b { color: #b45309; }
.esig { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.esig-c { display: flex; align-items: center; gap: 8px; font-size: .88rem; padding: 8px 10px; border: 1px solid #e4e7eb; border-radius: 10px; background: #fff; cursor: pointer; }
.esig-c.on { border-color: #f59e0b; background: #fffbeb; }
.esig-c input { width: 18px; height: 18px; margin: 0; flex: none; }
.esig-altro, .ex-nome, .ex-fascia, textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd2d9; border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
.extra .pers-top { cursor: default; }
.ex-nome { flex: 1; min-width: 0; }
.ex-fascia { margin-top: 8px; }
.x { border: none; background: #fee2e2; color: #b91c1c; width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer; flex: none; }
.agg { width: 100%; min-height: 46px; border: 1.5px dashed #9fd18f; background: #f6fbf4; color: var(--verde); border-radius: 12px; font-weight: 700; font-size: .95rem; cursor: pointer; }
.no { text-align: center; font-size: .88rem; color: #52606d; padding: 4px 0 10px; }
.link { background: none; border: none; color: #b91c1c; text-decoration: underline; font-size: .88rem; cursor: pointer; padding: 6px; }
.piede { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -2px 10px rgba(11,20,26,.12); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.piede-in { max-width: 640px; margin: 0 auto; }
.conto { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: #3e4c59; margin-bottom: 8px; }
.conto .tot { margin-left: auto; font-size: 1.15rem; font-weight: 800; color: var(--testo); }
.salva { width: 100%; min-height: 50px; border: none; border-radius: 25px; background: var(--wa); color: #fff; font-size: 1.02rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 6px rgba(31,168,85,.35); }
.salva:disabled { opacity: .6; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: default; opacity: .7; }
/* ★ ingresso con email e codice, chi prenota, riepilogo */
.campo { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; font-weight: 600; color: #3e4c59; margin-bottom: 10px; }
.campo select { width: 100%; padding: 11px 12px; border: 1px solid #cbd2d9; border-radius: 10px; font-size: 16px; font-family: inherit; font-weight: 400; background: #fff; }
.campo input { width: 100%; padding: 11px 12px; border: 1px solid #cbd2d9; border-radius: 10px; font-size: 16px; font-family: inherit; font-weight: 400; }
.campo input.cod { font-size: 1.5rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.riep { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 8px; cursor: pointer; }
.riep input { width: 20px; height: 20px; margin: 0; }
.link.verde { color: var(--verde); }
.box .salva { margin-top: 4px; }
.box.avviso { background: #fffbeb; border: 1.5px solid #f59e0b; color: #78350f; font-size: .9rem; line-height: 1.5; }
.box.avviso a { color: #b45309; font-weight: 700; }
.box.menu { text-align: center; background: #fffdf7; border: 1px solid #eadfc4; padding: 18px 16px; }
.menu-tit { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 700; color: var(--verde); letter-spacing: .02em; margin-bottom: 10px; }
.menu-riga { font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.45; color: #3e2f1c; padding: 2px 6px; }
.menu-nota { font-family: Georgia, "Times New Roman", serif; font-size: .82rem; font-style: italic; color: #7a6a4f; margin-top: 12px; }
.menu-sep { color: #c9a227; font-size: .7rem; line-height: 1; margin: 6px 0; }
.intro h3.come { font-size: .9rem; letter-spacing: .04em; color: var(--verde); margin: 14px 0 6px; }
.nota.piccola { font-size: .8rem; }
.primo { font-size: .9rem; color: #3e4c59; }
/* ★ 25/11 tre stati per persona: Viene / Non viene / Da decidere */
.tri { display: flex; gap: 6px; margin-top: 8px; }
.tri button { flex: 1; min-width: 0; padding: 8px 4px; border: 1.5px solid #cbd2d9; border-radius: 10px; background: #fff; color: #3e4c59; font: inherit; font-size: .82rem; cursor: pointer; }
.tri button.t-si.on { background: #25a244; border-color: #25a244; color: #fff; font-weight: 600; }
.tri button.t-no.on { background: #fee2e2; border-color: #f87171; color: #991b1b; font-weight: 600; }
.tri button.t-dd.on { background: #fef3c7; border-color: #f59e0b; color: #92400e; font-weight: 600; }
.tri button:disabled { opacity: .6; cursor: default; }
.pers.p-no { background: #fafafa; }
.pers.p-no .pers-nome b { color: #7b8794; }
.pers.p-dd { border-style: dashed; border-color: #f5c46b; }
.firma { margin-top: 6px; font-size: .74rem; color: #7b8794; }
/* ★ 30/11 ingresso col codice fiscale del tesserato */
.box.cf { border:2px solid #2f7a1f; }
.campo input.cf-in { text-transform:uppercase; letter-spacing:1px; font-family:ui-monospace,Consolas,monospace; }
.scelta-email { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; margin:6px 0; border:1px solid #d5dde5; border-radius:10px; cursor:pointer; background:#fff; }
.scelta-email input { width:auto; margin:0; }
.scelta-email .sub { margin:0; }
/* ★ 30/11 menù: titolo di portata e le due colonne Giallo / Verde */
.menu-sottotit { font-family: Georgia, "Times New Roman", serif; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9a7b2f; margin-bottom: 2px; }
.menu-due { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0; text-align: center; }
.menu-col { border-radius: 12px; padding: 10px 6px 8px; }
.menu-col.giallo { background: #fef9e1; border: 1px solid #f2d96b; }
.menu-col.verde { background: #eef7ea; border: 1px solid #a7d49b; }
.menu-col-tit { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: .92rem; color: #3e2f1c; margin-bottom: 6px; }
.menu-col-tit small { display: block; font-weight: 400; font-style: italic; font-size: .75rem; color: #7a6a4f; }
.menu-col .menu-riga { font-size: .9rem; line-height: 1.35; padding: 3px 2px; }
.menu-col .menu-riga + .menu-riga { border-top: 1px dotted #d9c99a; }
/* ★ 30/11 sera: ospiti in una finestra (dal riquadro «Prenotazione Non Tesserati») */
/* ★ 03/12: riquadro dei non tesserati (arancio, per distinguerlo da quello verde dei tesserati) */
.box.ospiti-link { border: 2px solid #c2570c; background: #fff8f1; }
.box.ospiti-link h3 { color: #b04a06; }
.box.ospiti-link .salva { background: #c2570c; margin-top: 8px; }
.link.forte { font-weight: 700; font-size: 1rem; }
.velo-osp { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,32,.55); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px; }
.box.finestra { position: relative; width: 100%; max-width: 460px; margin: auto 0; padding-top: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.finestra .chiudi { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eef2f6; color: #3e4c59; font-size: 1rem; cursor: pointer; }
.finestra h3 { padding-right: 40px; }
body.bloccato { overflow: hidden; }
/* ★ 01/12/2026 prenotazione completata: avviso nel piede e pulsante «Chiudi» di un altro colore */
.finito { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; color: #14532d; background: #dcfce7; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.finito b { font-size: 1rem; }
.finito .no-mail { color: #92400e; }
.salva.chiudi { background: #1e3a8a; box-shadow: 0 2px 6px rgba(30,58,138,.35); }
.box.fine { text-align: center; padding: 22px 16px; font-size: 1rem; line-height: 1.5; }
.box.fine .fine-ico { font-size: 2.4rem; }
.box.fine > b { font-size: 1.15rem; }
