/* 2.10 (13/10) Avvisi in stile Apple: pillola di vetro (Antonio: «La notifica deve essere stile Apple» · «Sempre in vetro» ·
   «Ci sta la piccola, potremmo farla uscire in modo diverso affinché non si accavalli alle notifiche del dispositivo»).
   Solo icona tonda (rossa «!», verde ✓, blu «i») e messaggio: niente mittente ne' «adesso», cosi' non sembra una notifica
   del telefono (quelle vere arriveranno con l'app). Sale dal BASSO, al centro, sopra le barre della pagina (common.js
   calcola --tn-gap: carrello, schede, pulsante «Invia» del pannello aperto); le notifiche del telefono scendono dall'alto.
   Vetro chiaro o scuro come il tema. Un tocco o uno scorrimento in giu' la chiude. Costruita da common.js › raceToast.
   «html body #toast.toast» per vincere le vecchie regole del riquadro (styles.css, guest.css, app-telefono.css). */
html body #toast.toast, html body #toast.toast[popover] {
  --tn-glass: rgba(255, 255, 255, .5); --tn-edge: rgba(255, 255, 255, .75); --tn-ink: #000000;
  position: fixed; z-index: 2147483600;
  inset: auto auto calc(max(16px, env(safe-area-inset-bottom) + 10px) + var(--tn-gap, 0px)) 50%;
  display: flex; align-items: center; gap: 10px; box-sizing: border-box;
  width: max-content; max-width: min(400px, calc(100vw - 32px)); height: auto; margin: 0; padding: 8px 18px 8px 8px;
  border: 0; border-radius: 26px; overflow: visible;
  background: linear-gradient(160deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 55%), var(--tn-glass); color: var(--tn-ink);
  -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%);
  box-shadow: inset 0 0 0 1px var(--tn-edge), inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 34px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
  font: 600 15px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.012em; text-align: left;
  opacity: 0; pointer-events: none; transform: translate(-50%, 24px) scale(.86);
  transition: transform .5s cubic-bezier(.2, 1.35, .35, 1), opacity .22s ease;
  touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
/* scuro: il vetro scuro di iPhone (tema Notte o «Automatico» col telefono scuro: theme.js; menu del locale scuro) */
html[data-theme="dark"] body #toast.toast, html body:has(.g-app.is-dark) #toast.toast, html body:has(.g-m2.is-dark) #toast.toast {
  --tn-glass: rgba(30, 30, 32, .55); --tn-edge: rgba(255, 255, 255, .16); --tn-ink: #FFFFFF;
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 50%), var(--tn-glass);
  box-shadow: inset 0 0 0 1px var(--tn-edge), inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 40px rgba(0, 0, 0, .45);
}
html body #toast.toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
html body #toast.toast.is-leaving { opacity: 0; transform: translate(-50%, 18px) scale(.92); transition: transform .3s cubic-bezier(.5, 0, .75, 0), opacity .3s ease; }
html body #toast.toast .tn-ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; color: #FFFFFF; background: #0A84FF; }
html body #toast.toast[data-kind="error"] .tn-ico { background: #FF3B30; }
html body #toast.toast[data-kind="success"] .tn-ico { background: #34C759; }
html body #toast.toast .tn-ico svg { width: 16px; height: 16px; }
html body #toast.toast .tn-msg { min-width: 0; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { html body #toast.toast, html body #toast.toast.is-leaving { transition: opacity .2s ease; } }
