.algolia-search-input {
    width: 100% !important;
}

#algolia-autocomplete-container .aa-dropdown-menu, .aa-Panel {
    padding-bottom: 0px;
    border: 0px;
}

#algoliaAutocomplete {
    padding-left: 0;
    margin-bottom: 0;
    margin-top: 0;
}

#algoliaAutocomplete .aa-SubmitButton {
    display: none;
}

.aa-Input {
    padding: 0;
    height: 40px;
    font-size: 14px;
    border: 0px !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.aa-Input:focus {
    outline: 0;
}

.aa-Input:hover {
    border: none;
}

.aa-LoadingIndicator {
    position: absolute;
    right: 76px;
    top: 10px;
    z-index: 10;
}

#algolia-autocomplete-container .aa-dropdown-menu .category, .aa-Panel .category, .aa-Panel .aa-PanelLayout section .aa-SourceHeader {
    padding: 0px;
}

.aa-Panel {
    position: fixed !important;
    margin-top: 4px;
    right: 0;
    width: 100%;
    z-index: 1000 !important;
    border: none;
    background: white;
    top: 96px !important;
    max-height: 80vh;
    overflow-y: scroll;
    padding-left: 16px;
    padding-bottom: 8px;
}

@media (min-width: 992px) {
    .aa-Panel {
        width: auto !important;
        min-width: 800px;
        top: 92px !important;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .aa-Panel {
        width: 100% !important;
        top: 108px !important;
        height: 100% !important;
        left: 0 !important;
    }
}

.aa-Panel .aa-PanelLayout {
    width: 100%;
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-direction: column;
}

.aa-Panel.productColumn1 .aa-PanelLayout section:nth-child(1),
.aa-Panel.productColumn1 .aa-PanelLayout section:nth-child(2),
.aa-Panel.productColumn1 .aa-PanelLayout section:nth-child(3) {
    margin-left: 0px !important;
    border-left: 0px;
    padding-right: 16px;
}

.aa-Panel.productColumn1 .aa-PanelLayout section:nth-child(3) {
    grid-area: 1;
}

.aa-Panel.productColumn1 .aa-PanelLayout section:nth-child(3) {
    width: 100% !important;
    margin-top: 0px;
    padding-top: 0px;
}

.aa-Panel ul {
    display: flex;
    flex-direction: column;
}
.aa-Panel ul li {
    width: 100% !important;
    margin: 0 !important;
}

.aa-Panel section > ul li a {
    display: flex !important;
    font-size: 1.4rem;
    color: var(--gy-lighten-100) !important;
    font-weight: 600;
}

.aa-Panel section > ul li a:hover {
    border-radius: 8px !important;
    overflow: unset !important;
}

.aa-Panel li.aa-Item {
    margin-bottom: 0.8rem;
}

#algolia-autocomplete-container .aa-dropdown-menu .algoliasearch-autocomplete-hit, .aa-Panel .algoliasearch-autocomplete-hit {
    width: 100%;
}

.aa-Panel.productColumn1 section:nth-child(2) .aa-List {
    display: flex;
    flex-direction: column;
}

.aa-Panel section .aa-List li {
    border-radius: 8px;
    width: 100%;
    margin: 0;
}

.aa-Panel.productColumn1 section:nth-child(2) .aa-List li:hover {
    background-color: unset !important;
}

.aa-Panel mark {
    font-weight: 400;
}

#autocomplete-products-footer {
    background-color: unset;
    position: unset;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    width: max-content;
}

.products-footer {
    padding-top: 16px;
    padding-bottom: 8px;
    padding-left: 10px;
}

.aa-Panel .aa-PanelLayout section:nth-child(2) > .aa-SourceHeader {
    border-top: 0 !important;
}

.aa-Panel .aa-PanelLayout section > .aa-SourceHeader {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: var(--gy-lighten-100);
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 2.4rem;
    text-transform: unset;
    margin-left: 0.8rem;
    margin-bottom: 1.6rem;
}

.aa-Panel .aa-PanelLayout section .aa-SourceHeader {
    padding-top: 2.4rem;
    border-top: 0.1rem solid var(--gy-lighten-10);
    margin-right: 0.8rem;
}

#algolia-autocomplete-container .aa-dropdown-menu .category, .aa-Panel .category, .aa-Panel .aa-PanelLayout section .aa-SourceHeader aa-SourceNoResults {
    padding-left: 0px;
}

/*  No results for all sections */
.aa-Panel .aa-PanelLayout section .aa-SourceNoResults {
    padding: 8px;
    padding-top: 0px;

    & p {
        margin: 0;
        font-style: italic;
    }
}

/* Autocomplete menu sections */
.aa-PanelLayout section {
    min-width: 100% !important;
    padding-top: 0 !important;
}

/* Product sections */
[data-autocomplete-source-id="products"] {
    order: 1;
    padding-bottom: 16px;
}

/* Category sections */
[data-autocomplete-source-id="categories"] {
    order: 2;
    padding-bottom: 16px !important;

    & ul li a {
        padding: 10px 8px !important;
    }
}

/* FAQ & Knowledge base sections */
[data-autocomplete-source-id="faq-knowledge-base"] {
    order: 3;
    padding-bottom: 8px !important;
}

/* Recent searches section */
[data-autocomplete-source-id="recentSearchesPlugin"] {
    padding-bottom: 8px !important;
    padding-right: 16px !important;
}

.header-search:focus-within {
    background-color: white !important;
}
