/* AOS Restaurant Menu – Frontend. Theme-freundlich: erbt Schriftgröße/Body-Font,
   Farben & Abstände über CSS-Variablen überschreibbar. */
.aosm {
    --aosm-accent: #7a1f1f;
    --aosm-ink: #2a2520;
    --aosm-muted: #6b6258;
    --aosm-rule: #e3dcd1;
    --aosm-tint: #faf6ef;
    --aosm-serif: Georgia, "Times New Roman", serif;
    --aosm-columns: 1;
    --aosm-colgap: 2.5rem;
    --aosm-maxwidth: 760px;

    /* Fluide Typo-Skala: Ansichts-Titel (Wochenkarte/Tagesgericht) vs. Kategorie-Titel.
       Auf dem Desktop landen sie auf den bisherigen Werten (~1.9 / 1.75rem), schrumpfen
       aber auf schmalen Spalten/Handys sauber mit. */
    --aosm-h-view: clamp(1.6rem, 1.35rem + 1.2vw, 1.95rem);
    --aosm-h-section: clamp(1.45rem, 1.25rem + 1vw, 1.75rem);
    --aosm-lh-head: 1.15;
    --aosm-space-block: 2.5rem;

    /* Design-Defaults – von Frontend\Styles je Preset/Schalter überschrieben. */
    --aosm-head-gap: 0px;
    --aosm-head-rule-color: var(--aosm-accent);
    --aosm-desc-style: normal;

    max-width: var(--aosm-maxwidth);
    margin-inline: auto;
    color: var(--aosm-ink);
    line-height: 1.5;
}
/* Breite Blockausrichtungen vom Theme bestimmen lassen. */
.aosm.alignwide,
.aosm.alignfull {
    max-width: none;
}
.aosm * {
    box-sizing: border-box;
}

/* ---------- Mehrspalten-Layout ---------- */
.aosm-cols {
    column-count: var(--aosm-columns, 1);
    column-gap: var(--aosm-colgap, 2.5rem);
    /* Gleich hohe Spalten – mit break-inside:avoid sonst oft schief. */
    column-fill: balance;
}
/* Sektionen/Wochen-Boxen (auch verschachtelte) nie über Spalten umbrechen. */
.aosm-cols .aosm-section,
.aosm-cols .aosm-week {
    break-inside: avoid;
}
.aosm-cols > .aosm-section,
.aosm-cols > .aosm-week {
    margin-top: 0; /* gleichmäßige Spaltenoberkante */
}
@media (max-width: 700px) {
    .aosm-cols {
        /* Auch die Variable zurücksetzen, damit ein inline gesetztes
           --aosm-columns (Shortcode/Block) auf Mobil nicht gewinnt. */
        --aosm-columns: 1;
        column-count: 1;
    }
}

/* ---------- Sektion ---------- */
.aosm-section {
    margin: var(--aosm-space-block, 2.5rem) 0;
}
.aosm-section__head {
    margin-bottom: 1rem;
}
.aosm-section__subtitle,
.aosm-week__kicker,
.aosm-special__kicker {
    margin: 0 0 .15rem;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--aosm-accent);
}
.aosm-section__title {
    margin: 0;
    font-family: var(--aosm-serif);
    font-size: var(--aosm-h-section);
    line-height: var(--aosm-lh-head);
    color: var(--aosm-head-color, inherit);
    /* „Unterstrichene Überschriften": Abstand (head-gap) und Linienstärke (head-rule)
       sind entkoppelt, damit die rote Regel nicht am Text klebt (Vorlagen-Look). */
    padding-bottom: var(--aosm-head-gap, 0px);
    border-bottom: var(--aosm-head-rule, 0px) solid var(--aosm-head-rule-color, var(--aosm-accent));
}
.aosm-section__pricenote {
    font-family: inherit;
    font-size: .85rem;
    font-weight: 400;
    color: var(--aosm-muted);
    letter-spacing: normal;
}
.aosm-section__intro,
.aosm-week__intro {
    margin: .4rem 0 0;
    color: var(--aosm-muted);
    font-style: italic;
}
.aosm-section__footnote {
    margin: .9rem 0 0;
    font-size: .85rem;
    color: var(--aosm-muted);
}

/* ---------- Gerichte ---------- */
/* Höhere Spezifität + logisches UND physisches Padding, damit Theme-„content ul"-
   Regeln die Gerichte NICHT nach rechts einrücken (bündig zur Kategorie-Überschrift). */
