/*
 * Rezeptsuche: Suchfeld im Seitenkopf, {modul=suchfeld}, Ergebnisseite und
 * Vorschlagsliste. Eingebunden von KochrezepteSeite\Suche\Suchfeld über die
 * Marke im <head>, hinter dem Inline-Stylesheet des Layouts.
 *
 * Jede Regel hängt an einer Klasse mit dem Präfix suche-. Vom Layout wird nur
 * die Schrift geerbt; alles andere setzt diese Datei selbst, auch dort, wo
 * das Layout Elemente pauschal gestaltet (a, p, ul, h2, input[type="text"],
 * td.inhalt_first_child img). Wo eine Layoutregel spezifischer ist, steht
 * hier ein Elternselektor davor.
 *
 * Farben wie im Layout: #3d6b0f trägt Text und weiße Schrift (6,4:1), das
 * Markengrün #8CC63F nur Flächen und Rahmen, nie weiße Schrift. Helle Flächen
 * #f3fbe9 und #fafffa. Rahmen von Eingabefeldern #6b8f45 (3,7:1 auf Weiß).
 *
 * Mobil zuerst; ab 769 px gilt das Desktop-Layout der Seite, dort wird die
 * Logozeile sichtbar und das Kopf-Suchfeld rückt hinein.
 *
 * Änderungen hier verlangen eine neue Suchfeld::VERSION: Der Server liefert
 * die Datei zwei Monate lang aus dem Browser-Cache.
 */

/* ------------------------------------------------------------ Grundlagen */

.suche-seite,
.suche-seite *,
.suche-seite *::before,
.suche-seite *::after,
.suche-feld,
.suche-feld *,
.suche-feld *::before,
.suche-feld *::after,
.suche-kopfleiste {
    box-sizing: border-box;
}

/* Nur für Screenreader: unsichtbar, aber vorgelesen. */
.suche-unsichtbar {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Das Layout setzt a, p und ul auf 12px; Links in der Suche erben. */
.suche-seite a,
.suche-feld a {
    font: inherit;
}

.suche-symbol {
    display: block;
    flex: 0 0 auto;
}

/* ------------------------------------------- Eingabezeile mit Absendeknopf */

.suche-eingabe {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.suche-feld .suche-eingabe__feld,
.suche-formular .suche-eingabe__feld {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #6b8f45;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.25;
    -webkit-appearance: none;
    appearance: none;
}

.suche-eingabe__feld::placeholder {
    color: #6b6b6b;
    opacity: 1;
}

.suche-feld .suche-eingabe__knopf,
.suche-formular .suche-eingabe__knopf {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 48px;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #3d6b0f;
    border-radius: 0 6px 6px 0;
    background: #3d6b0f;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease;
}

.suche-eingabe__knopf:hover {
    background: #2f5409;
    border-color: #2f5409;
}

/* Der Fokusrahmen des Felds liegt innen und reicht so nicht über den Knopf daneben. */
.suche-eingabe__feld:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: -3px;
}

.suche-eingabe__knopf:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #1f3a05;
    outline-offset: 2px;
}

/*
 * Schmale Bildschirme: Der Knopf zeigt nur die Lupe, damit der Platzhalter
 * ins Feld passt. Der Text „Suchen“ bleibt für Screenreader stehen.
 */
