/*
 * Go Languedoc header Smart Search
 * Reuses the existing Joomla Smart Search module.
 */

.gol-header-search-toggle {
    display: inline-flex;
    width: auto;
    height: 44px;
    margin-left: 10px;
    padding: 0 15px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    border: 1px solid #2196f3;
    border-radius: 999px;
    background: #fff;
    color: #168eea;
    cursor: pointer;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.gol-header-search-toggle:hover,
.gol-header-search-toggle:focus-visible,
.gol-header-search-toggle[aria-expanded="true"] {
    border-color: #168eea;
    background: #2196f3;
    color: #fff;
    outline: none;
}

.gol-header-search-toggle svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.gol-header-search-label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
}

.gol-header-search-panel {
    position: fixed;
    z-index: 10550;
    display: block;
    width: 420px;
    padding: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        visibility 160ms ease;
}

body.gol-header-search-open
    .gol-header-search-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.gol-header-search-shell {
    width: 100%;
}

/*
 * The original module is hidden below xl by its Joomla module class.
 * Once JS moves it into this shell, force it visible.
 */
.gol-header-search-shell
    .gol-search-information {
    display: block !important;
    width: 100%;
    margin: 0;
}

.gol-header-search-shell .border-layout {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.gol-header-search-shell .module-title,
.gol-header-search-shell .finder {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.gol-header-search-shell .mod-finder {
    width: 100%;
    margin: 0;
}

.gol-header-search-shell
    .mod-finder__search.input-group {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 999px;
    background: #fff;
    box-shadow:
        0 8px 24px rgba(39, 55, 68, 0.18),
        0 2px 6px rgba(39, 55, 68, 0.08);
}

.gol-header-search-shell
    .mod-finder__search
    .form-control {
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 22px 0 58px;
    border: 1px solid rgba(93, 106, 112, 0.16);
    border-radius: 999px !important;
    background: #fff;
    color: #273642;
    font-size: 1rem;
    box-shadow: none !important;
}

.gol-header-search-shell
    .mod-finder__search
    .form-control:focus {
    border-color: #2196f3;
    outline: 0;
    box-shadow:
        0 0 0 3px rgba(33, 150, 243, 0.16) !important;
}

.gol-header-search-shell
    .mod-finder__search
    .btn {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    display: flex;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 999px 0 0 999px !important;
    background: transparent !important;
    color: #5c6468 !important;
    font-size: 0;
    box-shadow: none !important;
}

.gol-header-search-shell
    .mod-finder__search
    .btn:hover,
.gol-header-search-shell
    .mod-finder__search
    .btn:focus-visible {
    color: #168eea !important;
    outline: none;
}

.gol-header-search-shell
    .mod-finder__search
    .btn
    .icon-search {
    font-size: 24px;
}

.gol-header-search-shell
    .awesomplete {
    display: block;
    width: 100%;
}

.gol-header-search-shell
    .awesomplete
    > ul {
    margin-top: 8px;
    border: 1px solid #d9dfd5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(39, 55, 68, 0.18);
}

/* Tablet */
@media (max-width: 1199.98px) {
    #astroid-header
        .header-offcanvas-trigger,
    #astroid-sticky-header
        .header-offcanvas-trigger {
        display: block !important;
    }

    .gol-header-search-toggle {
        height: 40px;
        margin-right: 4px;
        margin-left: 4px;
        padding-right: 12px;
        padding-left: 12px;
        gap: 7px;
    }

    .gol-header-search-toggle svg {
        width: 23px;
        height: 23px;
    }

    .gol-header-search-label {
        font-size: 0.9rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .gol-header-search-toggle {
        width: 40px;
        padding-right: 0;
        padding-left: 0;
    }

    /*
     * Mobile gets the magnifying glass only.
     */
    .gol-header-search-label {
        display: none;
    }

    .gol-header-search-panel {
        width: auto;
    }

    .gol-header-search-shell
        .mod-finder__search
        .form-control,
    .gol-header-search-shell
        .mod-finder__search
        .btn {
        height: 52px;
    }

    .gol-header-search-shell
        .mod-finder__search
        .btn {
        width: 52px;
    }

    .gol-header-search-shell
        .mod-finder__search
        .form-control {
        padding-right: 18px;
        padding-left: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gol-header-search-toggle,
    .gol-header-search-panel {
        transition: none;
    }
}