/* Nav search icon + site-wide overlay — Gorove Slade */

/* ---------------- Header magnifier icon ----------------
 *
 * Icon link is sized by an invisible &nbsp; spacer (pure text line metrics).
 * The SVG is absolutely positioned over the spacer so it doesn't contribute to
 * the link's line box. Result: the link measures identically to a text-only
 * menu link, Divi's #top-menu height stays constant, and the hardcoded
 * -104px hero offset in style.css still aligns under et_transparent_nav.
 * Do NOT change the link's display, line-height, or float.
 */

.gs-nav-search-link {
    position: relative;
    padding-bottom: 0 !important;
}

.gs-nav-search-link__spacer {
    display: inline-block;
    width: 18px;
}

.gs-nav-search-link .gs-nav-search-icon__svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ---------------- Search overlay modal ---------------- */

.gs-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 18vh 1rem 2rem;
    background: rgba(3, 7, 7, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.gs-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.gs-search-overlay__panel {
    position: relative;
    width: min(720px, 100%);
    background: #fff;
    border-radius: 6px;
    padding: 2.25rem 2rem 2rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: translateY(-12px);
    transition: transform 0.22s ease;
    font-family: "Gilroy", sans-serif;
    color: #030707;
}

.gs-search-overlay.is-open .gs-search-overlay__panel {
    transform: translateY(0);
}

.gs-search-overlay__label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0d6937;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.gs-search-overlay__row {
    display: flex;
    gap: 0.5rem;
}

.gs-search-overlay__input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
    line-height: 1.3;
    color: #030707;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gs-search-overlay__input:focus {
    outline: none;
    border-color: #0d6937;
    box-shadow: 0 0 0 3px rgba(13, 105, 55, 0.15);
}

.gs-search-overlay__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    background: #0d6937;
    border: 1px solid #0d6937;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.gs-search-overlay__submit:hover {
    background: #3adb7e;
    border-color: #3adb7e;
    color: #030707;
}

.gs-search-overlay__hint {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: #777;
}

.gs-search-overlay__close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: transparent;
    border: 0;
    padding: 0.25rem;
    cursor: pointer;
    color: #fff;
    line-height: 0;
}

.gs-search-overlay__close svg {
    width: 28px;
    height: 28px;
}

.gs-search-overlay__close:hover {
    color: #3adb7e;
}

body.gs-search-overlay-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .gs-search-overlay {
        padding-top: 10vh;
    }

    .gs-search-overlay__panel {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .gs-search-overlay__row {
        flex-direction: column;
    }

    .gs-search-overlay__submit {
        padding: 0.9rem 1rem;
    }
}