@media (max-width: 479px) {
    .suche-feld--gross .suche-eingabe__knopftext,
    .suche-formular .suche-eingabe__knopftext {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .suche-feld--gross .suche-eingabe__feld {
        font-size: 16px;
    }

    .suche-feld--gross .suche-eingabe__knopf {
        padding: 0 14px;
    }
}

/* --------------------------------------------- Suchfeld, beide Varianten */

.suche-feld {
    display: block;
    margin: 0;
    padding: 0;
    gap: 0;
}

.suche-feld__label {
    display: block;
    margin: 0 0 6px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
}

/* {modul=suchfeld}: groß, in einer hellen Fläche. */
.suche-feld--gross {
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid #cae6aa;
    border-radius: 8px;
    background: #f3fbe9;
}

.suche-feld--gross .suche-eingabe__feld,
.suche-feld--gross .suche-eingabe__knopf {
    height: 48px;
}

.suche-feld--gross .suche-eingabe__feld {
    font-size: 17px;
}

.suche-feld--gross .suche-eingabe__knopf {
    padding: 0 18px;
    font-size: 15px;
}

/*
 * „Erweiterte Suche“ unter dem Feld im Kopf, rechtsbündig unter dem Knopf:
 * der Weg zu den Filtern der Suchseite. Das Zeichen davor (zwei Regler)
 * sagt, was dort wartet.
 */
.suche-feld .suche-feld__erweitert {
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    min-height: 32px;
    margin: 4px 0 0 auto;
    padding: 0 2px;
    color: #3d6b0f;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.suche-feld .suche-feld__erweitert:hover {
    text-decoration: underline;
}

.suche-feld .suche-feld__erweitert:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
    border-radius: 4px;
}

.suche-feld__filtersymbol {
    display: block;
    flex: 0 0 auto;
}

/*
 * Kopfleiste: Die Marke steht am Anfang der Zelle unter der Logozeile.
 * Mobil (Logozeile ausgeblendet) ist sie eine Leiste direkt unter dem
 * Kopf; z-index hebt sie und ihre Vorschlagsliste über den Inhalt.
 */
.suche-kopfleiste {
    position: relative;
    z-index: 20;
    padding: 8px;
    border-bottom: 1px solid #cae6aa;
    background: #f3fbe9;
    text-align: left;
}

/*
 * Die Lupe vor dem Menü-Knopf gibt es nur, wo das Layout den Menü-Knopf
 * zeigt.
 */
.suche-lupe {
    display: none;
}

/*
 * Bis 768 px: Die Leiste ist zu, bis die Lupe oder der Menü-Knopf sie
 * öffnet (java/suche.js setzt suche-kopfleiste--offen). Das steht hier und
 * nicht im Skript, damit beim Laden nichts aufblitzt – das Skript kommt mit
 * defer. Ohne Skript zeigt ein <noscript> im Kopf sie wieder
 * (Suchfeld::OHNE_SKRIPT).
 *
 * Breiter als das Fenster wird sie nie: Ein zu breiter Inhalt zieht die
 * Zelle der Leiste mit auf, max-width hält sie trotzdem im Fenster – 8 px
 * Rand des body, 1 px Rahmen und 1 px Innenabstand der Zelle auf jeder Seite.
 *
 * Die Lupe gleicht dem Menü-Knopf im Layout: 44 × 44 px, absolut im Fenster
 * (so bleibt sie auch auf einer zu breiten Seite sichtbar), Symbol 26 px in
 * dunklem Grün auf heller Fläche, offen weiß auf dunklem Grün, derselbe
 * Fokusrahmen. top und right rechnen mit denselben Zahlen wie der
 * Menü-Knopf (13 px Rand, 44 px Knopf, 6 px Abstand); z-index hebt sie über
 * das unsichtbare Klickfeld .top über dem Logo.
 */
