/* Suche: das Suchfeld im Kopf und die Ergebnisseite (search.php). */

/* Suchfeld im Kopf: rechts neben dem Menü, auf dem Handy als eigene Zeile im aufgeklappten Menü */
.kopf-suche {
    position: relative;
    flex: none;
    margin: 0 0 0 auto;
}

.kopf-suche input {
    width: 180px;
    height: 42px;
    padding: 0 44px 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--mist);
    font-size: 15px;
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
    transition: width .25s ease, border-color .2s, background-color .2s;
}

.kopf-suche input::placeholder,
.suche-formular input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.kopf-suche input:focus,
.suche-formular input:focus {
    border-color: var(--sprout);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(114, 192, 44, .22);
}

.kopf-suche input:focus {
    width: 240px;
}

/* Das eigene Kreuz des Browsers läge unter der Lupe */
.kopf-suche input::-webkit-search-cancel-button,
.suche-formular input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.kopf-suche button {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0 999px 999px 0;
    background: transparent;
    font-size: 16px;
    color: var(--forest);
    cursor: pointer;
}

.kopf-suche button:hover,
.kopf-suche button:focus-visible {
    color: #3f7a12;
}

.kopf-suche button:focus-visible,
.suche-formular button:focus-visible {
    outline: 2px solid var(--forest);
    outline-offset: -4px;
}

/* Neben dem Menü ist unter 1200 Pixeln kein Platz, um das Feld beim Schreiben zu verbreitern */
@media (max-width: 1199px) {
    .kopf-suche input:focus {
        width: 180px;
    }
}

@media (max-width: 991px) {
    .kopf-suche {
        width: 100%;
        margin: 14px 0 8px;
    }

    .kopf-suche input,
    .kopf-suche input:focus {
        width: 100%;
    }
}

/* Ergebnisseite */
.suche-seite {
    max-width: 900px;
    margin: 0 auto;
}

.suche-seite .eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--forest);
}

.suche-seite h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ink);
}

.suche-formular {
    position: relative;
    margin: 26px 0 0;
}

.suche-formular input {
    width: 100%;
    height: 58px;
    padding: 0 66px 0 26px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--mist);
    font-size: 18px;
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, background-color .2s;
}

.suche-formular button {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sprout);
    font-size: 17px;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .2s;
}

.suche-formular button:hover {
    background: #86cf45;
}

.gts-firma.suche-seite .suche-anzahl {
    margin: 22px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
}

.suche-treffer {
    display: grid;
    gap: 14px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.suche-treffer a {
    display: block;
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}

.suche-treffer a:hover,
.suche-treffer a:focus {
    border-color: var(--sprout);
    box-shadow: 0 18px 40px -26px rgba(20, 40, 10, .5);
}

.suche-treffer .art {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--forest);
}

.suche-treffer h2 {
    margin: 4px 0 6px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink);
}

.gts-firma.suche-seite .suche-treffer p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--muted);
}

.suche-treffer mark {
    padding: 0 2px;
    border-radius: 4px;
    background: #dff0cb;
    font-weight: 600;
    color: var(--ink);
}

.suche-treffer .adresse {
    display: block;
    margin-top: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #3f7a12;
}

.suche-leer {
    margin-top: 14px;
    padding: 24px 26px;
    border-radius: 22px;
    background: var(--mist);
}

.gts-firma.suche-seite .suche-leer p {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--ink);
}

.gts-firma.suche-seite .suche-leer p:last-child {
    margin-bottom: 0;
}

.suche-leer a {
    font-weight: 700;
    color: #3f7a12;
}

/* Blättern zwischen den Ergebnisseiten */
.suche-seiten {
    margin-top: 28px;
}

.suche-seiten .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.suche-seiten .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
}

.suche-seiten a.page-numbers:hover,
.suche-seiten a.page-numbers:focus {
    border-color: var(--sprout);
    color: #3f7a12;
}

.suche-seiten .page-numbers.current {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.suche-seiten .page-numbers.dots {
    border-color: transparent;
}

@media (max-width: 575px) {
    .suche-formular input {
        height: 52px;
        padding-left: 20px;
        font-size: 16px;
    }

    .suche-formular button {
        top: 4px;
        right: 4px;
    }

    .suche-treffer a {
        padding: 18px 20px;
    }
}