.aosm ul.aosm-items {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-inline-start: 0;
    margin-inline-start: 0;
}
.aosm-item {
    padding: .55rem 0;
    border-bottom: var(--aosm-divider, 1px) solid var(--aosm-rule);
}
.aosm-item:last-child {
    border-bottom: 0;
}
.aosm-item__row {
    display: flex;
    align-items: baseline;
    gap: .25rem;
}
.aosm-item__name {
    font-weight: 600;
}
.aosm-item__dots {
    flex: 1 1 auto;
    margin: 0 .15rem;
    /* Punkt-Leader umschaltbar via --aosm-leader (Breite 1px/0px); Farbe theme-fähig. */
    border-bottom: var(--aosm-leader, 1px) dotted color-mix(in srgb, var(--aosm-ink) 28%, transparent);
    transform: translateY(-.18em);
}
.aosm-item__price {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
    color: var(--aosm-price-color, inherit);
    font-size: calc(1em * var(--aosm-price-size, 1));
}
.aosm-item__desc {
    margin: .15rem 0 0;
    color: var(--aosm-muted);
    font-size: .92rem;
    font-style: var(--aosm-desc-style, normal);
}
.aosm-price__label {
    color: var(--aosm-muted);
    font-size: .85em;
}
.aosm-price__sep {
    /* Folgt der Preisfarbe (bei roten Preisen kein ausgegrauter Trenner). */
    color: inherit;
}
/* „Ausverkauft" NICHT über globale Deckkraft signalisieren (Kontrast/AA);
   Name leicht gedämpft, Preis durchgestrichen, das Text-Tag bleibt voll lesbar. */
.aosm-item--unavailable .aosm-item__name {
    color: var(--aosm-muted);
}
.aosm-item--unavailable .aosm-item__price {
    text-decoration: line-through;
    color: var(--aosm-muted);
}

/* ---------- Pills & Tags ---------- */
.aosm-pill {
    display: inline-block;
    margin-left: .35rem;
    padding: .05em .5em;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
    vertical-align: middle;
    white-space: nowrap;
}
.aosm-pill--diet {
    background: #e7f0e4;
    color: #2f6b2f;
}
.aosm-pill--badge {
    background: #f6e7d8;
    color: var(--aosm-accent);
}
.aosm-tag--sold {
    margin-left: .35rem;
    font-size: .7rem;
    font-weight: 700;
    color: var(--aosm-accent);
    text-transform: uppercase;
}

/* ---------- Wochenkarte ---------- */
.aosm-week {
    margin: var(--aosm-space-block, 2.5rem) 0;
    /* Box-Optik umschaltbar via --aosm-week-* (an: getönte Box, aus: schlicht). */
    padding: var(--aosm-week-pad, 1.5rem 1.75rem);
    background: var(--aosm-week-bg, var(--aosm-tint));
    border: var(--aosm-week-bd, 1px) solid var(--aosm-rule);
    border-radius: 10px;
}
.aosm-week__title {
    margin: 0;
    font-family: var(--aosm-serif);
    font-size: var(--aosm-h-view);
    line-height: var(--aosm-lh-head);
}
.aosm-week__valid {
    margin: .35rem 0 0;
    font-weight: 600;
    color: var(--aosm-accent);
}
.aosm-week .aosm-section {
    margin: 1.5rem 0 0;
}
/* Kategorie-Titel in der Wochenkarte = gleiche Größe wie in der normalen Karte
   (geerbt von .aosm-section__title); keine Sonder-Verkleinerung mehr. */

/* ---------- Gericht des Tages ---------- */
.aosm-special {
    margin: var(--aosm-space-block, 2.5rem) 0;
}
.aosm-special__title {
    margin: 0 0 1rem;
    font-family: var(--aosm-serif);
    font-size: var(--aosm-h-view);
    line-height: var(--aosm-lh-head);
}
/* Hinweis, solange für heute nichts eingetragen ist.
   Bewusst kein Warnton: Es ist kein Fehler, sondern ein Zwischenstand am
   Vormittag. Der Balken links nimmt die Form der Tagesgericht-Karte auf,
   damit der Abschnitt an derselben Stelle steht und nichts springt, sobald
   das Gericht eingetragen wird. */
.aosm-special__wait {
    margin: 0;
    padding: .9rem 1.15rem;
    /* Eigener Balken, NICHT --aosm-special-accent: Der steht bei den Vorlagen
       „modern" und „schlicht" auf 0px, und der Hinweis stand dann als blasser
       Kasten ohne Kante da. Er ist auch keine Gerichtkarte, sondern ein
       Zwischenstand — die Kennzeichnung gehört ihm selbst. */
    border-left: 3px solid var(--aosm-accent);
    background: var(--aosm-tint);
    color: var(--aosm-ink);
    font-style: italic;
}
.aosm-special__grid {
    display: grid;
    gap: 1rem;
    /* Folgt derselben Variable wie die Karten, damit sich das Gericht des
       Tages getrennt einstellen laesst. Vorher stand hier repeat(auto-fit,
       minmax(260px, 1fr)) — das legte zwei Tagesgerichte immer nebeneinander,
       egal was eingestellt war. minmax(0, 1fr) statt 1fr, sonst sprengt ein
       langer Gerichtname die Spalte. */
    grid-template-columns: repeat(var(--aosm-columns, 1), minmax(0, 1fr));
}
@media (max-width: 700px) {
    .aosm-special__grid {
        grid-template-columns: 1fr;
    }
}
.aosm-card {
    /* Kasten umschaltbar via --aosm-special-* (aus = nur Text + Preis). */
    padding: var(--aosm-special-pad, 1rem 1.15rem);
    border: var(--aosm-special-bd, 1px) solid var(--aosm-rule);
    border-left: var(--aosm-special-accent, 4px) solid var(--aosm-accent);
    border-radius: 8px;
    background: var(--aosm-special-bg, #fff);
}
.aosm-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
}
.aosm-card__name {
    margin: 0;
    font-size: 1.1rem;
}
.aosm-card__date {
    color: var(--aosm-accent);
    font-weight: 700;
}
.aosm-card__price {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--aosm-price-color, inherit);
    font-size: calc(1em * var(--aosm-price-size, 1));
}
/* Tagesgericht-Aktionspreis: Original durchgestrichen, Aktionspreis betont. */
.aosm-price--old {
    margin-right: .35em;
    color: var(--aosm-muted);
    font-weight: 400;
    text-decoration: line-through;
}
.aosm-price--deal {
    color: var(--aosm-accent);
    font-weight: 700;
}
.aosm-card__desc {
    margin: .35rem 0 0;
    color: var(--aosm-muted);
    font-size: .92rem;
    font-style: var(--aosm-desc-style, normal);
}

