/*
 * LTRiF header Smart Search
 * Reuses Joomla module 537 (.ltrif-search-information).
 */

.ltrif-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 #69ae36;
    border-radius: 999px;
    background: #fff;
    color: #4d9426;
    cursor: pointer;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.ltrif-header-search-toggle:hover,
.ltrif-header-search-toggle:focus-visible,
.ltrif-header-search-toggle[aria-expanded="true"] {
    border-color: #4d9426;
    background: #69ae36;
    color: #fff;
    outline: none;
}

.ltrif-header-search-toggle svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.ltrif-header-search-label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
}

.ltrif-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.ltrif-header-search-open
    .ltrif-header-search-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ltrif-header-search-shell {
    width: 100%;
}

/*
 * Override the JomHoliday responsive rule that hides the old right-column
 * Search for Information module after it has been moved into this panel.
 */
body.ltrif-drawer-ready
    .ltrif-header-search-shell
    .ltrif-search-information,
.ltrif-header-search-shell
    .ltrif-search-information {
    display: block !important;
    width: 100%;
    margin: 0;
}

.ltrif-header-search-shell .border-layout {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ltrif-header-search-shell .module-title,
.ltrif-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;
}

.ltrif-header-search-shell .mod-finder {
    width: 100%;
    margin: 0;
}

.ltrif-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);
}

.ltrif-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;
}

.ltrif-header-search-shell
    .mod-finder__search
    .form-control:focus {
    border-color: #69ae36;
    outline: 0;
    box-shadow:
        0 0 0 3px rgba(105, 174, 54, 0.16) !important;
}

.ltrif-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;
}

.ltrif-header-search-shell
    .mod-finder__search
    .btn:hover,
.ltrif-header-search-shell
    .mod-finder__search
    .btn:focus-visible {
    color: #4d9426 !important;
    outline: none;
}

.ltrif-header-search-shell
    .mod-finder__search
    .btn
    .icon-search {
    font-size: 24px;
}

.ltrif-header-search-shell
    .awesomplete {
    display: block;
    width: 100%;
}

.ltrif-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);
}

@media (max-width: 1199.98px) {
    /*
     * Astroid hides the desktop menu below 1200px but its Bootstrap
     * d-lg-none class otherwise hides the hamburger from 992px upward.
     * Keep the hamburger available throughout the tablet range.
     */
    #astroid-header
        .header-offcanvas-trigger,
    #astroid-sticky-header
        .header-offcanvas-trigger {
        display: block !important;
    }

    /*
     * The right-1 sidebar is a wide-desktop feature. Below 1200px its
     * modules are moved into the header search or JomHoliday drawers, so
     * hide the empty/sidebar column and give the page the full width.
     */
    #ac-5hhc89qmq {
        display: none !important;
    }

    #ac-1528971561366 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .ltrif-header-search-toggle {
        height: 40px;
        margin-right: 4px;
        margin-left: 4px;
        padding-right: 12px;
        padding-left: 12px;
        gap: 7px;
    }

    .ltrif-header-search-toggle svg {
        width: 23px;
        height: 23px;
    }

    .ltrif-header-search-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .ltrif-header-search-panel {
        width: auto;
    }

    .ltrif-header-search-shell
        .mod-finder__search
        .form-control,
    .ltrif-header-search-shell
        .mod-finder__search
        .btn {
        height: 52px;
    }

    .ltrif-header-search-shell
        .mod-finder__search
        .btn {
        width: 52px;
    }

    .ltrif-header-search-shell
        .mod-finder__search
        .form-control {
        padding-right: 18px;
        padding-left: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ltrif-header-search-toggle,
    .ltrif-header-search-panel {
        transition: none;
    }
}
