/* Widget di prenotazione e pagina «La tua prenotazione»: una colonna stretta, pensata per il telefono.
   Colori, angoli e tema sono variabili CSS (--green, --on-accent, --r-control, data-theme) che il ristoratore può cambiare. */
.widget { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 20px; }
.widget-head { display: flex; flex-direction: column; gap: 6px; }
.widget-head h1 { font-size: 1.8rem; }
.widget-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* L'immagine di testata (versione U): una fascia 3:1 sopra il nome del locale. L'altezza è riservata, così la pagina non salta quando l'immagine arriva. */
.widget-banner { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--r-panel); margin-bottom: 8px; background: var(--green-soft); }
.widget-logo { display: block; max-width: 220px; max-height: 72px; width: auto; height: auto; object-fit: contain; }

/* Selettore della lingua (IT / EN). */
.lang-switch { display: inline-flex; gap: 4px; flex: none; }
.lang-btn { min-height: 36px; min-width: 44px; padding: 0 10px; font-size: 0.85rem; }
.lang-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--on-accent); }

.welcome { color: var(--ink); }

.step { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); }

.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.people-btn { min-height: 64px; font: 600 1.4rem var(--font-display); }
.people-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--on-accent); }

.meal { display: flex; flex-direction: column; gap: 8px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot-btn { min-height: 52px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.slot-available { background: var(--green-soft); border-color: var(--green); color: var(--green-text); }
@media (hover: hover) { .slot-available:hover { background: color-mix(in srgb, var(--green) 24%, var(--surface)); } }
.slot-waitlist { background: var(--amber-soft); border-color: var(--amber); color: var(--amber-ink); }
@media (hover: hover) { .slot-waitlist:hover { background: color-mix(in srgb, var(--amber) 30%, var(--surface)); } }

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { flex: none; width: 16px; height: 16px; border: 1px solid; border-radius: 4px; }

.widget .choice { display: flex; align-items: flex-start; gap: 10px; }
.widget .choice input { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.privacy-link { font-size: 0.9rem; }

.summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.notice-wait { background: var(--amber-soft); color: var(--amber-ink); }

/* Pagina «La tua prenotazione». */
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-text); font-weight: 700;
}
.status-chip-wait { background: var(--amber-soft); color: var(--amber-ink); }
.status-chip-off { background: var(--grey-soft); color: var(--muted); }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Menù pubblico. */
.menu-section { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.menu-section h2 { padding-bottom: 6px; border-bottom: 2px solid var(--green); }
.menu-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
/* Versione W: il testo del piatto (e i pulsanti dell'ordine) sta in una colonna accanto alla miniatura. */
.menu-item-corpo { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.menu-item:first-child { border-top: 0; }
.menu-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.menu-item-name { font-size: 1.05rem; overflow-wrap: anywhere; }
.menu-price { flex: none; font-weight: 600; }
.menu-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-item-out .menu-item-name { text-decoration: line-through; color: var(--muted); }
.menu-item-out { opacity: 0.8; }
/* La foto del piatto (versione T): proporzioni fisse 4:3 così la pagina non si sposta mentre si carica. Dalla versione W è una miniatura accanto al nome (è un pulsante: apre la foto ingrandita). */
.menu-item-photo {
  display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-control, 8px); background: var(--rule);
}
.menu-item-thumb { flex: none; padding: 0; border: 0; background: none; border-radius: var(--r-control, 8px); cursor: zoom-in; line-height: 0; }
.menu-item-thumb .menu-item-photo { width: 96px; max-width: none; height: 72px; }
.menu-item-photo-grande { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 4 / 3; margin: 0 auto; object-fit: contain; border-radius: var(--r-control, 8px); background: var(--rule); cursor: zoom-out; }
.menu-note { color: var(--muted); font-size: 0.95rem; }

/* Pagina del tavolo (ordini dal tavolo). */
.order-qty { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.qty-btn { min-width: 48px; min-height: 48px; padding: 0; font-size: 1.4rem; line-height: 1; }
.qty-value { min-width: 28px; text-align: center; font-weight: 700; font-size: 1.15rem; }
.order-note { width: 100%; }
.order-lines { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
.order-bar {
  position: sticky; bottom: 0; display: flex; justify-content: center; padding: 10px 0;
  background: var(--paper); border-top: 1px solid var(--rule);
}
.order-bar .btn { min-width: 70%; }

/* Pagina del feedback. */
.star-row { display: flex; gap: 6px; }
.star-btn { min-width: 52px; min-height: 52px; padding: 0; font-size: 1.7rem; line-height: 1; color: var(--amber); }
.star-btn[aria-pressed="true"] { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.stars { color: var(--amber); letter-spacing: 2px; white-space: nowrap; }
.stars-big { font-size: 1.8rem; }

@media (max-width: 380px) {
  .people-grid { grid-template-columns: repeat(3, 1fr); }
  .slot-grid { grid-template-columns: repeat(2, 1fr); }
  .widget-logo { max-width: 160px; }
}

/* Campo-trappola: fuori dallo schermo, non nel flusso della pagina. */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Esigenze, eventi, avvisi. */
.needs-field { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.events-box { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--rule); }
.event-public { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--paper); }
.event-public h3, .event-public h4 { font-size: 1.1rem; }
.event-menu-public { white-space: pre-line; padding: 10px 12px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: var(--r-control); }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Menù del giorno. */
.menu-daily { border-color: var(--green); background: var(--green-soft); }
.menu-daily-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* Versione stampabile del menù: niente pulsanti, colori neutri, una colonna larga. */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .no-print, .lang-switch, .order-bar { display: none !important; }
  .widget { max-width: none; padding: 0; gap: 12px; }
  .widget-head h1 { font-size: 1.6rem; }
  .menu-section, .menu-daily { background: #fff; border: 0; border-radius: 0; padding: 8px 0; break-inside: avoid; }
  .menu-section h2 { border-bottom: 1px solid #000; }
  .menu-item { border-top: 1px solid #ccc; break-inside: avoid; }
  .menu-item-thumb { display: none; }
  .menu-item:first-child { border-top: 0; }
  .muted, .menu-note { color: #333 !important; }
  .pill { border: 1px solid #666; background: #fff !important; color: #000 !important; }
  a { color: #000; text-decoration: none; }
}

.event-banner { margin: 0; padding: 8px 12px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: var(--r-control); }
