/* Pizza Tornado – Grundlage der Saison-Aktionen (gehört zu assets/js/saison-basis.js).
   Eigene Optik je Aktion in assets/css/saison/<key>.css (Präfix sz-<key>-). */

/* ---------- Zeichenfläche über dem Fenster (fängt nie Klicks) ---------- */
.sz-leinwand { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 45; pointer-events: none; display: block; }
.sz-deko { position: fixed; z-index: 45; pointer-events: none; }
.sz-klick { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sz-klick:focus-visible { outline: 3px solid var(--accent, #E3241B); outline-offset: 4px; border-radius: 12px; }

/* ---------- Schalter „Effekte aus/an“ (nur, wenn effekte.js keinen eigenen zeigt) ---------- */
.sz-knoepfe { position: fixed; left: 12px; bottom: 12px; z-index: 47; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 8px; pointer-events: none; }
body:has(> .lokal-leiste) .sz-knoepfe { bottom: 62px; }
.sz-knopf { position: relative; display: inline-flex; align-items: center; height: 42px; min-width: 42px; padding: 0 11px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--ink, #161616); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
  pointer-events: auto; box-shadow: 0 6px 18px rgba(22, 22, 22, .16), 0 0 0 1px rgba(22, 22, 22, .07);
  transition: transform .15s ease, background-color .2s ease, color .2s ease; -webkit-tap-highlight-color: transparent; }
.sz-knopf:hover { transform: translateY(-1px); }
.sz-knopf-icon { position: relative; display: grid; place-items: center; flex: none; width: 20px; height: 20px; }
.sz-knopf svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sz-knopf-text { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .3s cubic-bezier(.2, .8, .2, 1), margin .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
.sz-knopf:hover .sz-knopf-text, .sz-knopf:focus-visible .sz-knopf-text { max-width: 220px; margin: 0 3px 0 8px; opacity: 1; }
.sz-schalter.is-aus { color: var(--muted, #5F5D58); }
.sz-schalter.is-aus .sz-knopf-icon::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px;
  background: currentColor; box-shadow: 0 0 0 1.5px #fff; transform: rotate(-45deg); }
@media (max-width: 640px) {
  .sz-knoepfe { left: 10px; bottom: 10px; }
  .sz-schalter { height: 38px; min-width: 38px; padding: 0 9px; }
}

/* ---------- Gutschein-Dialog ---------- */
.sz-dialog { width: min(440px, calc(100vw - 24px)); max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: var(--ink, #161616); overflow: visible; }
.sz-dialog::backdrop { background: rgba(22, 18, 30, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sz-dialog[open], .sz-dialog.is-ersatz { animation: sz-dialog-rein .42s cubic-bezier(.2, 1.2, .4, 1) backwards; }
@keyframes sz-dialog-rein { from { opacity: 0; transform: translateY(18px) scale(.94); } }
/* Ersatz für Browser ohne <dialog> */
.sz-dialog.is-ersatz { position: fixed; z-index: 2000; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%); box-shadow: 0 0 0 100vmax rgba(22, 18, 30, .55); border-radius: 30px; }
@keyframes sz-dialog-rein-ersatz { from { opacity: 0; } }
.sz-dialog.is-ersatz { animation-name: sz-dialog-rein-ersatz; }

.sz-dialog-karte { --metal: #FFFFFF; --sz-farbe: var(--accent, #E3241B); position: relative; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  padding: 22px 22px 24px; background: #fff; border-radius: 30px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 70px rgba(22, 18, 30, .35); text-align: center; }
.sz-dialog-zu { position: absolute; z-index: 3; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink, #161616); cursor: pointer; box-shadow: 0 2px 10px rgba(22, 22, 22, .14); transition: transform .15s ease; }
.sz-dialog-zu:hover { transform: rotate(90deg); }
.sz-dialog-zu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sz-dialog-vor { margin: -22px -22px 16px; }
.sz-dialog-vor:empty { display: none; }
.sz-dialog-titel { margin: 6px 40px 14px; font-size: clamp(24px, 6vw, 30px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; color: inherit; }
.sz-dialog-text { margin: 0 auto 4px; max-width: 34ch; color: var(--muted, #5F5D58); font-size: 16px; text-wrap: pretty; }
.sz-dialog .ticket { text-align: initial; box-shadow: 0 12px 28px rgba(22, 18, 30, .16), 0 0 0 1px rgba(22, 18, 30, .07); }
.sz-dialog .ticket-kicker { color: var(--sz-farbe); }
.sz-dialog .ticket-kicker:empty { display: none; }
@media (max-width: 420px) {
  .sz-dialog-karte { padding: 18px 16px 20px; }
  .sz-dialog-vor { margin: -18px -16px 14px; }
}

/* ---------- kleine Meldung unten ---------- */
.sz-hinweis { position: fixed; left: 50%; bottom: 18px; z-index: 1990; max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 16px;
  background: var(--ink, #161616); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.35; text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1); }
.sz-hinweis.is-an { opacity: 1; transform: translate(-50%, 0); }
.sz-hinweis:empty { display: none; }
body:has(> .lokal-leiste) .sz-hinweis { bottom: 70px; }

/* ---------- Kacheln: gemeinsame Grundlage (Optik je Aktion in saison/<key>.css) ---------- */
.sz-kachel { isolation: isolate; }
.sz-kachel > * { position: relative; z-index: 1; }
.sz-kachel .sz-kachel-deko { position: absolute; z-index: 0; pointer-events: none; }

/* ---------- Bewegung reduzieren / Druck / Hochkontrast ---------- */
@media (prefers-reduced-motion: reduce) {
  .sz-dialog[open], .sz-dialog.is-ersatz { animation: none; }
  .sz-knopf, .sz-knopf-text, .sz-hinweis, .sz-dialog-zu { transition: none; }
  .sz-dialog-zu:hover, .sz-knopf:hover { transform: none; }
}
@media print { .sz-leinwand, .sz-deko, .sz-knoepfe, .sz-hinweis, .sz-klick { display: none !important; } }
@media (forced-colors: active) { .sz-leinwand, .sz-deko { display: none !important; } }
