/* eatbase Marketing-Suite — Storefront-Styles (self-hosted, CSP-konform).
   Nutzt die globalen Markenfarben --eb-blue* mit Fallback aufs eatbase-Blau. */
:root {
    --eb-mkt-blue: var(--eb-blue, #299fd1);
    --eb-mkt-dark: var(--eb-blue-dark, #217ea6);
    --eb-mkt-tint: rgba(41, 159, 209, 0.10);
    --eb-mkt-green: #16a34a;
}

/* ── Promo-Strip (oben auf der Speisekarte) ──────────────────────────── */
.eb-promo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }
.eb-promo-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--eb-mkt-tint);
    border: 1px solid var(--eb-mkt-blue);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
}
.eb-promo-chip__badge {
    background: var(--eb-mkt-blue); color: #fff;
    border-radius: 999px; padding: 2px 8px; font-weight: 700; font-size: 0.75rem;
}
.eb-promo-chip__title { color: #1f1f1f; }
/* Ehrlicher Hinweis, wenn nur die günstigste Aktion greift. */
.eb-promo-note {
    margin: -10px 0 18px; font-size: 0.8rem; color: #6b7280;
    display: flex; align-items: center; gap: 6px;
}
.eb-promo-note::before { content: "ℹ️"; font-size: 0.85rem; }
.eb-promo-chip__code {
    font-weight: 700; color: var(--eb-mkt-dark);
    border: 1px dashed var(--eb-mkt-dark); border-radius: 6px; padding: 1px 6px;
}

/* ── Kategorie-Banner ────────────────────────────────────────────────── */
.eb-category-banner {
    display: flex; align-items: center; gap: 8px;
    background: var(--eb-mkt-tint);
    border-left: 3px solid var(--eb-mkt-blue);
    border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
    font-size: 0.9rem; color: var(--eb-mkt-dark);
}
.eb-category-banner__badge {
    background: var(--eb-mkt-blue); color: #fff; font-weight: 700;
    border-radius: 6px; padding: 2px 8px; font-size: 0.8rem;
}

/* ── Artikel-Badge ───────────────────────────────────────────────────── */
.eb-menu-card__badge.eb-mkt-badge {
    background: var(--eb-mkt-blue);
    color: #fff;
}

/* ── Gratis-Lieferung-Nudge ──────────────────────────────────────────── */
.eb-delivery-nudge {
    margin: 14px 0; padding: 12px 14px;
    background: #f2fbf6; border: 1px solid #d6efe0; border-radius: 12px;
}
.eb-delivery-nudge__text {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.86rem; color: #14532d; margin-bottom: 8px;
}
.eb-delivery-nudge__icon { color: var(--eb-mkt-green); }
.eb-delivery-nudge__text strong { color: #166534; }
.eb-delivery-nudge__bar {
    height: 8px; border-radius: 999px; background: #dcefe4; overflow: hidden;
}
.eb-delivery-nudge__bar span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--eb-mkt-green), #22c55e);
    transition: width 0.3s ease;
}

/* ── Empfehlungen „Passt dazu" (Warenkorb, Kasse, Blatt) ────────────────
   Mobile first: eine wischbare Kartenreihe statt gestapelter Zeilen. Sie
   braucht rund 120 px Höhe, egal wie viele Vorschläge, und steht direkt
   unter den Positionen, wo der Blick des Gastes ohnehin ist. */
