/* eatbase Aktions-Buehne (custom.marketing), self-hosted, CSP-konform.
   Jede Karte bringt ihre Farben als Variablen mit (serverseitig validierte
   Hex-Werte aus PromoLook): --pc-a/--pc-b Verlauf, --pc-fg Text auf dem
   Verlauf, --pc-soft helle Toenung, --pc-ink Text/Rahmen auf Weiss. Alles
   Weitere (Masse, Schrift, Radien, Schatten) ist hier festgezurrt, damit
   keine Kundengestaltung das Layout sprengen kann.

   Diese Datei laeuft auf jeder Storefront-Seite (Asset-Manager), deshalb
   stehen hier auch der gemeinsame Toast und der Look der Theme-Meldungen. */

.eb-stage { margin: 2px 0 20px; }
.eb-stage__head {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 10px; font-weight: 700; font-size: 0.95rem; color: var(--eb-text, #1f1f1f);
}
.eb-stage__flame {
    width: 26px; height: 26px; border-radius: 50%;
    background: #fff1e6; color: #f97316;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

/* Reihe: auf dem Handy wischbar mit Einrasten, ab md ein Raster. */
.eb-stage__row {
    display: flex; gap: 12px;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -4px; padding: 4px 4px 10px;
    scroll-padding-left: 4px;
}
.eb-stage__row::-webkit-scrollbar { display: none; }

.eb-stage__card {
    position: relative; isolation: isolate;
    flex: 0 0 auto; width: min(84vw, 340px);
    scroll-snap-align: start;
    display: flex; align-items: center; gap: 14px;
    min-height: 124px; padding: 16px;
    border-radius: 20px; overflow: hidden;
    color: var(--pc-fg, #fff);
    background: linear-gradient(135deg, var(--pc-a, #299fd1) 0%, var(--pc-b, #217ea6) 100%);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--pc-b, #217ea6) 26%, transparent), 0 1px 2px rgba(15, 30, 45, 0.06);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
/* Glanzlicht oben rechts, rein dekorativ. */
.eb-stage__card::after {
    content: ""; position: absolute; z-index: -1;
    top: -45%; right: -18%; width: 62%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 62%);
    pointer-events: none;
}
.eb-stage__row[data-count="1"] .eb-stage__card { width: 100%; }
.eb-stage__card.is-clickable { cursor: pointer; }
.eb-stage__card.is-clickable:hover,
.eb-stage__card.is-clickable:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px color-mix(in srgb, var(--pc-b, #217ea6) 34%, transparent), 0 1px 2px rgba(15, 30, 45, 0.06);
}
.eb-stage__card:focus-visible { outline: 3px solid color-mix(in srgb, var(--pc-b, #217ea6) 50%, #fff); outline-offset: 2px; }

/* Handy: die wischbare Reihe schneidet alles ab, was ueber ihren Rand ragt
   (overflow-x: auto macht auch die Hoehe zur Clip-Kante). Damit der Schatten
   der Kacheln nicht mitten im Abschnitt abreisst, zieht die Reihe auf der
   Speisekarte bis an den Bildschirmrand (1.25rem = Container-Innenabstand
   aus menudesign/menus.css) und bekommt oben/unten Luft fuer den Schatten;
   die negativen Margins halten die sichtbaren Abstaende wie vorher. Der
   Schatten selbst ist auf dem Handy etwas enger. Nur .eb-menus-page: in der
   Admin-Vorschau bleibt die Reihe in ihrem Kasten. */
@media (max-width: 767.98px) {
    .eb-menus-page .eb-stage__row {
        margin: -10px -1.25rem -14px;
        padding: 10px 1.25rem 24px;
        scroll-padding-left: 1.25rem; scroll-padding-right: 1.25rem;
    }
    .eb-stage__card {
        box-shadow: 0 6px 16px color-mix(in srgb, var(--pc-b, #217ea6) 22%, transparent), 0 1px 2px rgba(15, 30, 45, 0.06);
    }
}

@media (min-width: 768px) {
    .eb-stage__row {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        overflow: visible; margin: 0; padding: 0;
    }
    .eb-stage__card { width: auto; }
    .eb-stage__card--featured { grid-column: 1 / -1; }
}

/* Bild (Emoji / Sticker) */
.eb-stage__visual {
    flex: 0 0 auto; width: 64px; height: 64px;
    display: grid; place-items: center;
}
.eb-stage__emoji {
    font-size: 46px; line-height: 1;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}
.eb-stage__sticker { width: 78px; height: 78px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22)); }
.eb-stage__sticker text { font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Text */
.eb-stage__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.eb-stage__badge {
    align-self: flex-start;
    color: var(--pc-fg-badge, inherit) !important;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 999px;
    background: color-mix(in srgb, var(--pc-fg, #fff) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--pc-fg, #fff) 34%, transparent);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eb-stage__headline {
    margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
    /* !important: im Admin (Vorschau) faerbt das Theme h3/p sonst um, und die
       Vorschau saehe anders aus als die Speisekarte. */
    color: var(--pc-fg, inherit) !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.eb-stage__sub {
    margin: 0; font-size: 0.84rem; line-height: 1.35; opacity: 0.92;
    color: var(--pc-fg-sub, inherit) !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.eb-stage__foot {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    margin-top: 4px; font-size: 0.75rem;
}
.eb-stage__note { display: inline-flex; align-items: center; gap: 4px; opacity: 0.88; }
.eb-stage__note i { font-size: 0.7rem; }

/* „Details": nur sichtbar, wenn stage.js einen gekuerzten Text gemessen hat. */
.eb-stage__more {
    position: relative;
    margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
    min-height: 28px; padding: 4px 11px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--pc-fg, #fff) 38%, transparent);
    background: color-mix(in srgb, var(--pc-fg, #fff) 16%, transparent);
    color: var(--pc-fg, #fff);
    font: inherit; font-size: 0.74rem; font-weight: 700; line-height: 1.2;
    cursor: pointer; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}
/* Groessere Tippflaeche als die sichtbare Pille. */
.eb-stage__more::after { content: ""; position: absolute; inset: -8px -6px; }
.eb-stage__more:hover { background: color-mix(in srgb, var(--pc-fg, #fff) 26%, transparent); }
.eb-stage__more:focus-visible { outline: 2px solid var(--pc-fg, #fff); outline-offset: 2px; }
.eb-stage__more i { font-size: 0.6rem; }
.eb-stage__more[hidden] { display: none !important; }

/* Code-Pille: Code links, Aktion rechts, gestrichelte Perforation dazwischen. */
.eb-stage__code {
    display: inline-flex; align-items: stretch; margin: 0; padding: 0; border: 0;
    border-radius: 999px; overflow: hidden;
    background: var(--pc-fg, #fff); color: var(--pc-b, #217ea6);
    font: inherit; font-weight: 800; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    transition: transform 0.12s ease;
}
.eb-stage__code:hover { transform: scale(1.03); }
.eb-stage__code:active { transform: scale(0.98); }
.eb-stage__code-val {
    padding: 6px 10px 6px 13px; letter-spacing: 0.06em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem;
    border-right: 1px dashed color-mix(in srgb, var(--pc-b, #217ea6) 45%, transparent);
}
.eb-stage__code-act { padding: 6px 12px 6px 10px; font-size: 0.74rem; display: inline-flex; align-items: center; }
/* Nie abschneiden: die Pille bleibt in der Textspalte, im Notfall wird der
   Code gekuerzt (dann gibt es „Details" mit dem ganzen Code), „Anwenden"
   bleibt immer sichtbar. */
.eb-stage__code { max-width: 100%; min-width: 0; }
.eb-stage__code-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-stage__code-act { flex: 0 0 auto; white-space: nowrap; }

/* Schmale Karten (320/360 px breite Handys, enge Vorschau im Admin): die
   Karte ist ihr eigener Container, die Regeln greifen also ueberall gleich,
   egal wie breit die Karte gerade ist. */
.eb-stage__card { container-type: inline-size; }
@container (max-width: 290px) {
    /* Kleineres Bild, engerer Abstand (negativer Rand statt Karten-gap, das
       liegt am Container selbst): so passt ein 12-stelliger Code auch bei
       320 px Bildschirmbreite ganz in die Pille. */
    .eb-stage__visual { width: 40px; height: 40px; margin-right: -4px; }
    .eb-stage__emoji { font-size: 31px; }
    .eb-stage__sticker { width: 50px; height: 50px; }
    .eb-stage__code { display: flex; width: 100%; }
    .eb-stage__code-val { flex: 1 1 auto; padding: 6px 7px 6px 11px; font-size: 0.74rem; letter-spacing: 0.02em; }
    .eb-stage__code-act { margin-left: auto; padding: 6px 10px 6px 8px; }
}
/* Doppelte Klasse: die Grundregeln fuer „hervorgehoben" stehen weiter unten
   und wuerden bei gleicher Spezifitaet sonst gewinnen. */
@container (max-width: 340px) {
    .eb-stage__card.eb-stage__card--featured .eb-stage__headline { font-size: 1.28rem; }
    .eb-stage__card.eb-stage__card--featured .eb-stage__visual { width: 72px; height: 72px; }
    .eb-stage__card.eb-stage__card--featured .eb-stage__emoji { font-size: 52px; }
    .eb-stage__card.eb-stage__card--featured .eb-stage__sticker { width: 84px; height: 84px; }
}
@container (max-width: 270px) {
    .eb-stage__card.eb-stage__card--featured .eb-stage__headline { font-size: 1.15rem; }
    .eb-stage__card.eb-stage__card--featured .eb-stage__visual { width: 54px; height: 54px; }
    .eb-stage__card.eb-stage__card--featured .eb-stage__emoji { font-size: 40px; }
    .eb-stage__card.eb-stage__card--featured .eb-stage__sticker { width: 64px; height: 64px; }
}
.eb-stage__code.is-busy,
.eb-pd__apply.is-busy,
.eb-promo-chip__code.is-busy { opacity: 0.7; pointer-events: none; }
.eb-stage__code.is-done .eb-stage__code-act::before { content: "✓\00a0"; }

/* Heller Text auf Verlauf: ein Hauch Schatten, damit er auch auf dem hellen
   Ende des Verlaufs (Orange, Gold) sauber steht. */
.eb-stage__card--light-text .eb-stage__text { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22); }
.eb-stage__card--light-text .eb-stage__code,
.eb-stage__card--light-text .eb-stage__more { text-shadow: none; }

/* Hervorgehoben: groesser, mehr Luft. */
.eb-stage__card--featured { min-height: 150px; padding: 20px 22px; gap: 18px; }
.eb-stage__card--featured .eb-stage__visual { width: 92px; height: 92px; }
.eb-stage__card--featured .eb-stage__emoji { font-size: 66px; }
.eb-stage__card--featured .eb-stage__sticker { width: 104px; height: 104px; }
.eb-stage__card--featured .eb-stage__headline { font-size: 1.45rem; }
.eb-stage__card--featured .eb-stage__sub { font-size: 0.92rem; }

/* Foto: Bild fuellt die Karte, Text unten auf dunklem Verlauf in der Farbwelt. */
.eb-stage__card--image { min-height: 176px; align-items: flex-end; background: #1f2937; color: #fff; }
.eb-stage__card--image .eb-stage__img {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
}
.eb-stage__card--image::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--pc-b, #217ea6) 62%, #000) 0%,
        color-mix(in srgb, var(--pc-b, #217ea6) 40%, transparent) 52%,
        rgba(0, 0, 0, 0.06) 100%
    );
}
.eb-stage__card--image::after { display: none; }
.eb-stage__card--image .eb-stage__text { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.eb-stage__card--image .eb-stage__badge { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.45); }
.eb-stage__card--image .eb-stage__code { background: #fff; color: #111827; text-shadow: none; }
.eb-stage__card--image .eb-stage__code-val { border-right-color: rgba(17, 24, 39, 0.35); }
.eb-stage__card--image .eb-stage__more { text-shadow: none; background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.45); }
.eb-stage__card--featured.eb-stage__card--image { min-height: 230px; }

/* Ohne Bild: Text bekommt die ganze Breite. */
.eb-stage__card--none .eb-stage__text { gap: 6px; }

/* Kompakte Leiste (Stil „kompakt"): die Chips von frueher, jetzt in der Farbwelt der Aktion.
   Die Ueberschrift bleibt einzeilig und wird bei Platzmangel gekuerzt; dann
   (oder wenn die Aktion mehr Text hat, als der Chip zeigt) gibt es „Details". */
.eb-promo-chip {
    --eb-mkt-tint: var(--pc-soft, rgba(41, 159, 209, 0.1)); border-color: var(--pc-ink, var(--eb-mkt-blue));
    max-width: 100%; min-width: 0;
    /* Reicht eine Zeile nicht, rutschen Code und „Details" in eine zweite
       Zeile, statt die Ueberschrift auf „10…" zu quetschen. Radius 20 px:
       einzeilig wirkt der Chip weiter wie eine Pille, zweizeilig sauber. */
    flex-wrap: wrap; row-gap: 6px; border-radius: 20px;
}
.eb-promo-chip__badge { background: var(--pc-ink, var(--eb-mkt-blue)); flex: 0 0 auto; white-space: nowrap; }
.eb-promo-chip__title {
    /* Basis 0: der Titel bleibt neben dem Etikett und wird dort gekuerzt,
       umbrechen muessen nur Code und „Details". */
    flex: 1 1 0%; min-width: min(9em, 100%);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eb-promo-chip__code {
    border: 1px dashed var(--pc-ink, var(--eb-mkt-dark)); color: var(--pc-ink, var(--eb-mkt-dark));
    background: transparent; border-radius: 6px; padding: 1px 6px; font-weight: 700; font: inherit; cursor: pointer;
    flex: 0 0 auto; white-space: nowrap;
}
.eb-promo-chip__code.is-done::before { content: "✓\00a0"; }
.eb-promo-chip__more {
    position: relative; flex: 0 0 auto; white-space: nowrap;
    border: 0; background: none; padding: 0 2px; margin: 0;
    font: inherit; font-weight: 700; color: var(--pc-ink, var(--eb-mkt-dark));
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.eb-promo-chip__more::after { content: ""; position: absolute; inset: -10px -6px; }
.eb-promo-chip__more[hidden] { display: none !important; }

/* Kategorie-Banner in der Farbwelt der Aktion. */
.eb-category-banner {
    background: var(--pc-soft, var(--eb-mkt-tint));
    border-left-color: var(--pc-ink, var(--eb-mkt-blue));
    color: var(--pc-ink, var(--eb-mkt-dark));
}
.eb-category-banner__badge { background: var(--pc-ink, var(--eb-mkt-blue)); color: #fff; }
.eb-category-banner__emoji { font-size: 1.05rem; line-height: 1; }

/* Artikel-Badge in der Farbwelt der Aktion. */
.eb-menu-card__badge.eb-mkt-badge {
    background: var(--pc-b, var(--eb-mkt-blue));
    color: var(--pc-fg, #fff);
    display: inline-flex; align-items: center; gap: 4px;
}
.eb-menu-card--pulse { animation: eb-card-pulse 1.4s ease-out 1; }
@keyframes eb-card-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(41, 159, 209, 0.55); }
    100% { box-shadow: 0 0 0 16px rgba(41, 159, 209, 0); }
}

/* Warenkorb-Hinweis: Fortschritt bis zur Schwelle / Gratis-Artikel holen. */
.eb-promo-nudge {
    margin: 14px 0; padding: 12px 14px;
    background: var(--pc-soft, #f1f8fc);
    border: 1px solid color-mix(in srgb, var(--pc-ink, #217ea6) 22%, #fff);
    border-radius: 12px;
}
.eb-promo-nudge__row { display: flex; align-items: center; gap: 10px; }
.eb-promo-nudge__emoji { font-size: 1.35rem; line-height: 1; flex: 0 0 auto; }
.eb-promo-nudge__text { flex: 1 1 auto; min-width: 0; font-size: 0.86rem; color: #1f2937; line-height: 1.3; }
.eb-promo-nudge__text strong { color: var(--pc-ink, #166534); }
.eb-promo-nudge__btn {
    flex: 0 0 auto; border: 0; border-radius: 999px; padding: 7px 13px;
    background: var(--pc-ink, #217ea6); color: #fff; font: inherit; font-size: 0.8rem; font-weight: 700;
    cursor: pointer; white-space: nowrap;
}
.eb-promo-nudge__btn:hover { filter: brightness(1.08); }
.eb-promo-nudge__bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--pc-ink, #217ea6) 16%, #fff); overflow: hidden; margin-top: 9px; }
.eb-promo-nudge__bar span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--pc-a, #299fd1), var(--pc-b, #217ea6));
    transition: width 0.3s ease;
}
.eb-promo-nudge--earned { border-style: dashed; }

/* ── Rueckmeldung (Toast) ─────────────────────────────────────────────────
   Eine Meldung fuer alles, was die Buehne tut (Code angewendet, vorgemerkt,
   abgelehnt). Weisse Karte mit farbigem Symbol, Text linksbuendig. stage.js
   setzt --eb-toast-bottom so, dass die Meldung ueber der Warenkorb-Pille
   (und Liefer-Leiste / Empfehlungs-Blatt) steht statt darauf zu kleben. */
.eb-stage-toast {
    position: fixed; left: 50%;
    bottom: var(--eb-toast-bottom, calc(16px + env(safe-area-inset-bottom, 0px)));
    z-index: 1095;
    box-sizing: border-box;
    width: max-content; max-width: min(440px, calc(100vw - 24px));
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px 11px 11px; border-radius: 16px;
    background: #fff; color: #1f2937;
    border: 1px solid rgba(15, 30, 45, 0.07);
    box-shadow: 0 16px 40px rgba(15, 30, 45, 0.18), 0 2px 6px rgba(15, 30, 45, 0.08);
    font-size: 0.9rem; font-weight: 600; line-height: 1.35; text-align: left;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transform: translate(-50%, 12px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.26s;
}
.eb-stage-toast.is-shown {
    opacity: 1; visibility: visible;
    transform: translate(-50%, 0) scale(1);
    transition-delay: 0s;
}
/* Waehrend das Details-Blatt offen ist, steht die Meldung oben. */
.eb-stage-toast.is-top {
    bottom: auto; top: calc(16px + env(safe-area-inset-top, 0px));
    transform: translate(-50%, -12px) scale(0.98);
}
.eb-stage-toast.is-top.is-shown { transform: translate(-50%, 0) scale(1); }
.eb-stage-toast__icon {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e6f4fa; color: #299fd1; font-size: 0.85rem;
}
.eb-stage-toast--success .eb-stage-toast__icon { background: #e7f6ec; color: #16a34a; }
.eb-stage-toast--error .eb-stage-toast__icon { background: #fdecec; color: #dc2626; }
.eb-stage-toast__text { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 992px) { .eb-stage-toast { --eb-toast-bottom: 28px; } }

/* Meldungen des Themes (Flash, oben mittig; storefrontguard-Vorlage mit
   Bootstrap-Toasts): gleicher Look wie oben statt Bootstrap-Vollfarbe.
   Die ID im Selektor schlaegt Bootstraps .text-bg-* (!important). */
#toast-notification {
    z-index: 1095;
    width: min(460px, 100%);
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 0 !important;
}
#toast-notification .toast {
    --bs-toast-max-width: 100%;
    width: 100%; margin: 0 0 10px;
    background: #fff !important; color: #1f2937 !important;
    border: 1px solid rgba(15, 30, 45, 0.07) !important; border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 30, 45, 0.18), 0 2px 6px rgba(15, 30, 45, 0.08);
    font-size: 0.9rem; font-weight: 600; line-height: 1.35;
}
#toast-notification .toast .toast-body {
    position: relative; flex: 1 1 auto; min-width: 0;
    padding: 13px 8px 13px 54px; min-height: 54px;
    text-align: left; overflow-wrap: anywhere;
    display: flex; align-items: center;
}
#toast-notification .toast .toast-body::before {
    content: "\f129";
    position: absolute; left: 12px; top: 50%; margin-top: -15px;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 0.85rem;
    background: #e6f4fa; color: #299fd1;
}
#toast-notification .toast.text-bg-success .toast-body::before { content: "\f00c"; background: #e7f6ec; color: #16a34a; }
#toast-notification .toast.text-bg-danger .toast-body::before { content: "\f00d"; background: #fdecec; color: #dc2626; }
#toast-notification .toast.text-bg-warning .toast-body::before { content: "\f12a"; background: #fff4e5; color: #d97706; }
#toast-notification .toast .btn-close {
    flex: 0 0 auto; width: 10px; height: 10px; margin: auto 14px auto 4px !important;
    filter: none; opacity: 0.45;
}
#toast-notification .toast .btn-close:hover { opacity: 0.8; }

/* ── Details-Popup ───────────────────────────────────────────────────────
   Handy: Blatt von unten (Wischen nach unten oder Tippen daneben schliesst),
   ab md: zentrierter Dialog. Farben kommen per --pc-* vom Panel (stage.js
   uebernimmt sie aus dem <template> der Karte). */
html.eb-pd-lock { overflow-y: hidden; }
.eb-pd-sheet {
    position: fixed; inset: 0; z-index: 1085;
    display: flex; align-items: flex-end; justify-content: center;
}
.eb-pd-sheet[hidden] { display: none !important; }
.eb-pd-sheet__backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0; transition: opacity 0.26s ease;
    touch-action: none;
}
.eb-pd-sheet.is-open .eb-pd-sheet__backdrop { opacity: 1; }
.eb-pd-sheet__panel {
    position: relative; box-sizing: border-box;
    width: 100%; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    background: #fff; color: #1f2937;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(15, 30, 45, 0.25);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    outline: none;
}
.eb-pd-sheet.is-open .eb-pd-sheet__panel { transform: translateY(0); }
.eb-pd-sheet.is-dragging .eb-pd-sheet__panel { transition: none; }
.eb-pd-sheet__grip {
    position: absolute; z-index: 3; top: 8px; left: 50%;
    width: 40px; height: 5px; margin-left: -20px; border-radius: 999px;
    background: color-mix(in srgb, var(--pc-fg, #fff) 60%, transparent);
}
.eb-pd-sheet__close {
    position: absolute; z-index: 3; top: 14px; right: 14px;
    width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--pc-fg, #fff) 22%, transparent);
    color: var(--pc-fg, #fff); font-size: 1rem; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.eb-pd-sheet__close:hover { background: color-mix(in srgb, var(--pc-fg, #fff) 32%, transparent); }
.eb-pd-sheet__close:focus-visible { outline: 2px solid var(--pc-fg, #fff); outline-offset: 2px; }
.eb-pd-sheet__panel:has(.eb-pd--image) .eb-pd-sheet__close { background: rgba(0, 0, 0, 0.35); color: #fff; }

@media (min-width: 768px) {
    .eb-pd-sheet { align-items: center; padding: 24px; }
    .eb-pd-sheet__panel {
        max-width: 460px; max-height: calc(100vh - 48px);
        border-radius: 24px; padding-bottom: 0;
        box-shadow: 0 24px 64px rgba(15, 30, 45, 0.3);
        opacity: 0; transform: translateY(16px) scale(0.97);
        transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
    }
    .eb-pd-sheet.is-open .eb-pd-sheet__panel { opacity: 1; transform: none; }
    .eb-pd-sheet__grip { display: none; }
}

.eb-pd__hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; align-items: center; gap: 16px;
    padding: 34px 62px 24px 22px;
    color: var(--pc-fg, #fff);
    background: linear-gradient(135deg, var(--pc-a, #299fd1) 0%, var(--pc-b, #217ea6) 100%);
}
.eb-pd__hero::after {
    content: ""; position: absolute; z-index: -1;
    top: -60%; right: -20%; width: 70%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 62%);
    pointer-events: none;
}
.eb-pd__visual { flex: 0 0 auto; width: 76px; height: 76px; display: grid; place-items: center; }
.eb-pd__emoji { font-size: 58px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18)); }
.eb-pd__visual .eb-stage__sticker { width: 90px; height: 90px; }
.eb-pd__titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.eb-pd__badge {
    color: var(--pc-fg-badge, inherit);
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 999px;
    background: color-mix(in srgb, var(--pc-fg, #fff) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--pc-fg, #fff) 34%, transparent);
    max-width: 100%; overflow-wrap: anywhere;
}
.eb-pd__headline {
    margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
    color: var(--pc-fg, inherit) !important; overflow-wrap: anywhere;
}
.eb-pd--light-text .eb-pd__titles { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22); }
/* Schmale Handys: kleineres Bild, damit die Ueberschrift nicht in fuenf
   Zeilen neben dem Emoji steht. */
@media (max-width: 400px) {
    .eb-pd__hero { gap: 12px; padding-right: 56px; padding-left: 18px; }
    .eb-pd__visual { width: 54px; height: 54px; }
    .eb-pd__emoji { font-size: 42px; }
    .eb-pd__visual .eb-stage__sticker { width: 66px; height: 66px; }
    .eb-pd__headline { font-size: 1.24rem; }
    .eb-pd__body { padding-left: 18px; padding-right: 18px; }
}

/* Foto-Kopf wie auf der Karte: Bild mit dunklem Verlauf, Text weiss. */
.eb-pd--image .eb-pd__hero { min-height: 200px; align-items: flex-end; background: #1f2937; color: #fff; }
.eb-pd--image .eb-pd__img { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.eb-pd--image .eb-pd__hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--pc-b, #217ea6) 62%, #000) 0%,
        color-mix(in srgb, var(--pc-b, #217ea6) 40%, transparent) 55%,
        rgba(0, 0, 0, 0.1) 100%
    );
}
.eb-pd--image .eb-pd__hero::after { display: none; }
.eb-pd--image .eb-pd__titles { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.eb-pd--image .eb-pd__badge { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.45); }

.eb-pd__body { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 24px; }
.eb-pd__sub { margin: 0; font-size: 1rem; line-height: 1.5; color: #374151; overflow-wrap: anywhere; }
.eb-pd__note {
    margin: 0; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 999px;
    background: #f3f4f6; color: #4b5563;
    font-size: 0.85rem; font-weight: 600; line-height: 1.3;
}
.eb-pd__note i { font-size: 0.8rem; color: var(--pc-ink, #217ea6); }
.eb-pd__code {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 10px 10px 16px; border-radius: 16px;
    background: var(--pc-soft, #f1f8fc);
    border: 1.5px dashed color-mix(in srgb, var(--pc-ink, #217ea6) 50%, #fff);
}
.eb-pd__code-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.eb-pd__code-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7280; }
.eb-pd__code-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.08rem; font-weight: 800; letter-spacing: 0.08em; color: var(--pc-ink, #217ea6);
    overflow-wrap: anywhere;
}
.eb-pd__apply {
    margin-left: auto; flex: 0 0 auto;
    min-height: 42px; padding: 9px 18px; border: 0; border-radius: 12px;
    background: var(--pc-ink, #217ea6); color: #fff;
    font: inherit; font-size: 0.9rem; font-weight: 700; white-space: nowrap; cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease;
}
.eb-pd__apply:hover { filter: brightness(1.08); }
.eb-pd__apply.is-done { background: #16a34a; }
.eb-pd__apply.is-done::before { content: "✓\00a0"; }
.eb-pd__go {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 50px; padding: 12px 18px; border: 0; border-radius: 14px;
    background: var(--pc-ink, #217ea6); color: #fff;
    font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer;
    transition: filter 0.15s ease;
}
.eb-pd__go:hover { filter: brightness(1.08); }
.eb-pd__go i { font-size: 0.8rem; }
/* Mit Code ist „Anwenden" die Hauptaktion, der Sprung wird zweitrangig. */
.eb-pd__body:has(.eb-pd__code) .eb-pd__go { background: #f3f4f6; color: #111827; }
.eb-pd__body:has(.eb-pd__code) .eb-pd__go:hover { filter: none; background: #e9eaee; }
.eb-pd__apply:focus-visible,
.eb-pd__go:focus-visible { outline: 3px solid color-mix(in srgb, var(--pc-ink, #217ea6) 45%, #fff); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .eb-stage__card, .eb-stage__code, .eb-stage-toast,
    .eb-pd-sheet__panel, .eb-pd-sheet__backdrop { transition: none; }
    .eb-menu-card--pulse { animation: none; }
}

/* Gratis-Einheit direkt an der Warenkorb-Position (statt Rabattzeile unten). */
.eb-cart-item__free {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 999px;
    background: #e6f6ec; color: #1b7a44;
    font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase;
    line-height: 1.3;
}
.eb-cart-item__free::before { content: "✓"; font-size: 11px; }
.eb-cart-item__free--part { text-transform: none; font-weight: 700; margin-top: 2px; }
.eb-cart-item__price--free .eb-cart-item__price-old { text-decoration-color: #b3261e; }

/* Dasselbe in der Bestelluebersicht der Kasse (checkout/order-summary). */
.eb-co-items__price--free {
    display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px;
    white-space: nowrap;
}
.eb-co-items__price-old {
    font-size: 12.5px; font-weight: 500; color: #8a96a0;
    text-decoration-color: #b3261e;
}