/* ---------- Globaler Hinweis ---------- */
.aosm-note {
    margin: 1.2rem 0 0;
    color: var(--aosm-muted);
    font-size: .85rem;
}

/* ---------- PDF-Download ---------- */
.aosm-pdf-link {
    margin: 1.5rem 0 0;
}
.aosm-pdf-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px; /* Touch-Zielgröße (WCAG 2.5.5) */
    padding: .5rem 1.1rem;
    border: 1px solid var(--aosm-accent);
    border-radius: 6px;
    color: var(--aosm-accent);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.aosm-pdf-button:hover,
.aosm-pdf-button:focus {
    background: var(--aosm-accent);
    color: #fff;
}
/* Sichtbarer Tastatur-Fokus, getrennt von der Hover-Füllung. */
.aosm-pdf-button:focus-visible {
    outline: 2px solid var(--aosm-accent);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .aosm-pdf-button {
        transition: none;
    }
}

/* Lange Namen + Pills sollen umbrechen können, nicht den Preis quetschen. */
.aosm-item__name {
    min-width: 0;
}

/* ---------- Mobil / schmale Spalten ---------- */
@media (max-width: 600px) {
    .aosm-item__dots {
        display: none;
    }
    .aosm-item__row {
        flex-wrap: wrap;
    }
    .aosm-item__price {
        flex-basis: 100%;
        text-align: left;
        /* Farbe NICHT erzwingen – die per Einstellung gewählte Preisfarbe
           (--aosm-price-color) bleibt erhalten; nur etwas mehr Gewicht. */
        font-weight: 600;
    }
    /* „Ausverkauft" behält den gedämpften, durchgestrichenen Look auch mobil. */
    .aosm-item--unavailable .aosm-item__price {
        font-weight: 400;
    }
}

/* ---------- Druck (Browser „Seite drucken") ---------- */
@media print {
    .aosm {
        max-width: none;
        color: #000;
    }
    .aosm-pdf-link {
        display: none; /* kein „PDF herunterladen"-Button auf Papier */
    }
    .aosm-cols {
        column-count: 2; /* Papier ist breit – zweispaltig setzen */
    }
    .aosm-section,
    .aosm-week,
    .aosm-card,
    .aosm-item {
        break-inside: avoid;
    }
    .aosm-section__title,
    .aosm-week__title,
    .aosm-special__title {
        break-after: avoid;
    }
}

/* ---------- Allergene ---------- */
/*
 * Hochgestellt wie auf einer gedruckten Karte, aber NICHT über <sup>: das
 * verkleinert die Schrift ein zweites Mal und landet unter 10 px. Stattdessen
 * eine eigene Größe und ein bewusster Abstand.
 */
.aosm-allergens {
    margin-left: .3rem;
    font-size: .75rem;
    font-weight: 400;
    letter-spacing: .04em;
    vertical-align: super;
    line-height: 1;
    white-space: nowrap;
    color: var(--aosm-muted, #6b6b6b);
}
.aosm-allergen {
    /* Der gepunktete Unterstrich der Browser-Voreinstellung zerschießt die
       Zeile; die Bedeutung steht ohnehin in der Legende darunter. */
    text-decoration: none;
    border: 0;
    cursor: help;
}
.aosm-legend {
    margin: 1.25rem 0 0;
    padding-top: .75rem;
    border-top: 1px solid var(--aosm-rule, #e2e2e2);
}
.aosm-legend__title {
    margin: 0 0 .25rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--aosm-muted, #6b6b6b);
}
.aosm-legend__list {
    margin: 0;
    font-size: .8rem;
    line-height: 1.6;
    color: var(--aosm-muted, #6b6b6b);
}
.aosm-legend__item strong {
    font-weight: 700;
}

/* ---------- Herstellerhinweis (nur wenn eingeschaltet) ---------- */
.aosm-credit {
    margin: .75rem 0 0;
    font-size: .75rem;
    color: var(--aosm-muted, #6b6b6b);
}
.aosm-credit a {
    color: inherit;
}
