/* search overlay */

.search-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* transition: all .3s ease; */
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 9999;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.search-container {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform .3s ease;

}

.search-overlay.active .search-container {
    transform: scale(1);
}


/* search header */
.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.search-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

/* close button */
.search-close {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    /* transition: all .3s ease; */
    transition:
        background-color .3s ease,
        color .3s ease,
        transform .3s ease;
}

.search-close:hover {
    background: #eb688e;
    color: #fff;
    transform: rotate(90deg);
}

/* search input */
.search-input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.search-input-wrapper input {
    width: 100%;
    height: 64px;
    padding: 0 24px 0 65px;
    box-sizing: border-box;
    border: 2px solid #ececec;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 500;
    outline: none;
    /* transition: all .25s ease; */
    transition: border-color .25s ease, box-shadow .25s ease;
}

.search-input-wrapper input:focus {
    border-color: #eb688e;
    box-shadow: 0 0 0 5px rgba(235, 104, 142, .12);
}

.search-input-wrapper input::placeholder {
    color: #999;
    font-size: 16px;
}


/* search icon */
.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
}

.search-icon img {
    width: 22px;
    height: 22px;
    opacity: .65;
}


/* search loading  */

.search-loading {
    padding: 30px 20px;
    text-align: center;
    color: #777;
    font-size: 16px;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

.search-loading:not(.d-none)::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

.d-none {
    display: none !important;
}

/* empty state */

.search-empty-state {
    padding: 30px 20px;
    text-align: center;
    color: #888;
    font-size: 16px;
    border: 2px dashed #e5e5e5;
    border-radius: 16px;
}

/* search results */
#search-results {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 5px;
}

/* custom scrollbar */
#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: #f3f3f3;
    border-radius: 20px;
}

#search-results::-webkit-scrollbar-thumb {
    background: #cfcfcf;
    border-radius: 20px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* search section */
.search-section {
    margin-bottom: 35px;
}

.search-section:last-child {
    margin-bottom: 0;
}

.search-section-title {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ececec;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color .25s ease,
        transform .25s ease;
}

.search-item:hover {
    background: #f8f8f8;
    transform: translateX(4px);
}

.search-item-image {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-item-content {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-bottom: 5px;
    word-break: break-word;
}

.search-item-subtitle {
    font-size: 14px;
    color: #777;
    line-height: 1.4;
}

/* for search box body css start */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* for search box body css end */


/* search tabs css start */
.search-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-tab {
    padding: 10px 22px;
    border: 2px solid #eb688e;
    border-radius: 30px;
    background: #fff;
    color: #eb688e;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
}

.search-tab:hover {
    background: #eb688e;
    color: #fff;
}

.search-tab.active {
    background: #eb688e;
    color: #fff;
}

.search-tab:focus {
    outline: none;
}

@media (max-width:768px) {

    .search-tabs {

        justify-content: center;

    }

    .search-tab {

        flex: 1;
        min-width: 100px;

    }

}


/* mobile responsiveness improvements */
@media (max-width: 576px) {
    .search-container {
        padding: 20px;
        width: 95%;
        max-height: 90vh;
    }

    .search-title {
        font-size: 24px;
    }

    .search-input-wrapper input {
        height: 54px;
        font-size: 16px;
        padding: 0 16px 0 55px;
    }

    .search-item {
        padding: 10px 12px;
    }

    .search-item-image {
        width: 50px;
        height: 50px;
    }
}

/* smooth scrollbar for Firefox */
#search-results {
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf #f3f3f3;
}

/* search tabs css end */