.eb-rec { margin: 14px 0 6px; }
.eb-rec--kasse { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--eb-border, #e6ebef); }
.eb-rec__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.eb-rec__icon {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
    background: var(--eb-mkt-tint); color: var(--eb-mkt-dark);
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem;
}
.eb-rec__title { font-weight: 700; font-size: 0.95rem; color: #1f2937; }

/* Die Reihe: scroll-snap, Scrollbalken versteckt, die letzte Karte lugt
   am rechten Rand hervor (Hinweis: hier geht es weiter). Negative Ränder
   lassen die Karten bis an den Kartenrand der Box laufen. */
.eb-rec__row {
    display: flex; gap: 10px;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -6px; padding: 2px 6px 6px;
    scroll-padding-left: 6px;
}
.eb-rec__row::-webkit-scrollbar { display: none; }
.eb-rec__slot { flex: 0 0 auto; scroll-snap-align: start; display: flex; }

.eb-rec__card {
    display: flex; flex-direction: column; align-items: stretch;
    width: 148px; min-height: 100%;
    padding: 0; margin: 0; text-align: left;
    background: #fff; border: 1px solid #e8edf1; border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 30, 45, 0.04);
    cursor: pointer; overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
    -webkit-tap-highlight-color: transparent;
    font: inherit; color: inherit;
}
.eb-rec__card:hover { border-color: var(--eb-mkt-blue); box-shadow: 0 4px 14px rgba(41, 159, 209, 0.14); }
.eb-rec__card:active { transform: scale(0.98); }
.eb-rec__card:disabled { opacity: 0.6; cursor: default; }
.eb-rec__card:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(41, 159, 209, 0.35); }
.eb-rec__img {
    display: block; width: 100%; height: 72px;
    background-size: cover; background-position: center;
}
.eb-rec__body { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px 9px; flex: 1 1 auto; }
.eb-rec__name {
    font-size: 0.86rem; font-weight: 600; line-height: 1.25; color: #1f2937;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.5em;
}
.eb-rec__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.eb-rec__price { font-size: 0.82rem; color: #4b5563; font-weight: 600; white-space: nowrap; }
.eb-rec__plus {
    flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
    background: var(--eb-mkt-blue); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem;
    transition: background 0.15s ease;
}
.eb-rec__card:hover .eb-rec__plus { background: var(--eb-mkt-dark); }

/* Im Warenkorb (Box ist schmal) kompaktere Karten ohne Mindesthöhe. */
#cart-box .eb-rec__card { width: 138px; }
#cart-box .eb-rec__img { height: 64px; }

/* ── Nach-dem-Hinzufügen-Blatt (nur Handy/Tablet, Modus „aktiv") ─────────
   Liegt über der Warenkorb-Pille (die sitzt bei bottom 12 px, ~52 px hoch).
   Ab lg ist der Warenkorb samt Reihe rechts sichtbar: Blatt dort nie.
   Zeigt der Liefer-Check seine Leiste „Noch X € bis zum Mindestbestellwert"
   (.eb-dg-strip, gleiche Höhe über der Pille), rückt das Blatt um deren Höhe
   nach oben, sonst lagen beide übereinander. Die Höhe misst deliverygate.js
   (--eb-dg-strip-space, 0 ohne Leiste). */
.eb-sheet {
    position: fixed; left: 12px; right: 12px;
    bottom: calc(76px + var(--eb-dg-strip-space, 0px) + env(safe-area-inset-bottom, 0px));
    transition: bottom 0.2s ease;
    z-index: 1039;
    background: #fff; border-radius: 18px;
    box-shadow: 0 -2px 6px rgba(15, 30, 45, 0.06), 0 14px 40px rgba(15, 30, 45, 0.22);
    padding: 12px 12px 8px;
    animation: eb-sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes eb-sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .eb-sheet { animation: none; } }
@media (min-width: 992px) { .eb-sheet { display: none; } }
/* Offener Warenkorb oder offenes Popup: das Blatt wäre nur Lärm dahinter. */
body:has(.eb-cart-offcanvas.show) .eb-sheet,
body.modal-open .eb-sheet { display: none; }

.eb-sheet__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.eb-sheet__check {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    background: #e6f6ee; color: var(--eb-mkt-green);
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.eb-sheet__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.eb-sheet__added { font-size: 0.9rem; font-weight: 700; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-sheet__sub { font-size: 0.78rem; color: #6b7280; margin-top: 2px; }
.eb-sheet__close {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
    border: 0; background: #f3f4f6; color: #4b5563; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.eb-sheet__close:hover { background: #e5e7eb; }
.eb-sheet__row { margin: 0 -4px; padding: 2px 4px 4px; }
.eb-sheet .eb-rec__card { width: 140px; }
.eb-sheet .eb-rec__img { height: 60px; }

/* ── Warenkorb-Box: dezenter Feinschliff ─────────────────────────────── */
#cart-box.module-box {
    border-radius: 16px !important;
    border-color: #eef2f4 !important;
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.06) !important;
    padding: 18px !important;
}
#cart-box #cart-items > h5 {
    font-weight: 700; font-size: 1.05rem; color: #1f2937; letter-spacing: -0.01em;
}
/* Artikelzeilen: klare Trenner nur zwischen Artikeln (nicht zwischen Optionen). */
#cart-box .cart-items > ul > li:not(:last-child) {
    padding-bottom: 12px; margin-bottom: 12px !important;
    border-bottom: 1px solid #f4f6f8;
}
#cart-box .cart-items .price { font-weight: 600; color: #1f2937; white-space: nowrap; }
#cart-box .cart-items .btn-outline-secondary:hover {
    background: var(--eb-mkt-blue); border-color: var(--eb-mkt-blue); color: #fff;
}
/* Summen: Zwischensummen ruhig, Gesamtsumme klar hervorgehoben. */
#cart-box #cart-totals td { color: #4b5563; }
#cart-box #cart-totals tr.fw-bold td {
    font-size: 1.1rem; color: #1f2937; padding-top: 8px;
}
#cart-box #cart-totals tr.fw-bold td.text-end { color: #1f2937; }

/* Kompakte Optionen/Extras je Warenkorb-Artikel: Drei-Spalten-Raster —
   Bezeichnung | Wert | Preis, jeweils bündig untereinander. */
.eb-opts {
    display: grid; grid-template-columns: auto 1fr auto;
    column-gap: 8px; row-gap: 2px; margin-top: 3px;
}
.eb-opt__label { color: #9aa3ad; }
.eb-opt__value { color: #4b5563; min-width: 0; }
.eb-opt__price { color: #9aa3ad; white-space: nowrap; text-align: right; }

/* ── Options-Popup: Scroll-Sprung verhindern ─────────────────────────────
   Der Body ist height:100% (h-100). Bootstraps overflow:hidden beschneidet ihn
   dann auf Fensterhöhe → scrollbare Höhe 0 → der Scroll klemmt hart nach oben.
   Mit overflow:visible beschneidet nichts, das Fenster scrollt normal weiter und
   die Position bleibt beim Öffnen/Schließen statisch. (focus:false in
   cart-enhance.js verhindert zusätzlich den Fokus-Scroll.) */
body.modal-open {
    overflow: visible !important;
}
