/* WhatsApp-flavored theme: the page is reached from a WhatsApp chat and
 * should feel like a continuation of it.
 *   teal   #075e54  (header, brand)
 *   green  #00a884  (actions — WhatsApp's primary)
 *   beige  #efeae2  (chat background)
 */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #efeae2;
  color: #111b21;
  padding-bottom: 5.5rem; /* room for the sticky cart bar */
}

.header {
  background: #075e54;
  color: #fff;
  padding: 1rem 1.25rem 0.75rem;
}
.header h1 { margin: 0 0 0.25rem; font-size: 1.35rem; }
/* Owner pages: Bistrobot logo next to the title */
.header-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.header-row h1 { margin: 0; }
.brand-chip { display: inline-flex; flex-shrink: 0; background: #fff; border-radius: 10px; padding: 3px; }
.brand-chip img { height: 40px; width: auto; display: block; }
.hours-line { margin: 0; display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }

.badge { padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 600; font-size: 0.8rem; }
.badge-open   { background: #00a884; color: #fff; }
.badge-closed { background: #fee2e2; color: #991b1b; }

.hours-details summary { color: rgba(255,255,255,0.85); cursor: pointer; }
.hours-details pre { font-family: inherit; margin: 0.5rem 0 0; color: rgba(255,255,255,0.85); }

/* Dashboard: the browser has the new-order sound locked — tap to switch it on. */
.sound-hint {
  display: block; width: 100%; border: 0; text-align: left; cursor: pointer;
  background: #fee2e2; color: #991b1b; padding: 0.75rem 1.25rem; font: inherit; font-size: 0.9rem;
}
.sound-hint[hidden] { display: none; }
.closed-banner {
  background: #fef3c7; color: #92400e;
  padding: 0.75rem 1.25rem; font-size: 0.9rem;
}

.my-orders-block, .menu-block {
  /* Grey tile — a distinct container against the page's beige background,
     instead of a bare list/grid floating directly on it. */
  background: #f0f2f5; border-radius: 14px;
  max-width: 40rem; margin: 0.75rem auto 0; padding: 0.25rem 1rem 0.85rem;
}
.my-orders-title, .menu-block-title {
  font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #54656f; margin: 0 0 0.5rem 0.25rem; cursor: pointer;
  list-style: none; /* hide the default marker, use our own arrow below */
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.25rem;
}
.my-orders-title::-webkit-details-marker, .menu-block-title::-webkit-details-marker { display: none; }
.my-orders-title::after, .menu-block-title::after {
  content: '▾'; font-size: 0.8rem; transition: transform 0.15s ease; margin-left: 0.5rem;
}
details:not([open]) > .my-orders-title::after, details:not([open]) > .menu-block-title::after {
  transform: rotate(-90deg);
}
.my-order-row {
  display: flex; align-items: center; gap: 0.6rem;
  background: #fff; border-radius: 12px; padding: 0.65rem 0.9rem; margin-bottom: 0.5rem;
  box-shadow: 0 1px 1px rgba(11,20,26,0.08); text-decoration: none; color: #111b21;
}
/* An order the customer still has to DO something about (unfinished payment) —
   amber, same palette as the closed banner / waiting-orders accent, so it
   reads as "this needs you" without shouting. Everything else stays neutral. */
.my-order-row.needs-action {
  background: #fef3c7; border-left: 4px solid #f59e0b; border-radius: 0 12px 12px 0;
}
.my-order-row.needs-action .my-order-status { color: #92400e; font-weight: 700; }
.menu-block > main { padding: 0; max-width: none; margin: 0; }

/* Collapsed menu (shown when the customer has active orders): the header is a
   prominent green "open the menu / new order" button. Once opened it reverts to
   a plain section header. */
.label-when-closed, .label-when-open { display: none; }
.menu-collapsible:not([open]) { background: transparent; padding: 0; }
.menu-collapsible:not([open]) .label-when-closed { display: inline; }
.menu-collapsible[open] .label-when-open { display: inline; }
.menu-collapsible:not([open]) > .menu-block-title {
  justify-content: center; gap: 0.4rem;
  background: #00a884; color: #fff; border-radius: 999px;
  text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 1rem;
  padding: 0.9rem 1.4rem; margin: 0;
  box-shadow: 0 4px 12px rgba(0,168,132,0.35);
}
.menu-collapsible:not([open]) > .menu-block-title::after { display: none; }
.my-order-id { font-weight: 700; font-size: 0.85rem; }
.my-order-status { flex: 1; font-size: 0.85rem; color: #54656f; }
.my-order-total { font-weight: 600; font-size: 0.85rem; }

main { padding: 0 1rem; max-width: 40rem; margin: 0 auto; }

.category h2 {
  font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #54656f; margin: 1.5rem 0 0.5rem 0.25rem;
}

.item {
  background: #fff; border-radius: 12px; margin-bottom: 0.6rem;
  display: flex; align-items: flex-start; gap: 0.9rem;
  padding: 0.85rem 0.9rem; box-shadow: 0 1px 1px rgba(11,20,26,0.08);
}
/* Image: fixed size, always the left column — never shifts per product. */
.item-img { width: 4.5rem; height: 4.5rem; border-radius: 8px; object-fit: cover; flex-shrink: 0; cursor: zoom-in; }

/* Fullscreen image viewer opened by tapping a product photo. */
.img-lightbox {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(11, 20, 26, 0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
/* The `display:flex` above would otherwise override the hidden attribute and
   leave the (empty) viewer permanently on screen — keep hidden winning. */
.img-lightbox[hidden] { display: none; }
.img-lightbox-img {
  max-width: 100%; max-height: 100%;
  border-radius: 10px; object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.img-lightbox-close {
  position: absolute; top: calc(0.75rem + env(safe-area-inset-top)); right: 0.9rem;
  width: 2.6rem; height: 2.6rem; border-radius: 999px; border: none;
  background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.3rem;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-lightbox-close:active { background: rgba(255, 255, 255, 0.3); }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-body h3 { margin: 0; font-size: 1rem; }
.item-desc {
  margin: 0.25rem 0 0; font-size: 0.83rem; color: #54656f;
  overflow-wrap: anywhere;
}

/* Order page: item name/price and the total — label left, price right. */
.item-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.75rem; margin-top: 0.35rem;
}
.item-foot h3 { margin: 0; font-size: 1rem; }
.item-price { font-weight: 700; color: #075e54; white-space: nowrap; }

/* Actions column: the compact − qty + control (simple/extras dish), or a row
 * per size (see .size-rows further down). */
.item-actions { flex-shrink: 0; }

.stepper { display: flex; align-items: center; gap: 0.6rem; }
.step-btn {
  width: 2rem; height: 2rem; border-radius: 999px; border: none;
  background: #00a884; color: #fff; font-size: 1.2rem; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.step-btn:active { transform: scale(0.92); }
.step-qty { min-width: 1.2rem; text-align: center; font-weight: 700; }
.stepper-lg .step-btn { width: 2.5rem; height: 2.5rem; }

.cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(239,234,226,0.95) 30%);
}
.cart-bar-btn {
  width: 100%; max-width: 38rem; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  background: #00a884; color: #fff; border: none; border-radius: 999px;
  padding: 0.9rem 1.4rem; font-size: 1rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,168,132,0.4);
}

.sheet-overlay {
  position: fixed; inset: 0; background: rgba(11,20,26,0.5); z-index: 10;
}
.sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 11;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  max-height: 85vh; overflow-y: auto;
  max-width: 40rem; margin: 0 auto;
}
.sheet h3 { margin: 0 0 0.75rem; color: #075e54; }
.sheet-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; gap: 1rem; }
.sheet-hint { margin: 0.75rem 0 0; font-size: 0.8rem; color: #54656f; background: #f0f2f5; padding: 0.5rem 0.7rem; border-radius: 8px; }

.extra-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0; border-bottom: 1px solid #f0f2f5; font-size: 0.95rem;
}
.extra-row label { display: flex; align-items: center; gap: 0.6rem; flex: 1; cursor: pointer; }
.extra-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: #00a884; }
.extra-price { color: #54656f; font-size: 0.9rem; }

.cart-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px solid #f0f2f5; gap: 0.75rem;
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 600; font-size: 0.95rem; }
.cart-line-extras { font-size: 0.8rem; color: #54656f; }
.cart-line-price { font-weight: 600; white-space: nowrap; color: #075e54; }

.field { display: block; margin-top: 1rem; }
.field > span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: #54656f; }
.field textarea, .field input[type="text"], .field input[type="time"], .field select {
  width: 100%; border: 1px solid #d1d7db; border-radius: 8px;
  padding: 0.6rem 0.75rem; font: inherit; background: #f0f2f5;
}
.field textarea:focus, .field input:focus, .field select:focus { outline: 2px solid #00a884; background: #fff; }
.field-off { opacity: 0.4; }
.field-off input, .field-off select { background: #e9edef; }
.choice-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.choice-row label { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.choice-row input[type="radio"] { accent-color: #00a884; }

.btn-primary {
  background: #00a884; color: #fff; border: none; border-radius: 999px;
  padding: 0.8rem 1.5rem; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.btn-primary:disabled { background: #d1d7db; cursor: not-allowed; }
.btn-order { width: 100%; margin-top: 1.25rem; }

.error-line { color: #b91c1c; font-size: 0.9rem; margin: 0.75rem 0 0; }
/* The "go to your waiting order" link sits on its own line under the message. */
.error-line a { display: block; margin-top: 0.4rem; color: inherit; font-weight: 600; text-decoration: underline; }

.pickup-only-note {
  margin: 0 0 0.75rem; padding: 0.6rem 0.85rem; border-radius: 10px;
  background: #fff7ed; color: #9a3412; font-size: 0.9rem; line-height: 1.35;
}

.delivery-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.75rem 1rem; margin-bottom: 1rem;
  background: #fff; border-radius: 12px; font-weight: 600;
}
.delivery-toggle-label { display: flex; flex-direction: column; gap: 0.15rem; }
.delivery-toggle-label small { font-weight: 400; color: #54656f; font-size: 0.8rem; }

.switch {
  flex-shrink: 0; padding: 0; border: none; background: none; cursor: pointer;
}
.switch:disabled { opacity: 0.6; cursor: default; }
.switch-track {
  display: block; width: 52px; height: 30px; border-radius: 999px;
  background: #9ca3af; transition: background 0.15s ease; position: relative;
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: left 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch[data-enabled="1"] .switch-track { background: #16a34a; }
.switch[data-enabled="1"] .switch-thumb { left: 25px; }

.settings-block {
  background: #fff; border-radius: 12px; padding: 0.5rem 1rem 0.85rem;
  margin-bottom: 1rem;
}
.settings-title { margin: 0.6rem 0 0.4rem; font-size: 0.95rem; color: #111b21; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid #eef0f1;
}
.toggle-label { display: flex; flex-direction: column; gap: 0.15rem; font-weight: 600; }
.toggle-label small { font-weight: 400; color: #54656f; font-size: 0.8rem; }
.settings-error { margin: 0.5rem 0 0; color: #b91c1c; font-size: 0.85rem; }

/* ── Today summary (admin dashboard) ───────────────────────────────────────── */
.today-summary { margin: 0 0 0.75rem; }
.today-stats { display: flex; gap: 0.5rem; }
.today-stats .stat {
  flex: 1; background: #fff; border-radius: 12px; padding: 0.75rem 0.5rem;
  text-align: center; display: flex; flex-direction: column; gap: 0.15rem;
}
.stat-num { font-size: 1.25rem; font-weight: 700; color: #075e54; }
.stat-label { font-size: 0.72rem; color: #54656f; }
.today-items-toggle {
  margin: 0.6rem 0 0; padding: 0.35rem 0; border: none; background: none;
  color: #075e54; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.today-items-toggle .chevron { transition: transform 0.15s ease; }
.today-items-toggle.open .chevron { transform: rotate(90deg); }
.today-items {
  list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex;
  flex-wrap: wrap; gap: 0.35rem;
}
.today-items li {
  background: #fff; border-radius: 999px; padding: 0.25rem 0.7rem;
  font-size: 0.85rem; color: #111b21;
}
.today-items .qty { font-weight: 700; color: #075e54; }

/* ── Tracking page ─────────────────────────────────────────────────────────── */
.order-id { color: rgba(255,255,255,0.85); font-size: 0.9rem; }

.status-banner {
  margin: 1rem 0 0; padding: 0.85rem 1rem; border-radius: 12px; font-size: 0.95rem;
}
.status-banner-neutral { background: #fff; color: #54656f; }
.status-banner-error   { background: #fee2e2; color: #991b1b; }

.timeline-card {
  background: #fff; border-radius: 12px; margin-top: 1rem;
  padding: 1.1rem 1.25rem; box-shadow: 0 1px 1px rgba(11,20,26,0.08);
}
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.45rem 0; color: #616a73; font-size: 0.95rem;
  position: relative;
}
.timeline li + li::before {
  content: ''; position: absolute; left: 0.55rem; top: -0.55rem;
  width: 2px; height: 1.1rem; background: #e9edef;
}
.timeline li.done + li.done::before,
.timeline li.done + li.current::before { background: #00a884; }
.timeline .dot {
  width: 1.15rem; height: 1.15rem; border-radius: 999px; flex-shrink: 0;
  background: #e9edef; z-index: 1;
}
.timeline li.done .dot {
  background: #00a884;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.5 10.6 3.9 8l-1 1 3.6 3.6 7-7-1-1z'/%3E%3C/svg%3E");
  background-size: 0.8rem; background-position: center; background-repeat: no-repeat;
}
.timeline li.current .dot { background: #ffd279; animation: pulse 1.4s ease-in-out infinite; }
.timeline li.done { color: #111b21; }
.timeline li.current { color: #111b21; font-weight: 600; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,171,0,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(255,171,0,0); }
}
.timeline-caption { margin: 0.75rem 0 0; color: #54656f; font-size: 0.9rem; }

.action-card {
  background: #fff; border-radius: 12px; margin-top: 0.75rem;
  padding: 1rem 1.25rem; box-shadow: 0 1px 1px rgba(11,20,26,0.08);
}
.action-card .btn-order { margin-top: 0; }
.action-title { margin: 0 0 0.75rem; font-size: 1.1rem; color: #111b21; }
.order-summary { scroll-margin-top: 0.75rem; }

/* Order page before a payment method is chosen: the order isn't sent yet. */
.choose-prompt {
  background: #fef3c7; border-left: 4px solid #f59e0b; border-radius: 12px;
  padding: 0.9rem 1rem; margin-bottom: 0.75rem; color: #78350f;
}
.choose-prompt strong { display: block; font-size: 1.05rem; color: #111b21; }
.choose-prompt p { margin: 0.3rem 0 0.7rem; font-size: 0.92rem; line-height: 1.4; }
.choose-jump {
  display: inline-block; background: #075e54; color: #fff; text-decoration: none;
  font-weight: 600; border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.92rem;
}
.deadline-note {
  background: #fef3c7; color: #92400e; border-radius: 8px;
  padding: 0.6rem 0.8rem; margin: 0 0 0.75rem; font-size: 0.88rem;
}
.pay-warning {
  color: #92400e; font-size: 0.85rem; line-height: 1.35;
  margin: 0 0 0.75rem;
}
.action-card .btn-order + .btn-order { margin-top: 0.6rem; }
.btn-danger-full {
  width: 100%; margin-top: 0.6rem; background: #dc2626; color: #fff;
  border: none; border-radius: 999px; padding: 0.8rem 1.5rem;
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.btn-ghost {
  width: 100%; margin-top: 0.6rem; background: none; border: none;
  color: #616a73; font: inherit; font-size: 0.9rem; cursor: pointer;
  padding: 0.5rem; text-decoration: underline;
}
/* Visible secondary action (green outline) — a real choice, not a "ghost". */
.btn-outline {
  background: #fff; color: #075e54; border: 1.5px solid #00a884;
  border-radius: 999px; padding: 0.8rem 1.5rem;
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.btn-outline:active { background: #d5f2ea; }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
/* "Abmelden" sits at the far right of the header buttons; on a phone the
   buttons wrap instead of running off the screen. */
.header .hours-line { flex-wrap: wrap; row-gap: 0.5rem; }
.logout-btn { margin-left: auto; }
.pause-btn {
  background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px; padding: 0.4rem 1rem; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.admin-group h2 { font-size: 1rem; margin: 1.25rem 0 0.5rem 0.25rem; color: #54656f; }
#group-waiting h2 { color: #b45309; }
.collapsible { cursor: pointer; user-select: none; }
.order-card {
  background: #fff; border-radius: 12px; padding: 0.85rem 1rem; margin-bottom: 0.6rem;
  box-shadow: 0 1px 1px rgba(11,20,26,0.08);
}
#group-waiting .order-card { border-left: 4px solid #f59e0b; border-radius: 0 12px 12px 0; }
.order-new { animation: flash 1.2s ease-in-out 3; }
@keyframes flash { 50% { background: #fef3c7; } }
.order-head { display: flex; justify-content: space-between; align-items: baseline; }
.order-pay { font-size: 0.8rem; font-weight: 700; color: #075e54; }
.order-items { white-space: pre-line; font-size: 0.92rem; margin: 0.4rem 0; }
.order-meta { font-size: 0.8rem; color: #54656f; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.btn-small {
  border: none; border-radius: 8px; padding: 0.5rem 0.9rem; font: inherit;
  font-size: 0.88rem; font-weight: 600; cursor: pointer; background: #e9edef; color: #111b21;
}
.btn-small.btn-ok { background: #00a884; color: #fff; }
.btn-small.btn-danger { background: #fee2e2; color: #991b1b; }
.status-badge {
  font-size: 0.78rem; font-weight: 700; padding: 0.15rem 0.55rem;
  border-radius: 999px; white-space: nowrap;
}
.status-badge.ok { background: #00a884; color: #fff; }
.status-badge.fail { background: #fee2e2; color: #991b1b; }
.courier-share { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; align-items: center; }
.courier-share input {
  flex: 1; min-width: 10rem; border: 1px solid #d1d7db; border-radius: 8px;
  padding: 0.45rem 0.6rem; font: inherit; font-size: 0.8rem; background: #f0f2f5;
}
a.btn-small { text-decoration: none; display: inline-block; }

/* ── Menu management ───────────────────────────────────────────────────────── */
.padm { display: flex; gap: 0.75rem; align-items: flex-start; }
.padm-img {
  width: 4.5rem; height: 4.5rem; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.padm-img.placeholder {
  background: #e9edef; display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.padm-body { flex: 1; min-width: 0; }
.padm-badge { font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; }
.padm-badge.on { background: #dcfce7; color: #166534; }
.padm-badge.off { background: #fee2e2; color: #991b1b; }
#edit-file {
  width: 100%; font: inherit; font-size: 0.85rem; padding: 0.5rem;
  border: 1px dashed #d1d7db; border-radius: 8px; background: #f0f2f5;
}
.ex-name, .ex-price {
  border: 1px solid #d1d7db; border-radius: 8px; padding: 0.45rem 0.6rem; font: inherit; font-size: 0.9rem;
}

.contact-link {
  display: block; text-align: center; margin: 1.25rem 0 2rem;
  color: #00a884; font-weight: 600; text-decoration: none;
}

.legal-footer {
  text-align: center; padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  font-size: 0.8rem; color: #616a73;
}
.legal-footer a { color: #54656f; }
/* Customer pages: "Bestellsystem: Bistrobot" in the footer */
.powered { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.6rem; font-size: 0.75rem; color: #616a73; text-decoration: none; }
.legal-footer a.powered { color: #616a73; }
.powered img { height: 20px; width: auto; }
/* Staff pages (dashboard, courier): Bistrobot's own legal links */
.bistrobot-legal { display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; justify-content: center; }
.bistrobot-legal img { height: 18px; width: auto; }
.attribution { display: inline-block; margin-top: 0.4rem; font-size: 0.72rem; color: #616a73; }
.attribution a { color: #616a73; text-decoration: underline; }

/* Public read-only menu (/speisekarte) */
.public-menu-intro { background: #fff; border-radius: 12px; margin: 1rem 0; padding: 1rem 1.25rem;
  box-shadow: 0 1px 1px rgba(11,20,26,0.08); color: #3b4a54; font-size: 0.95rem; }
.public-menu-intro p { margin: 0 0 0.75rem; }
.public-menu-wa { display: block; text-align: center; text-decoration: none; margin-top: 0.75rem; }
.public-price { white-space: nowrap; font-size: 0.9rem; line-height: 1.6; }
.public-price .size-row-name { color: #54656f; margin-right: 0.35rem; }
.item-extras { margin: 0.3rem 0 0; font-size: 0.8rem; color: #667781; }
.item-soldout { opacity: 0.55; }
.item-soldout .item-img { filter: grayscale(1); }
.soldout-badge { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.5rem; border-radius: 999px;
  background: #fee2e2; color: #991b1b; font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
body.public-menu { padding-bottom: 1rem; }

/* Legal pages */
.legal { max-width: 42rem; margin: 0 auto; padding: 1rem 1.25rem 3rem; line-height: 1.6; }
.legal h2 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.legal a { color: #00a884; }
.legal-note { color: #616a73; font-size: 0.85rem; font-style: italic; }

/* Allergen / additive info board at the foot of the menu */
.allergen-board {
  max-width: 42rem;
  margin: 1.5rem auto 0.5rem;
  border: 1px solid #e0e4e7;
  border-radius: 10px;
  background: #fbfbfa;
}
.allergen-board > summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #54656f;
}
.allergen-board > pre {
  margin: 0;
  padding: 0 1rem 0.9rem;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.8rem;
  color: #616a73;
  line-height: 1.5;
}

/* Add / remove on a simple dish (no size, no extras). At qty 0 the stepper is
 * just "+"; the − and count appear once it's in the cart. */
.item-actions { text-align: right; }
.add-control { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.add-control .size-price { font-size: 0.92rem; font-weight: 700; color: #075e54; }
.add-control .stepper { gap: 0.45rem; }
.add-control .step-btn { width: 2.1rem; height: 2.1rem; font-size: 1.15rem; }


/* Sized dish (no extras): one full-width row per size, each with its own − qty +
 * — the same add/remove control as a simple dish, kept consistent. The row spans
 * the item so the stepper always has room. */
.item:has(.size-rows) { flex-wrap: wrap; }
.item:has(.size-rows) .item-actions { flex-basis: 100%; text-align: left; }
.size-rows { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.size-row {
  display: flex; align-items: center; gap: 0.6rem;
  background: #f7f9fa; border: 1px solid #eef0f1; border-radius: 10px; padding: 0.4rem 0.55rem;
}
.size-row-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
.size-row .size-price { font-weight: 700; color: #075e54; font-size: 0.9rem; }
.size-row .stepper { gap: 0.45rem; }
.size-row .step-btn { width: 2.1rem; height: 2.1rem; font-size: 1.15rem; }

/* Bottom sheet with a pinned footer (the checkout sheet). The middle scrolls;
 * the "Bestellen" button never leaves the bottom of the screen. */
.sheet-tall { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
/* display:flex above would otherwise beat the hidden attribute's display:none
   and leave the sheet on screen — keep hidden winning (as for .img-lightbox). */
.sheet-tall[hidden] { display: none; }
.sheet-handle {
  width: 2.5rem; height: 0.28rem; border-radius: 999px;
  background: #d1d7db; margin: -0.4rem auto 0.6rem;
}
.sheet-tall h3 { flex-shrink: 0; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.sheet-footer {
  flex-shrink: 0; background: #fff; border-top: 1px solid #f0f2f5;
  padding: 0.5rem 0 calc(1rem + env(safe-area-inset-bottom));
}
.sheet-footer .btn-order { margin-top: 0.5rem; }

/* Bouncing hint that there's more to fill in below; a tap scrolls the sheet. */
.scroll-hint {
  position: absolute; left: 50%; bottom: 4.9rem;
  width: 2.2rem; height: 2.2rem; border-radius: 999px; border: none;
  background: #00a884; color: #fff; font-size: 1.35rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  animation: hint-bounce 1.4s ease-in-out infinite;
}
.scroll-hint[hidden] { display: none; }
@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(4px); }
}

/* Freeze the page behind an open sheet so touch scrolling moves only the sheet. */
body.sheet-open { overflow: hidden; }

/* On a phone a pinch-zoom lets the page slide sideways, and the fixed popup
   slid with it. Inside the popup only vertical scrolling is allowed (no sideways
   pan, no pinch), and a touch on the dimmed background does nothing. The popup's
   text is 16px+, so zooming it isn't needed to read it. */
.sheet { touch-action: pan-y; overflow-x: hidden; }
.sheet-body { overflow-x: hidden; }
.sheet-overlay { touch-action: none; }

/* Error in the pinned footer: keep it compact; a long one scrolls inside. */
.sheet-footer .error-line { margin: 0 0 0.35rem; max-height: 7.5rem; overflow-y: auto; }

/* ── Narrow phones ─────────────────────────────────────────────────────────── */
@media (max-width: 460px) {
  /* Comfortable tap target for the quantity steppers in the cart (was 2rem). */
  .stepper-lg .step-btn, .cart-line .step-btn { width: 2.4rem; height: 2.4rem; }
}

/* "Address not found on the map" — a please-check, not an error: amber. */
.error-line.warn-line {
  color: #92400e; background: #fef3c7; border-radius: 8px; padding: 0.5rem 0.65rem;
}
/* Restaurant side: an order whose address was NOT found on the map. */
.addr-warn { color: #92400e; font-weight: 700; }
/* Owner's order discount, in the green header: a white chip so it stands out. */
.discount-note {
  display: inline-block; margin: 0.45rem 0 0; padding: 0.2rem 0.6rem;
  background: #fff; color: #075e54; border-radius: 999px; font-size: 0.9rem; font-weight: 700;
}
