/* search bar start */
#search_container {
    position: relative;
    width: 100%; 
    max-width: 300px;
    margin: auto;
    /* transition: 0.1s ease-out; */ /* smooth transition/animation. */
}

#search_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 32%);
    z-index: 999;
    display: none;
}

#search_container.search-active {
    max-width: 545px;
}

#search_container.search-active > #search_overlay {
    display: block;
}

#search_input_wrapper {
    display: flex;
    position: inherit;
    z-index: 1000;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 5px 15px;
    font-size: 16px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: white;
}

#search_input_wrapper.search-active {
    /* box-shadow: 0px 0px 0px 5000px #0000003b; */
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    border-bottom: 1px solid #f6f6f6;
    transition: box-shadow 0.1s;
    padding: 7px 17px;
    z-index: 1000;
}

#search_container.search-active > #search_results {
    display: flex !important; /* a jquery file adds display block causing a bug, we need to prevent that to fix the bug */
}

#search_input {
    width: 100%;
    padding: 3px;
    font-size: 16px;
    border: none;
    outline: none;
    /* border-radius: 5px; */
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
    /* transition: all 0.3s ease; */
}

#search_results {
    gap: 6px;
    display: none !important; /* a jquery file adds display block causing a bug, we need to prevent that to fix the bug */
    position: absolute;
    width: 100%;
    background: white;
    max-height: 300px;
    overflow-y: auto;
    top: 100%;
    border: 1px solid #ddd;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border-top: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px;
}

#search_results.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.search-result-item {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 8px 10px;
    text-decoration: none;
    /* transition: 0.3s ease-out; */
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #f4f4f4;
}

.search-result-item:hover {
    border-color: #2956b1a4;
    /* background-color: #e9ecef; Darker background on hover for visual feedback */
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

.search-result-title {
    font-size: 14px;
    font-weight: bold;
    color: #2c2c2c;
    font-family: Montserrat, Inter, sans-serif;
}

.search-result-preview {
    color: #595959;
    font-size: 14px;
    word-break: break-all;
}

.search-result-image {
    /* width: 35px; */
    /* height: auto; */
    display: block;
    margin-top: 5px; 
    border-radius: 4px; 
}

#search_results h4 {
    font-size: 14px;
    margin: 0;
}

#search_results p {
    font-size: 12px;
    margin: 0;
}

.search-result-breadcrumb {
    font-size: 12px;
    color: #a6a6a6;
}

.suggest-search-heading {
    font-size: 14px;
    font-weight: bold;
    margin-top: 6px;
    padding-left: 5px;
    font-family: Montserrat, Inter, sans-serif;
    color: #164472;
}

/* for mobile */
@media screen and (max-width: 767px) {
    #search_input_wrapper.search-active {
    box-shadow: none;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    border-bottom: 1px solid #f6f6f6;
    transition: box-shadow 0.1s;
    padding: 7px 17px;
    }

    #search_results {
    text-align: left;
    }
}
@media screen and (max-width: 991px) {
    #search_results {
        position: relative;
        box-shadow: none;
    }
    #search_container.search-active > #search_overlay {
        display: none;
    }
}
/* search bar end */
