/* Live Search Container Styles */
.live-search-container {
    position: relative;
    width: 100%;
    font-family: var(--theme-font-family);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.live-search-container .top {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
    column-gap: 24px;
}

.live-search-container .bottom {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.live-search-container .left {
    position: relative;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-grow: 1;
    /* width: 100%; */
}
@media screen and (max-width: 1024px) {
    .live-search-container .left {
        display: none;
    }
}

.live-search-container .right {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
/* Categories Dropdown */
.categories-dropdown {
    display: flex;
    /* height: 48px; */
    padding: 0px;
    justify-content: center;
    align-items: center;
    text-align: left;
    gap: 8px;
    border-radius: 999px;
    /* width: min-content; */
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--e-global-color-text);
    border: none;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    /* max-width: 130px; */
    font-size: 16px !important;
    /* min-width: 0; */
    white-space: nowrap;
    background: #45378400;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Wrapper for select to add arrow */
.categories-dropdown {
    background: #45378400 url(/wp-content/uploads/2025/05/down_arrow.svg) no-repeat;
    background-position: calc(100% - 8px) center;
    background-size: 9px;
    padding-right: 25px; /* Space for arrow */
}

.categories-dropdown:focus-visible {
    outline: none !important;
}
/* @media screen and (max-width: 1024px) {
    .categories-dropdown {
        display: none;
    }
    input.live-search {
        border-radius: 999px !important;
    }
} */

/* Search Input */
input.live-search {
    padding: 12px 20px 12px 20px !important; 
    border-radius: 999px !important;
    border: 0 !important;
    background: #F3F3F3 !important;
    position: relative !important;
    z-index: 999 !important;
    font-size: 16px !important;
    height: 48px !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    transition: border-radius 0s ease !important;
}

.live-search:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Search Icon Before Input */
.search-icon-before {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: none !important; /* Allow clicks to pass through to input */
}

.search-icon-before img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Search Icons Container */
.clear-search-icon-container {
    position: absolute;
    right: 24px;
    top: 25%;
    z-index: 999;
    display: flex;
    gap: 12px;
    align-items: center;
}

.divider-icon {
    width: 2px;
    height: 23px;
    background-color: var(--theme-color-text-accen, #D9D9D9);
}

/* Button Styles */
button.search-icon-after,
button.clear-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

button.clear-icon {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
button.clear-icon:hover, 
button.clear-icon:focus{
    background: none;
}
button.clear-icon svg{
    width: 100%;
    height: 100%;
}
button.clear-icon svg path{
    fill: var(--e-global-color-secondary) !important;
    stroke: var(--e-global-color-secondary) !important;
}
.search-icon-after {
    display: inline-flex !important; /* Always visible */
}

.clear-icon {
    display: none; /* Hidden by default */
}

.search-icon-after:hover,
.clear-icon:hover,
.search-icon-after:focus,
.clear-icon:focus {
    background: none;
}

/* Search Results Container */
.search-results {
    position: absolute;
    top: 100%;
    background: #fff;
    border: 0;
    z-index: 9998;
    display: flex;
    justify-content: center;
    overflow: hidden;
    display: none;
    width: 100%;
    box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.08);
    border-radius: 0px 0px 16px 16px;
}

/* Search Results List */
.live-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.live-search-list li {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    margin: 0;
    transition: background-color 0.2s ease;
}

.live-search-list li:hover {
    background: #F3F3F3;
    color: var(--e-global-color-secondary) !important;
}
.live-search-list li:hover .search-name{
    color: var(--e-global-color-secondary) !important;
}
.live-search-list li:first-child {
    padding-top: 20px;
}

.live-search-list li img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

/* Related Results Styling */
/* .live-search-list li.related-result img {
    width: 24px;
    height: 24px;
} */

.related-result .search-type {
    font-size: 12px;
    color: #777;
    margin-left: 6px;
}

/* Search Content Styling */
.search-cat-and-name {
    display: flex;
    flex-direction: column;
}

span.search-name {
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
}

span.search-category {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    color: #777;
}

.search-results a {
    color: #000;
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
}

/* Divider in Search Results */
.search-divider hr {
    border: none;
    border-top: 1px solid #F3F3F3;
    margin: 8px 0;
    width: 100%;
}

li.search-divider {
    padding: 0 20px;
}

.live-search-list li.search-divider:hover {
    background: none;
}

.live-search-list:hover li{
    color: var(--e-global-color-secondary) !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .categories-dropdown {
        padding: 0 16px;
    }
}