@media (max-width: 768px) {
    .suche-kopfleiste {
        display: none;
        max-width: calc(100vw - 20px);
    }

    .suche-kopfleiste.suche-kopfleiste--offen {
        display: block;
    }

    .suche-lupe {
        position: absolute;
        z-index: 21;
        top: 34px;
        right: 63px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 1px solid #cae6aa;
        border-radius: 8px;
        background: #f3fbe9;
        color: #3d6b0f;
        font: inherit;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    .suche-lupe:hover {
        background: #e2f3c8;
        text-decoration: none;
    }

    .suche-lupe[aria-expanded="true"] {
        border-color: #3d6b0f;
        background: #3d6b0f;
        color: #fff;
    }

    .suche-lupe:focus-visible {
        outline: 3px solid #1f3a05;
        outline-offset: 2px;
    }

    .suche-lupe__symbol {
        display: block;
    }
}

@media (max-width: 530px) {
    .suche-lupe {
        top: 21px;
    }
}

/*
 * Ab 769 px ist die Logozeile sichtbar. Die Leiste wird zu einer Hülle ohne
 * Höhe, das Formular hängt absolut an der Seitentabelle (#test, im Layout ab
 * 769 px position: relative), rechts neben dem Logo und rechts bündig mit
 * dem Inhaltsbereich darunter. Gemessen von der Oberkante der Tabelle,
 * nicht von der Logozeile: Die ist wegen der Schrift unter dem Bild je nach
 * Schriftart ein paar Pixel höher.
 *
 * Die Höhe richtet sich nach dem Schriftzug „KochrezepteSeite.de“ im Logo,
 * nicht nach dem ganzen Bild: In img/logo.png (118 px hoch) reicht er von
 * Zeile 55 bis 85, seine Mitte liegt bei 70,5 px. Das Logo beginnt 2 px
 * unter der Tabelle (Rahmen und Innenabstand der Zelle); das 44 px hohe Feld
 * beginnt deshalb bei 2 + 70,5 − 22 = 50,5 px. Der Link „Erweiterte Suche“
 * hängt darunter und schiebt das Feld nicht.
 *
 * Der Platzhalter ist hier kleiner als die Eingabe: In 280 px passte
 * „Rezept, Zutat oder Stichwort“ sonst nicht. Die Eingabe selbst bleibt bei
 * 16 px – darunter vergrößert Safari auf dem iPad die Seite beim Antippen.
 */
@media (min-width: 769px) {
    .suche-kopfleiste {
        position: static;
        height: 0;
        padding: 0;
        border: 0;
        background: none;
    }

    .suche-kopfleiste .suche-feld--kopf {
        position: absolute;
        z-index: 20;
        top: 50.5px;
        right: 12px;
        width: 280px;
    }

    .suche-kopfleiste .suche-feld--kopf .suche-eingabe__feld {
        padding: 0 10px;
    }

    .suche-kopfleiste .suche-feld--kopf .suche-eingabe__knopf {
        min-width: 44px;
        padding: 0 12px;
    }

    .suche-feld--kopf .suche-eingabe__feld::placeholder {
        font-size: 14px;
    }

    .suche-feld .suche-feld__erweitert {
        min-height: 24px;
        margin-top: 2px;
        font-size: 13px;
    }
}

/* ------------------------------------------------------- Vorschlagsliste */

/*
 * Unter dem Feld, so breit wie sein Behälter: im Suchfeld .suche-eingabe, in
 * den Zutatenfeldern .suche-filter__feld. Die Liste der Zutaten ist selbst
 * ein <ul>, list-style gilt ihr.
 */
.suche-vorschlaege {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: min(70vh, 440px);
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    border: 1px solid #6b8f45;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    text-align: left;
}

.suche-vorschlaege[hidden] {
    display: none;
}

/* Der Fokusrahmen der Filterfelder liegt 2 px außen und ist 3 px breit; die Liste beginnt darunter. */
.suche-filter__feld .suche-vorschlaege {
    top: calc(100% + 6px);
}

/* Im schmalen Kopffeld am Desktop breiter als das Feld, rechtsbündig. */
@media (min-width: 769px) {
    .suche-feld--kopf .suche-vorschlaege {
        left: auto;
        width: 380px;
    }
}

.suche-vorschlaege ul.suche-vorschlaege__gruppe {
    margin: 0;
    padding: 0;
    list-style: none;
}

.suche-vorschlaege__gruppe + .suche-vorschlaege__gruppe {
    margin-top: 4px;
    border-top: 1px solid #e3efd5;
}

.suche-vorschlaege li.suche-vorschlaege__titel {
    margin: 0;
    padding: 8px 12px 2px;
    color: #4d4d4d;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: .04em;
    line-height: 1.4;
    text-transform: uppercase;
}

.suche-vorschlaege li.suche-vorschlag {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 4px 12px;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

.suche-vorschlaege li.suche-vorschlag:hover {
    background: #f3fbe9;
}

.suche-vorschlaege li.suche-vorschlag--aktiv,
.suche-vorschlaege li.suche-vorschlag--aktiv:hover {
    background: #e2f3c8;
    box-shadow: inset 3px 0 0 #3d6b0f;
}

/* Lupe vor den Suchbegriffen, als Hintergrund – kein Inhalt für Screenreader. */
.suche-vorschlag--begriff::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%236b8f45' stroke-width='2.5'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%236b8f45' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.suche-vorschlaege .suche-vorschlag__bild {
    display: block;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #f3fbe9;
    object-fit: cover;
}

.suche-vorschlag__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------- Ergebnisseite */

.suche-seite {
    margin: 8px 0 16px;
    color: #1a1a1a;
    font-size: 13px;
    line-height: 1.5;
}

.suche-formular {
    display: block;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #cae6aa;
    border-radius: 8px;
    background: #f3fbe9;
}

.suche-formular__label {
    display: block;
    margin: 0 0 6px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: bold;
}

/* Filterbereich: <details>, mobil ohne gesetzten Filter zugeklappt. */
.suche-filter {
    margin: 10px 0 0;
    padding: 2px 0 0;
    border-top: 1px solid #cae6aa;
}

.suche-filter__titel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 36px 0 0;
    color: #3d6b0f;
    font-size: 14px;
    font-weight: bold;
    list-style: none;
    cursor: pointer;
}

.suche-filter__titel::-webkit-details-marker {
    display: none;
}

.suche-filter__titel::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #3d6b0f;
    border-bottom: 2px solid #3d6b0f;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
}

