/*
 * Gastseite des Gastro-Moduls (Speisekarte, Bestellung, Statusseite, Tisch).
 * Mobil zuerst (375 px), Touch-Flächen >= 44 px, Eingabefelder 16 px (sonst
 * zoomt iOS beim Fokus). Farben kommen als CSS-Variablen aus der View
 * (Kartenfarben) — hier steht nur die Struktur.
 */

.gz {
  --g-radius: 16px;
  min-height: 100vh;
  background: var(--g-bg, #f6f8fc);
  color: var(--g-fg, #15171c);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding-bottom: 120px;
  /* Horizontal-Schutz OHNE Scroll-Container: overflow-x:hidden machte .gz zum
     Scrollport der sticky-Kopfzeile/Kategorie-Leiste, die dann nie klebte
     (die Seite scrollt über das Viewport). clip klemmt nur; hidden bleibt als
     Rückfall für alte Browser stehen. */
  overflow-x: hidden;
  overflow-x: clip;
}
.gz * { box-sizing: border-box; }
.gz-wrap { max-width: 560px; margin: 0 auto; padding: 0 14px; }

/* ---- Kopf ------------------------------------------------------------- */
.gz-head {
  position: sticky; top: 0; z-index: 30;
  background: var(--g-bg, #f6f8fc);
  border-bottom: 1px solid var(--g-border, #e6e9f0);
}
.gz-head-in { display: flex; align-items: center; gap: 12px; padding: 12px 14px; max-width: 560px; margin: 0 auto; }
.gz-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; background: var(--g-card, #eef1f6); }
.gz-logo-fb {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 800; font-size: 17px; background: var(--g-accent, #1d4ed8);
}
.gz-title { min-width: 0; flex: 1; }
.gz-title b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gz-title span { display: block; font-size: 12px; color: var(--g-muted, #667085); margin-top: 1px; }
.gz-back { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--g-muted, #667085); text-decoration: none; font-size: 15px; }

.gz-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.gz-chip.is-open { background: #dcfce7; color: #15803d; }
.gz-chip.is-closed { background: #fee2e2; color: #b91c1c; }

/* ---- Hinweisleisten ---------------------------------------------------- */
.gz-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 13px;
  font-size: 13px; line-height: 1.5; margin: 12px 0;
}
.gz-note i { margin-top: 2px; flex: none; }
.gz-note.is-info { background: color-mix(in srgb, var(--g-accent, #1d4ed8) 10%, transparent); color: var(--g-fg, #15171c); }
.gz-note.is-warn { background: #fff7ed; color: #9a3412; }
.gz-note.is-err { background: #fef2f2; color: #b91c1c; }
.gz-note.is-ok { background: #dcfce7; color: #15803d; }

/* ---- Kategorie-Leiste (Scroll-Spy) ------------------------------------- */
.gz-cats {
  position: sticky; top: 66px; z-index: 25; background: var(--g-bg, #f6f8fc);
  padding: 9px 0 9px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; border-bottom: 1px solid var(--g-border, #e6e9f0);
}
.gz-cats::-webkit-scrollbar { display: none; }
.gz-cats-in { display: flex; gap: 8px; padding: 0 14px; max-width: 560px; margin: 0 auto; width: max-content; min-width: 100%; }
.gz-cat {
  flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 10px 15px;
  border-radius: 999px; border: 1px solid var(--g-border, #e6e9f0); background: var(--g-card, #fff);
  color: var(--g-muted, #667085); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  font-family: inherit;
}
.gz-cat.is-on { background: var(--g-accent, #1d4ed8); border-color: var(--g-accent, #1d4ed8); color: #fff; }

/* ---- Abschnitte und Gerichte ------------------------------------------- */
.gz-sec { padding-top: 22px; scroll-margin-top: 118px; }
.gz-sec h2 { margin: 0 0 3px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.gz-sec p.gz-sec-d { margin: 0 0 10px; font-size: 12.5px; color: var(--g-muted, #667085); line-height: 1.5; }

.gz-item {
  display: flex; gap: 12px; width: 100%; text-align: left; background: var(--g-card, #fff);
  border: 1px solid var(--g-border, #e6e9f0); border-radius: var(--g-radius); padding: 12px;
  margin-bottom: 10px; font-family: inherit; color: inherit; cursor: pointer;
}
.gz-item[disabled], .gz-item.is-out { opacity: .5; cursor: default; }
.gz-item-b { min-width: 0; flex: 1; }
.gz-item-n { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.gz-item-d { font-size: 12.5px; color: var(--g-muted, #667085); line-height: 1.5; margin-top: 3px; }
.gz-item-m { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.gz-price { font-size: 14px; font-weight: 800; white-space: nowrap; }
.gz-img { width: 74px; height: 74px; border-radius: 12px; object-fit: cover; flex: none; background: var(--g-border, #e6e9f0); }
.gz-add {
  flex: none; align-self: center; width: 44px; height: 44px; border-radius: 13px; border: none;
  background: var(--g-accent, #1d4ed8); color: #fff; font-size: 15px; cursor: pointer;
}
.gz-tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 7px; background: color-mix(in srgb, var(--g-accent, #1d4ed8) 13%, transparent);
  color: var(--g-accent, #1d4ed8);
}
/* Merkmal „Beliebt": Herz vor dem Text */
.gz-heart { color: #e11d48; font-size: 9.5px; }
/* Schärfe: 1–5 Chilischoten, bleiben beim Umbruch zusammen */
.gz-spice { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: #dc2626; white-space: nowrap; }
.gz-codes { font-size: 10.5px; color: var(--g-muted, #667085); font-weight: 700; letter-spacing: .03em; }
.gz-out { font-size: 10.5px; font-weight: 800; color: #b91c1c; background: #fee2e2; padding: 3px 8px; border-radius: 7px; }
.gz-qty-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 999px;
  background: #16a34a; color: #fff; font-size: 11px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; padding: 0 5px;
}
.gz-add-wrap { position: relative; flex: none; align-self: center; }

/* ---- Legende ----------------------------------------------------------- */
.gz-legend { margin: 26px 0 10px; font-size: 11.5px; color: var(--g-muted, #667085); line-height: 1.7; }
.gz-legend b { display: block; color: var(--g-fg, #15171c); font-size: 12px; margin-bottom: 3px; }

/* ---- Warenkorb-Leiste -------------------------------------------------- */
.gz-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--g-bg, #f6f8fc); border-top: 1px solid var(--g-border, #e6e9f0);
}
.gz-bar-in { max-width: 560px; margin: 0 auto; }
.gz-btn {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: none; border-radius: 14px; background: var(--g-accent, #1d4ed8); color: #fff;
  font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; text-decoration: none;
}
.gz-btn[disabled] { opacity: .45; cursor: default; }
.gz-btn.is-soft { background: var(--g-card, #fff); color: var(--g-fg, #15171c); border: 1px solid var(--g-border, #e6e9f0); }
.gz-btn.is-ghost { background: transparent; color: var(--g-muted, #667085); min-height: 44px; font-weight: 700; font-size: 13.5px; }
.gz-btn.is-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.gz-btn-sub { font-weight: 600; opacity: .85; font-size: 13px; }

/* ---- Bottom-Sheet ------------------------------------------------------ */
.gz-sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.gz-sheet.is-on { display: block; }
.gz-sheet-bg { position: absolute; inset: 0; background: rgba(9, 12, 20, .55); }
.gz-sheet-box {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto;
  background: var(--g-sheet, #fff); color: var(--g-fg, #15171c);
  border-radius: 22px 22px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; -webkit-overflow-scrolling: touch;
}
.gz-sheet-grip { width: 42px; height: 4px; border-radius: 999px; background: var(--g-border, #e6e9f0); margin: 0 auto 14px; }
.gz-sheet h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.gz-sheet .gz-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--g-muted, #667085); line-height: 1.5; }

.gz-field { margin-bottom: 11px; }
.gz-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--g-fg, #15171c); }
.gz-field input, .gz-field textarea, .gz-field select {
  width: 100%; font-size: 16px; font-family: inherit; padding: 12px 13px; border-radius: 12px;
  border: 1px solid var(--g-border, #e6e9f0); background: var(--g-sheet, #fff); color: var(--g-fg, #15171c);
  outline: none; min-height: 46px;
}
.gz-field input:focus, .gz-field textarea:focus, .gz-field select:focus { border-color: var(--g-accent, #1d4ed8); }
.gz-field .gz-hint { font-size: 11px; color: var(--g-muted, #667085); margin-top: 4px; line-height: 1.5; }
.gz-err { font-size: 12px; color: #b91c1c; margin-top: 4px; font-weight: 600; }
.gz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.gz-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.gz-seg button {
  flex: 1 1 auto; min-height: 46px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
  border: 1px solid var(--g-border, #e6e9f0); background: var(--g-sheet, #fff); color: var(--g-muted, #667085);
  cursor: pointer; font-family: inherit;
}
.gz-seg button.is-on { border-color: var(--g-accent, #1d4ed8); background: color-mix(in srgb, var(--g-accent, #1d4ed8) 12%, transparent); color: var(--g-accent, #1d4ed8); }

.gz-var { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.gz-var button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--g-border, #e6e9f0);
  background: var(--g-sheet, #fff); color: var(--g-fg, #15171c); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: left;
}
.gz-var button.is-on { border-color: var(--g-accent, #1d4ed8); background: color-mix(in srgb, var(--g-accent, #1d4ed8) 10%, transparent); }

.gz-step { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.gz-step button {
  width: 46px; height: 46px; border-radius: 13px; border: 1px solid var(--g-border, #e6e9f0);
  background: var(--g-sheet, #fff); color: var(--g-fg, #15171c); font-size: 16px; cursor: pointer;
}
.gz-step span { font-size: 19px; font-weight: 800; min-width: 34px; text-align: center; }

/* ---- Warenkorb-Liste im Checkout --------------------------------------- */
.gz-lines { border: 1px solid var(--g-border, #e6e9f0); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.gz-line { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-bottom: 1px solid var(--g-border, #e6e9f0); font-size: 13.5px; }
.gz-line:last-child { border-bottom: none; }
.gz-line-q { font-weight: 800; color: var(--g-accent, #1d4ed8); flex: none; min-width: 26px; }
.gz-line-b { flex: 1; min-width: 0; }
.gz-line-b small { display: block; color: var(--g-muted, #667085); font-size: 11.5px; margin-top: 2px; line-height: 1.45; }
.gz-line-p { font-weight: 700; white-space: nowrap; }
.gz-line-x { border: none; background: none; color: var(--g-muted, #667085); font-size: 15px; cursor: pointer; padding: 4px; min-width: 44px; min-height: 44px; }
.gz-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 800; padding: 12px 2px; }

/* ---- Statusseite ------------------------------------------------------- */
.gz-num { text-align: center; padding: 22px 0 6px; }
.gz-num b { display: block; font-size: 56px; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.gz-num span { display: block; font-size: 12.5px; color: var(--g-muted, #667085); margin-top: 6px; }
.gz-state { text-align: center; font-size: 19px; font-weight: 800; margin: 4px 0 2px; }
.gz-eta { text-align: center; font-size: 13.5px; color: var(--g-muted, #667085); margin-bottom: 18px; }

.gz-time { display: flex; flex-direction: column; gap: 0; margin: 18px 0; }
.gz-tl { display: flex; gap: 12px; align-items: flex-start; }
.gz-tl-dot {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--g-border, #e6e9f0);
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--g-muted, #667085);
  background: var(--g-bg, #f6f8fc);
}
.gz-tl-line { flex: none; width: 2px; height: 22px; background: var(--g-border, #e6e9f0); margin-left: 12px; }
.gz-tl-t { font-size: 13.5px; font-weight: 700; padding-top: 3px; color: var(--g-muted, #667085); }
.gz-tl.is-done .gz-tl-dot { border-color: var(--g-accent, #1d4ed8); background: var(--g-accent, #1d4ed8); color: #fff; }
.gz-tl.is-done .gz-tl-t { color: var(--g-fg, #15171c); }
.gz-tl.is-now .gz-tl-dot { border-color: var(--g-accent, #1d4ed8); color: var(--g-accent, #1d4ed8); }
.gz-tl.is-now .gz-tl-t { color: var(--g-accent, #1d4ed8); font-weight: 800; }
.gz-tl-line.is-done { background: var(--g-accent, #1d4ed8); }

.gz-box { background: var(--g-card, #fff); border: 1px solid var(--g-border, #e6e9f0); border-radius: var(--g-radius); padding: 14px; margin-bottom: 12px; }
.gz-box h3 { margin: 0 0 9px; font-size: 13px; font-weight: 800; }
.gz-pay { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 900; }
.gz-pay small { display: block; font-size: 11.5px; font-weight: 600; color: var(--g-muted, #667085); margin-top: 2px; }

/* Vollbild „fertig" — Tipp irgendwo schließt (JS); cursor:pointer, damit iOS
   den Tipp auf die Fläche sicher als Klick meldet. Über dem Bottom-Sheet (60). */
.gz-ready {
  position: fixed; inset: 0; z-index: 90; display: none; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; padding: 30px 22px calc(30px + env(safe-area-inset-bottom)); text-align: center;
  background: linear-gradient(180deg, #16a34a, #15803d); color: #fff;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.gz-ready.is-on { display: flex; }
.gz-ready i { font-size: 62px; }
.gz-ready b { font-size: 27px; font-weight: 900; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.gz-ready span { font-size: 15px; opacity: .92; line-height: 1.5; }
.gz-ready-x {
  margin-top: 8px; min-height: 48px; padding: 12px 26px; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .14); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
/* Fokus (JS setzt ihn beim Öffnen): weiße Pille statt Doppelring */
.gz-ready-x:focus-visible { outline: none; background: #fff; border-color: #fff; color: #15803d; }
@media (prefers-reduced-motion: no-preference) {
  .gz-ready.is-on i { animation: gzPulse 1.1s ease-in-out infinite; }
}
@keyframes gzPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Tipp-Banner (Ton/Vibration freischalten) */
.gz-unlock {
  position: sticky; top: 66px; z-index: 28; margin: 10px 0 0; border: none; width: 100%;
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 13px;
  background: var(--g-accent, #1d4ed8); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-align: left; min-height: 48px;
}

/* ---- Tischseite -------------------------------------------------------- */
.gz-calls { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.gz-calls .gz-btn { flex: 1 1 150px; min-height: 60px; }
.gz-tab { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 800; }
.gz-tab small { display: block; font-size: 11.5px; font-weight: 600; color: var(--g-muted, #667085); margin-top: 2px; }
.gz-ord { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--g-border, #e6e9f0); }
.gz-ord:last-child { border-bottom: none; }
.gz-ord b { font-size: 14px; font-weight: 800; flex: none; }
.gz-ord-b { flex: 1; min-width: 0; font-size: 12.5px; color: var(--g-muted, #667085); }
.gz-ord-s { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--g-accent, #1d4ed8) 13%, transparent); color: var(--g-accent, #1d4ed8); }
.gz-ord-s.is-ready { background: #dcfce7; color: #15803d; }
.gz-ord-s.is-cancelled { background: #fee2e2; color: #b91c1c; }

.gz-foot { text-align: center; font-size: 11.5px; color: var(--g-muted, #667085); padding: 26px 0 8px; line-height: 1.6; }
.gz-foot a { color: var(--g-muted, #667085); }

@media (min-width: 620px) {
  .gz-sheet-box { border-radius: 22px; bottom: 24px; left: 16px; right: 16px; }
}
