/* =========================================================================
   Suche - MAXIMUM Golfreisen
   Vorschlagsliste unter dem Eingabefeld, identisch auf Desktop und Handy.
   ========================================================================= */

.mgs-wrap { position: relative; }

.mgs-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1090;
    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid #e6e2ee;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
.mgs-results[hidden] { display: none; }

.mgs-group {
    padding: .5rem .85rem .25rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a8594;
    background: #faf9fc;
    position: sticky;
    top: 0;
}

.mgs-hit {
    display: block;
    padding: .6rem .85rem;
    min-height: 48px;                 /* bequem tippbar */
    border-top: 1px solid #f0edf5;
    text-decoration: none;
    color: #0E131E;
}
.mgs-hit:first-of-type { border-top: 0; }
.mgs-hit:hover,
.mgs-hit.is-active { background: #f4f1fa; }

.mgs-hit-title { display: block; font-size: .98rem; line-height: 1.3; }
.mgs-hit-title mark {
    background: transparent;
    color: #6F4E9A;
    font-weight: 700;
    padding: 0;
}
.mgs-hit-ctx { display: block; font-size: .78rem; color: #6b6675; margin-top: .1rem; }

.mgs-empty { padding: 1rem .85rem; }
.mgs-empty p { margin: 0 0 .6rem; color: #4a4a55; font-size: .92rem; }
.mgs-call {
    display: inline-block;
    color: #6F4E9A;
    text-decoration: none;
    font-size: .92rem;
}

/* ---------------------------------------------- Suchfeld im mobilen Drawer */

.mainnav__search { display: none; }

@media (max-width: 991.98px) {
    .mainnav__search {
        display: block;
        flex: 0 0 auto;
        padding: .6rem .75rem;
        border-bottom: 1px solid #e6e2ee;
        background: #fff;
    }
    .mainnav__search .mgs-field {
        position: relative;
        display: flex;
        align-items: center;
    }
    /* Den zur Laufzeit von search-main.js eingefügten Container mitwachsen
       lassen - sonst schrumpft er als Flex-Element auf Inhaltsbreite und das
       Eingabefeld füllt die Leiste nicht aus. */
    .mainnav__search .mgs-wrap {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }
    /* z-index, weil der positionierte Wrapper im DOM nach dem Icon steht
       und es sonst verdeckt. */
    .mainnav__search .mgs-field > svg {
        position: absolute;
        left: .6rem;
        z-index: 2;
        color: #8a8594;
        pointer-events: none;
    }
    .mainnav__search input {
        width: 100%;
        min-height: 46px;
        padding: .5rem .75rem .5rem 2.3rem;
        font-size: 16px;              /* verhindert das Zoomen auf iOS */
        color: #0E131E;
        background: #f6f4fa;
        border: 1px solid #e6e2ee;
        border-radius: 10px;
        -webkit-appearance: none;
    }
    .mainnav__search input:focus {
        outline: 3px solid #6F4E9A;
        outline-offset: 1px;
        background: #fff;
    }

    /* Im Drawer soll die Liste mitscrollen statt zu überlagern */
    .mainnav__search .mgs-results {
        position: static;
        max-height: none;
        border: 0;
        box-shadow: none;
        border-top: 1px solid #e6e2ee;
        border-radius: 0;
        margin-top: .6rem;
    }
}