.suche-filter[open] > .suche-filter__titel::after {
    transform: translateY(-25%) rotate(225deg);
}

.suche-filter__titel:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
    border-radius: 4px;
}

.suche-filter__zahl {
    color: #1a1a1a;
    font-weight: normal;
}

/*
 * Telefon eine Spalte, ab 480 px zwei, ab 600 px drei. Schmaler dürfen die
 * Spalten nicht werden: „Hauptgerichte (15)“ würde abgeschnitten. dense
 * setzt „nur mit Video“ in die Lücke neben den Zutatenfeldern, wenn der
 * Hinweis darunter eine eigene Zeile braucht.
 */
.suche-filter__felder {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row dense;
    gap: 10px 14px;
    padding: 6px 0 4px;
}

@media (min-width: 480px) {
    .suche-filter__felder {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 600px) {
    .suche-filter__felder {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* position: relative trägt die Zutatenvorschläge, die das Skript unter das Feld hängt. */
.suche-filter__feld {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.suche-filter .suche-filter__label {
    margin: 0 0 4px;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
}

/* Spezifischer als input[type="text"] und die Formularregeln einzelner Seiten des Layouts. */
.suche-filter .suche-filter__auswahl,
.suche-filter .suche-filter__text,
.suche-filter .suche-filter__zahlfeld {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 44px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #6b8f45;
    border-radius: 6px;
    background-color: #fff;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 16px;
}

/* 16 px auf dem Telefon, sonst vergrößert iOS beim Antippen; in drei Spalten 14 px. */
@media (min-width: 600px) {
    .suche-filter .suche-filter__auswahl,
    .suche-filter .suche-filter__text,
    .suche-filter .suche-filter__zahlfeld {
        padding: 0 8px;
        font-size: 14px;
    }
}

.suche-filter .suche-filter__auswahl:focus-visible,
.suche-filter .suche-filter__text:focus-visible,
.suche-filter .suche-filter__zahlfeld:focus-visible,
.suche-filter .suche-filter__haken:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
}

.suche-filter .suche-filter__feld--haken {
    flex-direction: row;
    align-items: center;
    align-self: end;
    min-height: 44px;
}

.suche-filter .suche-filter__haken {
    flex: 0 0 auto;
    width: 22px;
    min-width: 0;
    height: 22px;
    margin: 0 8px 0 2px;
    padding: 0;
    accent-color: #3d6b0f;
    cursor: pointer;
}

.suche-filter .suche-filter__feld--haken .suche-filter__label {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-height: 44px;
    margin: 0;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
}

.suche-filter .suche-filter__hinweis {
    grid-column: 1 / -1;
    margin: -6px 0 0;
    color: #4d4d4d;
    font-size: 12px;
    line-height: 1.4;
}

/*
 * Kalorien und Proteinanteil unter den übrigen Filtern: je Gruppe ein
 * <fieldset> mit „von [ ] bis [ ] kcal“ in einer Zeile, Hinweis und
 * Schnellwahl darunter. Die Gruppen stehen auch am Desktop untereinander:
 * Die Inhaltsspalte ist dort gut 550 px breit, nebeneinander passte keine
 * zweite Stufe der Schnellwahl in die Zeile. Die Felder dürfen schrumpfen,
 * aber nicht umbrechen: Label und Feld gehören in eine Zeile, und 320 px
 * reichen dafür.
 */
.suche-filter__naehrwerte {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 6px 0 0;
    padding: 12px 0 4px;
    border-top: 1px solid #cae6aa;
}

/* Ein fieldset ist sonst mindestens so breit wie sein Inhalt und zöge die Seite mit. */
.suche-filter .suche-filter__gruppe {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.suche-filter .suche-filter__legende {
    display: block;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
}

.suche-filter .suche-filter__erlaeuterung {
    margin: 6px 0 0;
    color: #4d4d4d;
    font-size: 12px;
    line-height: 1.4;
}

.suche-filter__grenzen {
    display: flex;
    align-items: center;
    gap: 12px;
}

.suche-filter__grenze {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.suche-filter .suche-filter__label--grenze {
    flex: 0 0 auto;
    margin: 0;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: normal;
}

/* Das Layout gibt jedem input 150 bis 312 px; hier reicht Platz für vier Ziffern, schmal darf es schrumpfen. */
.suche-filter .suche-filter__zahlfeld {
    flex: 0 1 auto;
    width: 6em;
    min-width: 3.5em;
}

.suche-filter__einheit {
    flex: 0 0 auto;
    color: #333;
    font-size: 14px;
}

/* Schnellwahl: die Stufen der Facette als Marken wie unter „Meinten Sie“, ::after auf 44 px. */
.suche-seite ul.suche-filter__stufen {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.suche-filter__stufen > li {
    margin: 0;
    max-width: 100%;
}

.suche-seite .suche-filter__stufe {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    max-width: 100%;
    padding: 4px 12px;
    border: 1px solid #8cc63f;
    border-radius: 18px;
    background: #fff;
    color: #1f3a05;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color .15s ease, border-color .15s ease;
}

.suche-seite a.suche-filter__stufe::after {
    content: "";
    position: absolute;
    top: -4px;
    right: 0;
    bottom: -4px;
    left: 0;
}

.suche-seite a.suche-filter__stufe:hover {
    border-color: #3d6b0f;
    background: #e2f3c8;
    text-decoration: none;
}

.suche-seite a.suche-filter__stufe:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
}

/* Die gewählte Stufe: gefüllt und mit Haken, nicht nur an der Farbe erkennbar. */
.suche-seite .suche-filter__stufe--aktiv {
    border-color: #3d6b0f;
    background: #3d6b0f;
    color: #fff;
    font-weight: bold;
}

.suche-filter__stufe--aktiv::before {
    content: "✓";
    content: "✓" / "";
}

.suche-filter__aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0 4px;
}

.suche-seite .suche-knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid #3d6b0f;
    border-radius: 6px;
    background: #3d6b0f;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.suche-seite .suche-knopf:hover {
    background: #2f5409;
}

.suche-seite .suche-knopf:focus-visible {
    outline: 3px solid #1f3a05;
    outline-offset: 2px;
}

/* Aktive Filter als Marken. ::after vergrößert die Zeigefläche auf 44 px. */
.suche-marken {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 14px;
}

.suche-seite .suche-marken__titel {
    margin: 0;
    font-size: 13px;
    font-weight: bold;
}

.suche-seite ul.suche-marken__liste,
.suche-seite ul.suche-begriffe {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.suche-marken__liste > li,
.suche-begriffe > li {
    margin: 0;
    max-width: 100%;
}

.suche-seite a.suche-marke,
.suche-seite a.suche-begriff {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    max-width: 100%;
    padding: 4px 12px;
    border: 1px solid #8cc63f;
    border-radius: 18px;
    background: #fff;
    color: #1f3a05;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color .15s ease, border-color .15s ease;
}

.suche-seite a.suche-marke {
    padding-right: 10px;
    background: #f3fbe9;
}

.suche-seite a.suche-marke::after,
.suche-seite a.suche-begriff::after {
    content: "";
    position: absolute;
    top: -4px;
    right: 0;
    bottom: -4px;
    left: 0;
}

.suche-seite a.suche-marke:hover,
.suche-seite a.suche-begriff:hover {
    border-color: #3d6b0f;
    background: #e2f3c8;
    text-decoration: none;
}

.suche-seite a.suche-marke:focus-visible,
.suche-seite a.suche-begriff:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
}

.suche-marke__x {
    flex: 0 0 auto;
    color: #3d6b0f;
}

.suche-seite a.suche-marken__alle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
    font-size: 13px;
    text-decoration: underline;
}

/* Trefferzahl und Hinweise */
.suche-kopfzeile {
    margin: 4px 0 10px;
}

.suche-seite .suche-anzahl {
    margin: 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
}

.suche-seite .suche-hinweis {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 4px solid #8cc63f;
    border-radius: 0 6px 6px 0;
    background: #fafffa;
    box-shadow: inset 0 0 0 1px #e3efd5;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.suche-seite .suche-hinweis a {
    text-decoration: underline;
}

/* Hervorgehobene Trefferwörter */
.suche-seite mark {
    padding: 0 1px;
    border-radius: 2px;
    background: #e2f3c8;
    box-shadow: inset 0 -2px 0 #8cc63f;
    color: inherit;
}

/* ---------------------------------------------------------- Trefferliste */

.suche-seite ol.suche-treffer,
.suche-seite ul.suche-seiten__liste,
.suche-seite ul.suche-kacheln {
    margin: 0;
    padding: 0;
    list-style: none;
}

/*
 * Bild links, Text rechts. minmax(0, 1fr) und overflow-wrap: anywhere halten
 * jeden Eintrag so schmal wie die Zelle: Das Seitengerüst besteht aus
 * Tabellen, und ein zu breiter Kasten zöge die ganze Seite mit sich (siehe
 * docs/MOBILE-LAYOUT.md).
 */
.suche-treffer__eintrag {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 0 12px;
    align-items: start;
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid #d6ebbd;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.suche-treffer__eintrag:hover {
    border-color: #8cc63f;
    box-shadow: 0 2px 8px rgba(61, 107, 15, .12);
}

.suche-treffer__bild {
    display: block;
    width: 84px;
}

/* .suche-seite davor: td.inhalt_first_child img { width: 100% } des Layouts ist sonst spezifischer. */
.suche-seite .suche-treffer__foto {
    display: block;
    width: 84px;
    max-width: none;
    height: 84px;
    aspect-ratio: 1 / 1;
    border: 1px solid #d6ebbd;
    border-radius: 6px;
    background: #f3fbe9;
    object-fit: cover;
}

.suche-treffer__text {
    min-width: 0;
}

.suche-seite .suche-treffer__titel {
    margin: 0 0 4px;
    padding: 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.suche-seite .suche-treffer__titel a,
.suche-seite .suche-seiten__titel a {
    color: #3d6b0f;
}

/*
 * Jede Angabe beginnt mit einem 13 px breiten Trennpunkt. Die innere Hülle
 * ist um diese 13 px nach links verschoben, der Absatz schneidet ab, was
 * davor liegt – so verschwindet der Punkt am Anfang jeder Zeile, auch nach
 * einem Umbruch, und steht nur zwischen zwei Angaben.
 */
.suche-seite .suche-treffer__angaben {
    overflow: hidden;
    margin: 0 0 4px;
    color: #4d4d4d;
    font-size: 12px;
    line-height: 1.5;
}

.suche-angaben {
    display: flex;
    flex-wrap: wrap;
    margin-left: -13px;
}

.suche-angabe {
    overflow-wrap: anywhere;
}

/* Der zweite content-Wert ist der leere Alternativtext: Screenreader lesen den Punkt nicht vor. */
.suche-angabe::before {
    content: "·";
    content: "·" / "";
    display: inline-block;
    width: 13px;
    color: #767676;
    text-align: center;
}

.suche-sterne {
    color: #a8681a;
    letter-spacing: 1px;
}

.suche-seite .suche-treffer__auszug,
.suche-seite .suche-seiten__auszug {
    margin: 0;
    color: #262626;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

@media (min-width: 531px) {
    .suche-treffer__eintrag {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 0 14px;
        padding: 12px;
    }

    .suche-treffer__bild,
    .suche-seite .suche-treffer__foto {
        width: 120px;
    }

    .suche-seite .suche-treffer__foto {
        height: 120px;
    }

    .suche-seite .suche-treffer__titel {
        font-size: 16px;
    }
}

/* -------------------------------------------------------------- Blättern */

.suche-blaettern {
    margin: 16px 0;
}

.suche-seite ul.suche-blaettern__liste {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.suche-blaettern__liste > li {
    margin: 0;
}

.suche-blaettern__seite,
.suche-blaettern__schritt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #cae6aa;
    border-radius: 6px;
    background: #fff;
    color: #3d6b0f;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.suche-seite a.suche-blaettern__seite:hover,
.suche-seite a.suche-blaettern__schritt:hover {
    border-color: #8cc63f;
    background: #f3fbe9;
    text-decoration: none;
}

.suche-seite a.suche-blaettern__seite:focus-visible,
.suche-seite a.suche-blaettern__schritt:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
}

.suche-blaettern__seite--aktuell {
    border-color: #3d6b0f;
    background: #3d6b0f;
    color: #fff;
}

.suche-blaettern__luecke {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
    color: #4d4d4d;
}

/* ------------------------------------------------------------- Abschnitte */

.suche-seite .suche-abschnitt {
    margin: 22px 0 10px;
    padding: 0 0 4px;
    border-bottom: 2px solid #8cc63f;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.3;
}

/* Passende Seiten */
.suche-seiten__eintrag {
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid #d6ebbd;
    border-radius: 8px;
    background: #fff;
}

.suche-seite .suche-seiten__titel {
    margin: 0 0 2px;
    padding: 0;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* Keine Treffer */
.suche-leer {
    margin: 4px 0 8px;
    padding: 14px;
    border: 1px solid #cae6aa;
    border-radius: 8px;
    background: #fafffa;
    overflow-wrap: anywhere;
}

.suche-leer .suche-anzahl {
    margin-bottom: 10px;
}

.suche-seite .suche-leer__frage {
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: bold;
}

.suche-seite ul.suche-leer__tipps {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 13px;
    line-height: 1.5;
    list-style: disc;
}

.suche-leer__tipps > li {
    margin: 0 0 4px;
}

.suche-leer__tipps a {
    text-decoration: underline;
}

/* Neueste Rezepte als Kacheln */
.suche-seite ul.suche-kacheln {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 531px) {
    .suche-seite ul.suche-kacheln {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.suche-kachel {
    min-width: 0;
    margin: 0;
}

.suche-seite a.suche-kachel__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #d6ebbd;
    border-radius: 8px;
    background: #fff;
    color: #3d6b0f;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.suche-seite a.suche-kachel__link:hover {
    border-color: #8cc63f;
    box-shadow: 0 2px 8px rgba(61, 107, 15, .12);
    text-decoration: none;
}

.suche-seite a.suche-kachel__link:hover .suche-kachel__titel {
    text-decoration: underline;
}

.suche-seite a.suche-kachel__link:focus-visible {
    outline: 3px solid #3d6b0f;
    outline-offset: 2px;
}

.suche-seite .suche-kachel__bild {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 4 / 3;
    background: #f3fbe9;
    object-fit: cover;
}

.suche-kachel__titel {
    display: block;
    padding: 8px 10px 10px;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* ------------------------------------------------- weniger Bewegung */

@media (prefers-reduced-motion: reduce) {
    .suche-eingabe__knopf,
    .suche-filter__titel::after,
    .suche-seite a.suche-marke,
    .suche-seite a.suche-begriff,
    .suche-seite .suche-filter__stufe,
    .suche-treffer__eintrag,
    .suche-seite a.suche-kachel__link {
        transition: none;
    }
}
