/* Ua Che Switch! – pagine per il cliente (gestione prenotazione, sondaggio) */
:root { --accent: #b3261e; --ink: #1f1b17; --muted: #776e65; --line: #e5ddd3; --bg: #f4efe9; --card: #fff; --ok: #1e7a46; --ok-bg: #e3f3e9; --warn-bg: #fff3dc; --bad: #b42318; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.pf-top { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; }
.pf-top img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.pf-main { max-width: 560px; margin: 0 auto; padding: 20px 16px 32px; }
.pf-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 28px; }
.pf-card { background: var(--card); border-radius: 20px; padding: 22px 20px; box-shadow: 0 6px 30px rgba(60, 40, 20, .07); display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.pf-muted { color: var(--muted); font-size: 14px; margin: 0; }
.pf-lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 6px; display: block; }
.pf-status { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: #f1ece6; }
.pf-status b { font-size: 18px; }
.pf-status span { font-size: 15px; color: #4b443d; }
.pf-status.ok { background: var(--ok-bg); } .pf-status.ok b { color: var(--ok); }
.pf-status.wait { background: var(--warn-bg); } .pf-status.wait b { color: #8a5300; }
.pf-status.hot { background: var(--accent); } .pf-status.hot b, .pf-status.hot span { color: #fff; }
.pf-status.off b { color: var(--muted); }
.pf-recap { display: flex; flex-direction: column; gap: 12px; }
.pf-r-ev { font-weight: 800; font-size: 18px; color: var(--accent); }
.pf-r-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.pf-r-grid > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.pf-r-grid small { display: block; color: var(--muted); font-size: 12px; }
.pf-r-grid b { font-size: 16px; }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 600; text-align: right; }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; }
.pf-btn.big { min-height: 56px; font-size: 17px; }
.pf-btn.ghost { background: transparent; color: var(--accent); }
.pf-btn[disabled] { opacity: .6; cursor: wait; }
.pf-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.pf-cal .pf-btn { min-height: 42px; font-size: 14px; }
details.pf-modify > summary { list-style: none; }
details.pf-modify > summary::-webkit-details-marker { display: none; }
.pf-mod-body { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.pf-mod-body input { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; background: #fff; }
.pf-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.pf-slot { min-height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.pf-slot.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-slot:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.pf-link { background: none; border: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px; }
.pf-link.danger { color: var(--bad); }
.pf-err { color: var(--bad); font-size: 14px; }
.pf-err:empty { display: none; }
.pf-notice { background: #fff; border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.pf-notice.ok { border-color: var(--ok); color: var(--ok); }
.pf-notice.warn { border-color: #d08700; }
.pf-sep { height: 1px; background: var(--line); margin: 18px 0 14px; }
.pf-center { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; background: var(--card); border-radius: 20px; padding: 28px 20px; }
.pf-big-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 30px; line-height: 64px; }
.pf-center .pf-btns { width: 100%; }
/* sondaggio */
.pf-main > h1 + .pf-muted { margin-bottom: 16px; }
.pf-survey { background: var(--card); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.pf-stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.pf-stars input { position: absolute; opacity: 0; pointer-events: none; }
.pf-stars label { font-size: 44px; color: #ddd3c8; cursor: pointer; line-height: 1; transition: color .1s, transform .1s; }
.pf-stars label:active { transform: scale(.92); }
.pf-stars input:checked ~ label, .pf-stars label:hover, .pf-stars label:hover ~ label { color: var(--accent); }
.pf-survey textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; min-height: 110px; resize: vertical; }
/* gioco */
.pf-game { background: var(--card); border-radius: 20px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; overflow: hidden; }
.pf-wheel-wrap { position: relative; width: min(320px, 82vw); aspect-ratio: 1; margin: 6px auto; }
.pf-wheel { position: absolute; inset: 0; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--accent), 0 12px 40px rgba(0,0,0,.18); transition: transform 5s cubic-bezier(.12,.68,.08,1); }
.pf-wheel::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.pf-seg { position: absolute; left: 50%; top: 0; width: 84px; margin-left: -42px; height: 50%; transform-origin: 50% 100%; padding-top: 16px; font-size: 11px; font-weight: 800; line-height: 1.15; color: #6b5a48; text-transform: uppercase; letter-spacing: .02em; }
.pf-seg.prize { color: #fff; }
.pf-pointer { position: absolute; left: 50%; top: -14px; width: 0; height: 0; transform: translateX(-50%); border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 28px solid var(--ink); z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.pf-win, .pf-lose { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; width: 100%; }
.pf-win { background: var(--ok-bg); } .pf-win b { color: var(--ok); font-size: 20px; }
.pf-win code { font-size: 20px; font-weight: 800; background: #fff; padding: 2px 8px; border-radius: 8px; letter-spacing: .08em; }
.pf-lose { background: #f1ece6; } .pf-lose b { font-size: 17px; }
.pf-rules { font-size: 12px; }
.pf-confetti { position: fixed; top: -12px; width: 8px; height: 14px; border-radius: 2px; z-index: 99; animation: pf-fall 3s ease-in forwards; }
@keyframes pf-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
/* tessera fedeltà */
.pf-loyal { border: 1.5px dashed var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.pf-loyal h2 { font-size: 16px; margin: 0; }
.pf-loyal .pf-pts { font-size: 30px; font-weight: 800; color: var(--accent); }
.pf-prog { height: 10px; background: #efe9e2; border-radius: 99px; overflow: hidden; }
.pf-prog i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.pf-vch { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.pf-vch code { font-weight: 800; letter-spacing: .06em; }
.pf-gamebox { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #f5b700)); color: #fff; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pf-gamebox b { font-size: 17px; }
.pf-gamebox .pf-btn { background: #fff; color: var(--accent); border-color: #fff; }
/* v3.1: area cliente, gift card, menu link */
.pf-sec { display: flex; flex-direction: column; gap: 8px; }
.pf-sec h2, .pf-prefs summary h2 { font-size: 18px; margin: 6px 0 2px; }
.pf-prefs summary { cursor: pointer; list-style: none; }
.pf-prefs summary::-webkit-details-marker { display: none; }
.pf-prefs summary h2::after { content: " ›"; color: var(--muted); }
.pf-prefs[open] summary h2::after { content: " ⌄"; }
.pf-prefs > *:not(summary) { margin-top: 10px; }
.pf-bk { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); text-decoration: none; color: var(--ink); }
.pf-bk-d { display: flex; flex-direction: column; font-size: 15px; }
.pf-bk-d small { color: var(--muted); font-size: 13px; }
.pf-bk-s { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--muted); }
.pf-bk-s.st-confirmed, .pf-bk-s.st-active { color: var(--ok); background: var(--ok-bg); }
.pf-bk-s.st-pending, .pf-bk-s.st-waitlist, .pf-bk-s.st-awaiting_payment { color: #8a5300; background: var(--warn-bg); }
.pf-bk-s.st-offered, .pf-bk-s.st-go { color: #fff; background: var(--accent); }
.pf-small { font-size: 13px; }
.pf-notice { border-radius: 12px; padding: 12px 14px; background: var(--warn-bg); font-size: 15px; }
.pf-login input[type="email"] { width: 100%; min-height: 50px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 16px; margin-bottom: 10px; }
.pf-login form { display: flex; flex-direction: column; }
.pf-err { color: var(--bad); font-size: 14px; min-height: 1em; }
.pf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-row2 select { min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 10px; font: inherit; background: #fff; }
.pf-tg { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.pf-tg input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; }
.pf-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
.pf-link.danger { color: var(--bad); }
.pf-out { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
.pf-vch { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 2px dashed var(--accent); border-radius: 14px; }
.pf-vch code { font-size: 18px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.pf-giftcard { background: var(--accent); color: #fff; border-radius: 20px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; box-shadow: 0 14px 40px rgba(0,0,0,.15); }
.pf-giftcard img { width: 100%; border-radius: 12px; margin-bottom: 6px; }
.pf-giftcard small { opacity: .9; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.pf-gc-amt { font-size: 42px; font-weight: 800; line-height: 1.1; }
.pf-giftcard code { background: #fff; color: var(--accent); border-radius: 10px; padding: 8px 16px; font-size: 22px; font-weight: 800; letter-spacing: .12em; }
.pf-gc-msg { margin: 0; background: var(--bg); border-radius: 14px; padding: 14px 16px; font-style: italic; }
.pf-gc-msg cite { display: block; font-style: normal; color: var(--muted); font-size: 14px; margin-top: 6px; }
@media print { .pf-top, .pf-foot, .pf-noprint, .pf-btn, .pf-chat-fab, .pf-chat { display: none !important; } body { background: #fff; } .pf-card { box-shadow: none; } .pf-giftcard { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* modulo gift card dentro la pagina standalone */
.pf-card .pf-gshop .pf-title { font-size: 24px; margin: 0 0 6px; }
.pf-card .pf-gshop input[type="text"], .pf-card .pf-gshop input[type="email"], .pf-card .pf-gshop input[type="number"], .pf-card .pf-gshop textarea { min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff; }
.pf-card .pf-gshop .pf-row-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 520px) { .pf-card .pf-gshop .pf-row-2 { grid-template-columns: 1fr 1fr; } }
.pf-card .pf-gshop .pf-submit { min-height: 54px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; }
.pf-card .pf-gshop .pf-error { color: var(--bad); font-size: 13px; }
.pf-card .pf-gshop .pf-hint, .pf-card .pf-gshop .pf-small { color: var(--muted); font-size: 14px; margin: 0; }
.pf-card .pf-gshop .pf-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.pf-card .pf-gshop .pf-alert { background: #fde8e6; color: var(--bad); border-radius: 10px; padding: 10px 12px; }
.pf-card .pf-gshop { --pf-accent: var(--accent); }

/* stato ordine */
.pf-steps { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.pf-steps li { position: relative; padding: 0 0 18px 30px; color: #8a8178; font-weight: 600; }
.pf-steps li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d9cfc4; background: #fff; box-sizing: border-box; }
.pf-steps li::after { content: ""; position: absolute; left: 12px; top: 20px; bottom: 2px; width: 2px; background: #e7dfd6; }
.pf-steps li:last-child::after { display: none; }
.pf-steps li.done { color: #1f1b17; }
.pf-steps li.done::before { background: var(--accent); border-color: var(--accent); }
.pf-steps li.cur { color: var(--accent); font-size: 18px; }
.pf-steps li.cur::before { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); animation: pfPulse 1.6s ease infinite; }
@keyframes pfPulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 6%, transparent); } }
@media (prefers-reduced-motion: reduce) { .pf-steps li.cur::before { animation: none; } }
.pf-olines { border-top: 1px solid #efe8e0; margin: 8px 0; }
.pf-olines > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #efe8e0; }
.pf-olines small { display: block; color: #776e65; font-size: 13px; }
.pf-olines .pf-otot { font-weight: 800; font-size: 18px; border-bottom: 0; }
.pf-privacy table { width: 100%; border-collapse: collapse; }
.pf-privacy td, .pf-privacy th { border: 1px solid #e5ddd3; padding: 6px 8px; text-align: left; vertical-align: top; }
.pf-status.bad { background: #fde8e6; } .pf-status.bad b { color: #b42318; }

/* orario previsto e rider */
.pf-eta { margin: 12px 0; padding: 14px 16px; border-radius: 16px; background: var(--accent); color: #fff; display: flex; flex-direction: column; gap: 2px; }
.pf-eta small { opacity: .9; font-size: 14px; }
.pf-eta b { font-size: 38px; line-height: 1.1; letter-spacing: -.02em; }
.pf-eta span { font-size: 15px; opacity: .95; }
.pf-eta.wait { background: #fff4d6; color: #5c4a14; }
.pf-late { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #fff4d6; color: #5c4a14; font-size: 14px; }
#pf-map-wrap { margin-top: 14px; }
#pf-map { height: 320px; border-radius: 16px; overflow: hidden; background: #e9e4dc; }
.pf-pin { background: transparent; border: 0; }
.pf-pin span { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; font-size: 20px; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.pf-pin.rider span { background: var(--accent); }

/* informativa privacy */
.pf-embed .pf-top, .pf-embed .pf-foot { display: none; }
.pf-embed .pf-main { padding-top: 8px; }
.pf-embed .pf-card { box-shadow: none; padding: 4px 4px 24px; }
.pf-privacy h2 { font-size: 18px; margin: 22px 0 8px; }
.pf-privacy p, .pf-privacy li { font-size: 15px; line-height: 1.55; }
.pf-privacy table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pf-privacy th, .pf-privacy td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid #eee; }
.pf-privacy th { background: #faf6f1; }
@media (max-width: 560px) { .pf-privacy table, .pf-privacy tbody, .pf-privacy tr, .pf-privacy td { display: block; } .pf-privacy thead { display: none; } .pf-privacy tr { padding: 8px 0; border-bottom: 1px solid #eee; } .pf-privacy td { border: 0; padding: 2px 0; } .pf-privacy td + td { color: #6b6158; font-size: 13px; } }

/* notifiche cliente */
.pf-notify { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pf-notify-msg:empty { display: none; }
.pf-ocard { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #eee; }
.pf-ocard > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-ocard .pf-btn { flex: 0 0 auto; }
.pf-odisc span { color: #1e6b3e; }

/* conto dal tavolo */
.pf-bill h1 { margin-bottom: 12px; }
.pb-sum { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--accent); color: #fff; margin-bottom: 12px; }
.pb-sum small { opacity: .9; font-size: 14px; }
.pb-sum b { font-size: 36px; line-height: 1.1; letter-spacing: -.02em; }
.pb-sum span { font-size: 14px; opacity: .95; }
.pb-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); margin-top: 6px; }
.pb-bar i { display: block; height: 6px; border-radius: 3px; background: #fff; }
.pb-lines { margin: 4px 0 14px; }
.pb-lines summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: 40px; }
.pb-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f0ebe5; font-size: 15px; }
.pb-line.paid { color: #8a8178; text-decoration: line-through; }
.pb-tot { border-bottom: 0; font-weight: 700; }
.pb-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: #f1ece6; }
.pb-seg button { min-height: 46px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: #4b443d; cursor: pointer; }
.pb-seg button.on { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(40,25,10,.1); }
.pb-opt { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.pb-opt p { margin: 0; }
.pb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pb-step { display: inline-flex; align-items: center; gap: 4px; }
.pb-step button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #ddd3c8; background: #fff; font-size: 20px; cursor: pointer; }
.pb-step button:disabled { opacity: .35; }
.pb-step b { min-width: 28px; text-align: center; font-size: 18px; }
.pb-tip { display: flex; flex-direction: column; gap: 6px; }
.pb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pb-chips button { min-height: 42px; min-width: 56px; padding: 0 12px; border-radius: 12px; border: 1.5px solid #ddd3c8; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pb-chips button.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pb-name { min-height: 46px; border-radius: 12px; border: 1.5px solid #ddd3c8; padding: 0 12px; font: inherit; font-size: 16px; }
.pb-pay { width: 100%; min-height: 56px; font-size: 18px; }
.pb-note { display: block; text-align: center; margin: 6px 0 14px; }
.pb-back { display: inline-block; margin-top: 14px; }
