/* Stili base condivisi: reset, schermata, tipografia, animazioni. Richiede tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/* Zoom scelto dall'utente: ingrandisce tutto (testi, icone, spazi). Le altezze a tutto schermo si dividono per lo zoom,
   altrimenti 100dvh diventerebbe più alto dello schermo (verificato su Chromium, come la WebView di Android). */
html { zoom: var(--fa-zoom); }
body {
  background: var(--fa-background);
  color: var(--fa-testo);
  font: 400 14px/1.5 var(--fa-font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { min-height: calc(100dvh / var(--fa-zoom)); }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Schermata: colonna a tutta altezza con safe area nativa (niente status bar finta "9:41" dei mock). */
.fa-schermata {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh / var(--fa-zoom));
  padding: calc(env(safe-area-inset-top) + 16px) var(--fa-schermata-px) calc(env(safe-area-inset-bottom) + 16px);
  gap: var(--fa-gap-lg);
  animation: fa-ingresso var(--fa-durata-ingresso) ease;
}
.fa-schermata--con-tab { padding-bottom: calc(var(--fa-tab-bar-h) + env(safe-area-inset-bottom) + 16px); }
.fa-schermata--primary { background: var(--fa-primary); color: #fff; }
.fa-schermata--ink { background: var(--fa-ink); color: #fff; }
.fa-schermata--scanner { background: var(--fa-scanner-bg); color: #fff; }
.fa-schermata--olive { background: var(--fa-olive); color: #fff; }
.fa-spazio { flex: 1; }

/* Tipografia (scala dell'handoff) */
.fa-importo-xl { font: 800 40px/1.1 var(--fa-font-display); }
.fa-titolo-successo { font: 800 26px/1.1 var(--fa-font-display); }
.fa-titolo-schermata { font: 700 22px/1.2 var(--fa-font-display); margin: 0; }
.fa-titolo-sezione { font: 700 20px/1.2 var(--fa-font-display); margin: 0; }
.fa-nome-ristorante { font: italic 600 18px/1.2 var(--fa-font-serif); }
.fa-testo-2 { color: var(--fa-text-2); }
.fa-testo-3 { color: var(--fa-text-3); }
.fa-caption { font-size: 12px; color: var(--fa-text-4); }
.fa-meta { font-size: 11px; color: var(--fa-text-3); }
.fa-overline { font: 700 11px/1 var(--fa-font-body); letter-spacing: .06em; text-transform: uppercase; }
.fa-overline--olive { color: var(--fa-olive); }

/* Segnaposto per le pagine ancora da realizzare (da rimuovere a sviluppo completato). */
.fa-todo {
  border: 1.5px dashed var(--fa-border-strong);
  border-radius: var(--fa-r-xl);
  padding: var(--fa-gap-lg);
  font-size: 12.5px;
  color: var(--fa-text-2);
  background: var(--fa-surface);
}
.fa-todo h3 { margin: 0 0 6px; font: 700 13px var(--fa-font-body); color: var(--fa-primary); }
.fa-todo ul { margin: 0; padding-left: 18px; }
.fa-todo code { font-size: 11px; }

/* Animazioni */
@keyframes fa-ingresso { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fa-pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fa-scanline { 0% { top: 6%; } 50% { top: 90%; } 100% { top: 6%; } }
.fa-pop { animation: fa-pop var(--fa-durata-pop) ease; }
