/* Gramador Gastro – neutrale Grundgestaltung. Im Theme frei überschreibbar (Klassen .gg-*). */
.gg [hidden] { display: none !important; }
.gg { --gg-accent: #1b3a5f; --gg-border: #d5dbe3; --gg-muted: #5b6776; font: inherit; }
.gg-form { display: grid; gap: 1rem; }
.gg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.gg-field { display: flex; flex-direction: column; gap: .25rem; }
.gg-field--full { grid-column: 1 / -1; }
.gg-field input, .gg-field select, .gg-field textarea { min-height: 44px; padding: .4rem .6rem; border: 1px solid var(--gg-border); border-radius: 6px; font: inherit; }
.gg-check { display: flex; gap: .5rem; align-items: flex-start; }
.gg-slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.gg-slot { min-width: 4.5rem; min-height: 44px; border: 1px solid var(--gg-border); border-radius: 6px; background: #fff; cursor: pointer; font: inherit; }
.gg-slot[aria-pressed="true"] { background: var(--gg-accent); color: #fff; border-color: var(--gg-accent); }
.gg-slot:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.gg-slot--full { border-style: dashed; }
.gg-slot--taken { color: #8a8f98; background: #f3f4f6; text-decoration: line-through; border-style: dashed; cursor: help; }
.gg-slot--taken[aria-pressed="true"] { background: #fff4e5; color: #7a4b00; border-color: #e0a04a; text-decoration: none; }
.gg-slot-msg { margin: .6rem 0 0; padding: .6rem .8rem; border-left: 4px solid #e0a04a; background: #fff8ec; color: #5c3b00; border-radius: 4px; }
.gg-slot-msg[hidden] { display: none; }
.gg-slots-wrap { border: 0; padding: 0; margin: 0; }
.gg-button { min-height: 48px; padding: 0 1.25rem; border: 0; border-radius: 6px; background: var(--gg-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.gg-button--secondary { background: #fff; color: var(--gg-accent); border: 2px solid var(--gg-accent); }
.gg-button:disabled { opacity: .5; cursor: wait; }
.gg-hint { color: var(--gg-muted); font-size: .9em; }
.gg-status:empty { display: none; }
.gg-status { padding: .8rem 1rem; border-radius: 6px; background: #e8eef6; }
.gg-status--success { background: #e3f3e8; color: #1e5a2d; }
.gg-status--error { background: #fdecea; color: #8c1d18; }
.gg-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.gg-category { margin-bottom: 2rem; }
.gg-category__image, .gg-item__image { max-width: 100%; height: auto; border-radius: 6px; }
.gg-item { display: flex; gap: 1rem; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--gg-border); }
.gg-item__image { width: 96px; height: 96px; object-fit: cover; }
.gg-item__body { flex: 1; }
.gg-item__name { margin: 0; }
.gg-item__labels { color: var(--gg-muted); font-weight: 400; }
.gg-item__price { font-weight: 700; margin: .25rem 0 0; }
.gg-item--unavailable { opacity: .6; }
.gg-item__note { color: var(--gg-muted); font-size: .9em; }
.gg-legend { font-size: .8em; color: var(--gg-muted); }
.gg-cart { border: 2px solid var(--gg-accent); border-radius: 8px; padding: 1rem; margin-top: 1.5rem; }
.gg-cart__items { list-style: none; padding: 0; }
.gg-cart__item { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.gg-cart__qty { width: 4rem; min-height: 40px; }
.gg-cart__name { flex: 1; }
.gg-cart__remove { min-width: 40px; min-height: 40px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; }
.gg-totals__sum { font-weight: 700; font-size: 1.1em; }
.gg-options { border: 0; border-radius: 12px; padding: 1.2rem 1.3rem; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); overflow: auto; background: #fff; color: inherit; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.gg-options:not([open]) { display: none; }
.gg-options::backdrop { background: rgba(15, 23, 42, .45); }
.gg-options__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.gg-options__head h4 { margin: 0 0 .3rem; font-size: 1.2em; }
.gg-options__x { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 .2rem; }
.gg-options__desc { margin: 0 0 .8rem; color: var(--gg-muted); }
.gg-options__actions { position: sticky; bottom: -1.2rem; background: #fff; padding: .8rem 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.gg-options__group { border: 0; padding: 0; margin: 0 0 .75rem; }
.gg-options__actions { display: flex; gap: .5rem; }
.gg-error { color: #8c1d18; }

.gg-offers { display: flex; flex-wrap: wrap; gap: .5rem; }
.gg-offer { min-height: 44px; padding: .5rem 1.1rem; border: 1px solid var(--gg-border); border-radius: 999px; background: #fff; cursor: pointer; font: inherit; }
.gg-offer[aria-pressed="true"] { background: var(--gg-accent); color: #fff; border-color: var(--gg-accent); }
.gg-offers-wrap { border: 0; padding: 0; margin: 0 0 1rem; }

/* Liefergebiete und Mindestbestellwert (1.4.0) */
.gg-zones { font-size: .9em; background: rgba(0,0,0,.03); border-radius: 8px; padding: .6em .8em; }
.gg-zones__title { font-weight: 600; margin: 0 0 .2em; }
.gg-zones__list { margin: 0; padding-left: 1.2em; }
.gg-totals__missing { color: #b45309; font-weight: 600; }
.gg-totals__ok { color: #15803d; }

/* ---- 1.5.0: Öffnungsstatus, Merkmale, Kategorien, Warenkorb-Leiste, Tage (E31) */
.gg-openbar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.gg-openbar:empty { display: none; }
.gg-openbar__chip { display: inline-flex; align-items: center; gap: .25rem; padding: .3rem .7rem; border-radius: 999px; font-size: .9em; border: 1px solid var(--gg-border); }
.gg-openbar__chip::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: #b91c1c; }
.gg-openbar__chip.is-open::before { background: #15803d; }
.gg-hours__table { width: 100%; border-collapse: collapse; font-size: .95em; }
.gg-hours__table th, .gg-hours__table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--gg-border); vertical-align: top; }
.gg-hours__table tr.is-today { font-weight: 600; }

.gg-catnav { position: sticky; top: var(--gg-sticky-top, 0px); z-index: 20; display: flex; gap: .4rem; overflow-x: auto; padding: .5rem 0; margin-bottom: .5rem; background: var(--gg-bg, #fff); scrollbar-width: thin; }
.gg-catnav[hidden] { display: none; }
.gg-catnav__link { flex: 0 0 auto; padding: .35rem .8rem; border: 1px solid var(--gg-border); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9em; white-space: nowrap; }
.gg-catnav__link:hover, .gg-catnav__link:focus-visible { border-color: var(--gg-accent); }
.gg-category { scroll-margin-top: calc(var(--gg-sticky-top, 0px) + 3.8rem); }
.gg-catnav__link.is-active { background: var(--gg-accent); border-color: var(--gg-accent); color: #fff; }
.gg-category--unavailable .gg-category__title { opacity: .7; }

.gg-item__tags { margin: .2rem 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.gg-tag { font-size: .75em; padding: .1rem .5rem; border-radius: 999px; background: rgba(0,0,0,.06); }
.gg-tag--vegetarian, .gg-tag--vegan { background: #dcfce7; color: #166534; }
.gg-tag--spicy { background: #fee2e2; color: #991b1b; }
.gg-tag--new { background: #e0e7ff; color: #3730a3; }
.gg-item__allergens { font-size: .85em; color: var(--gg-muted); margin: .2rem 0 0; }
.gg-item__window { font-size: .85em; color: #92400e; margin: .2rem 0 0; }

.gg-when { border: 0; padding: 0; margin: 0; min-width: 0; max-width: 100%; }
.gg-when legend { font-weight: 600; margin-bottom: .3rem; }
.gg-days { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: .5rem; }
.gg-day { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 4.2rem; padding: .35rem .5rem; border: 1px solid var(--gg-border); border-radius: 8px; background: transparent; cursor: pointer; font: inherit; }
.gg-day__date { font-size: .8em; opacity: .75; }
.gg-day[aria-pressed="true"] { background: var(--gg-accent); border-color: var(--gg-accent); color: #fff; }
.gg-slot--asap { flex-basis: 100%; }
.gg-payment { font-size: .95em; margin: .5rem 0; }
.gg-cart__item--unavailable .gg-cart__name { color: #b45309; }

.gg-cartbar { display: none; }
@media (max-width: 782px) {
    .gg-cartbar:not([hidden]) { position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 50; display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border: 0; border-radius: 12px; background: var(--gg-accent); color: #fff; font: inherit; font-size: 1rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; }
    .gg-cartbar__count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 999px; background: #fff; color: var(--gg-accent); font-weight: 700; font-size: .85em; }
    .gg-cartbar strong { margin-left: auto; }
    .gg-menu { padding-bottom: 4.5rem; }
}

/* ---- 1.6.0: Barrierefreiheit und Zusatzwünsche (E32) */
.gg-access { padding: .7rem .9rem; border-radius: 8px; background: rgba(0,0,0,.03); }
.gg-access__text { margin: .35rem 0 0; font-size: .95em; }
.gg-access__text--no { margin: 0; }
.gg-check--fixed input { accent-color: #15803d; }
.gg-access__more .gg-field { margin-top: .5rem; }
.gg-extras { border: 0; padding: 0; margin: 0; min-width: 0; }
.gg-extras legend { font-weight: 600; margin-bottom: .3rem; }
.gg-extras__list { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }

/* ---- 1.7.0: Warenkorb rechts, Meldungen (E33) */
.gg-alert { margin: .4rem 0; padding: .8rem 1rem; border-radius: 8px; border-left: 4px solid #b45309; background: #fff7ed; color: #7c2d12; font-weight: 600; }
.gg-slot--block { min-width: 9rem; }
.gg-menu--cart { container-type: inline-size; }
.gg-cart__empty { color: var(--gg-muted); margin: .3rem 0 0; }
@container (min-width: 760px) {
    .gg-menu--cart .gg-menu__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 2rem; align-items: start; }
    .gg-menu--cart .gg-cart { position: sticky; top: calc(var(--gg-sticky-top, 0px) + 3.6rem); margin-top: 0; max-height: calc(100vh - var(--gg-sticky-top, 0px) - 4.6rem); overflow: auto; }
    .gg-menu--cart .gg-cart .gg-row { grid-template-columns: 1fr; }
    .gg-menu--cart .gg-cartbar { display: none !important; }
}
@container (max-width: 759px) {
    .gg-menu--cart .gg-cart.is-empty { display: none; }
}
.gg-toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translate(-50%, 1rem); z-index: 60; padding: .6rem 1rem; border-radius: 999px; background: #1f2937; color: #fff; font-size: .95em; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.gg-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.gg-slot--more { flex-basis: 100%; background: transparent; border-style: dashed; }
/* E34: Checkbox-Text als ein Block, Zeitwahl, Fortschritt, Prüfen vor dem Absenden, Kennzeichnung */
.gg-check > input { flex: 0 0 auto; margin-top: .25em; }
.gg-check > span { flex: 1 1 auto; min-width: 0; }
.gg-day:disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
.gg-day__first { font-size: .72em; opacity: .8; margin-top: .1rem; }
.gg-day[aria-pressed="true"] .gg-day__first { opacity: .95; }
.gg-timepick { display: block; }
.gg-timepick .gg-slot--asap { display: flex; justify-content: center; align-items: center; gap: .25rem; width: 100%; margin-bottom: .6rem; }
.gg-timepick__label { margin: .1rem 0 .35rem; font-size: .85em; color: var(--gg-muted); }
.gg-timepick__hours { display: flex; flex-wrap: wrap; gap: .35rem; }
.gg-hour { flex: 0 0 auto; min-height: 40px; padding: 0 .8rem; border: 1px solid var(--gg-border); border-radius: 999px; background: transparent; font: inherit; cursor: pointer; }
.gg-hour[aria-pressed="true"] { border-color: var(--gg-accent); color: var(--gg-accent); font-weight: 600; box-shadow: inset 0 0 0 1px var(--gg-accent); }
.gg-timepick__mins { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); gap: .35rem; margin-top: .45rem; }
.gg-timepick__mins .gg-slot { min-width: 0; }
.gg-when__summary { margin: .6rem 0 0; font-weight: 600; }
.gg-progress { margin: .4rem 0; }
.gg-progress__bar { height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.gg-progress__bar span { display: block; height: 100%; border-radius: inherit; background: #15803d; transition: width .3s; }
.gg-progress--warn .gg-progress__bar span { background: #d97706; }
.gg-progress__text { margin: .25rem 0 0; font-size: .9em; }
.gg-progress--warn .gg-progress__text { color: #b45309; font-weight: 600; }
.gg-review { margin: .8rem 0; padding: .9rem 1rem; border: 2px solid var(--gg-accent); border-radius: 10px; background: #fff; }
.gg-review__title { margin: 0 0 .4rem; font-weight: 700; }
.gg-review__items { margin: 0 0 .5rem; padding-left: 1.1rem; }
.gg-review__facts { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0 0 .8rem; }
.gg-review__facts dt { color: var(--gg-muted); }
.gg-review__facts dd { margin: 0; }
.gg-review__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.gg-item__again { margin: .15rem 0 0; font-size: .85em; color: #7a4b00; }
.gg-item__allergens em { font-size: .9em; }
.gg-legend__group { display: block; margin-top: .25rem; }
.gg-nextday { flex-basis: 100%; margin-top: .5rem; }

/* ---- 1.9.0: einheitliche Schriftgrößen (E35) – unabhängig von der Grundschrift des Themes.
   Fünf Stufen; im Theme über die Variablen anpassbar. */
.gg { --gg-fs: 1rem; --gg-fs-sm: .875rem; --gg-fs-xs: .8125rem; --gg-fs-lg: 1.125rem; --gg-fs-xl: 1.375rem; font-size: var(--gg-fs); line-height: 1.5; }
/* Grundtext: Eingaben, Knöpfe, Uhrzeiten, Hinweise und Meldungen */
.gg input, .gg select, .gg textarea, .gg button, .gg .gg-alert, .gg .gg-status, .gg .gg-slot-msg, .gg .gg-when__summary,
.gg .gg-item__price, .gg .gg-cart__name, .gg .gg-review, .gg .gg-options__desc, .gg .gg-access__text { font-size: var(--gg-fs); }
/* Beschriftungen und Nebentexte */
.gg .gg-field > span, .gg legend, .gg .gg-zones__title { font-size: var(--gg-fs-sm); font-weight: 600; line-height: 1.4; }
.gg .gg-check, .gg .gg-check a, .gg .gg-hint, .gg .gg-zones, .gg .gg-payment, .gg .gg-openbar__chip, .gg .gg-catnav__link,
.gg .gg-progress__text, .gg .gg-timepick__label, .gg .gg-toast, .gg .gg-item__desc, .gg .gg-item__note, .gg .gg-hours__table,
.gg .gg-totals, .gg .gg-cart__empty, .gg .gg-day__name, .gg .gg-cartbar__count, .gg .gg-category__desc, .gg .gg-item .gg-item__note { font-size: var(--gg-fs-sm); }
.gg .gg-check { font-weight: 400; line-height: 1.45; }
/* Kleinste Stufe: Kennzeichnung, Merkmale, Datumszeilen */
.gg .gg-tag, .gg .gg-item__allergens, .gg .gg-item__allergens em, .gg .gg-item__window, .gg .gg-item__again, .gg .gg-legend,
.gg .gg-day__date, .gg .gg-day__first, .gg .gg-item__labels { font-size: var(--gg-fs-xs); }
/* Überschriften im Baustein */
.gg .gg-item__name, .gg .gg-cart__title, .gg .gg-review__title, .gg .gg-options__head h4, .gg .gg-totals__sum { font-size: var(--gg-fs-lg); line-height: 1.3; }
.gg .gg-category__title { font-size: var(--gg-fs-xl); line-height: 1.25; margin: 0 0 .5rem; }
.gg .gg-alert { font-weight: 600; line-height: 1.45; }
.gg .gg-nextday { font-size: var(--gg-fs-sm); min-height: 44px; }
.gg .gg-options__x, .gg .gg-cart__remove { font-size: 1.5rem; }

/* ---- 1.10.0: lange Zeitlisten scrollen in sich (E36) – ca. 3½ Reihen sichtbar */
.gg { --gg-list-rows: 3.5; }
.gg .gg-timepick__mins, .gg .gg-timepick__list, .gg [data-gg-slots] { position: relative; max-height: calc(var(--gg-list-rows) * (44px + .4rem)); overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 2px 2px; align-content: flex-start; scrollbar-width: thin; }
.gg [data-gg-slots] > .gg-alert, .gg [data-gg-slots] > .gg-nextday { flex-basis: 100%; }
