.header-live-search{
    width:100%;
    min-width:280px;
}

/* =========================
   Live Search Dropdown
   ========================= */

.live-search-dropdown{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    left:0;

    background:#fff;
    color:#212529;

    border:1px solid rgba(0,0,0,.08);
    border-radius:14px;

    box-shadow:0 18px 40px rgba(0,0,0,.10);

    z-index:99999;

    max-height:440px;

    overflow-x:hidden;
    overflow-y:auto;

    box-sizing:border-box;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
}

/*
 * وقتی JS باکس را مستقیم داخل body می‌برد
 * هر دو سرچ هدر و هوم از همین حالت استفاده می‌کنند.
 */
body > .live-search-dropdown{
    position:absolute !important;
    right:auto !important;
    top:0;
    left:0;

    max-width:calc(100vw - 24px);
}


/* =========================
   Groups
   ========================= */

.live-search-group{
    padding:8px 0;
    border-bottom:1px solid rgba(0,0,0,.06);
}

.live-search-group:last-of-type{
    border-bottom:0;
}

.live-search-group-title{
    padding:6px 14px 8px;

    font-size:12px;
    font-weight:800;

    color:#6c757d;
}


/* =========================
   Items
   ========================= */

.live-search-item{
    display:flex;
    align-items:center;

    gap:10px;

    padding:10px 14px;

    text-decoration:none;

    color:#212529;

    transition:
            background-color .15s ease,
            color .15s ease;
}

.live-search-item:hover{
    background:rgba(13,110,253,.06);
    color:#0d6efd;
}

.live-search-thumb{
    width:46px;
    height:46px;

    border-radius:10px;

    object-fit:cover;

    background:#f8f9fa;

    flex:0 0 46px;

    overflow:hidden;
}

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

.live-search-item-title{
    font-size:13px;
    font-weight:700;
    line-height:1.6;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.live-search-item-type{
    margin-top:2px;

    font-size:11px;

    color:#6c757d;
}


/* =========================
   Footer
   ========================= */

.live-search-footer{
    padding:12px 14px;

    background:#f8f9fa;

    border-top:1px solid rgba(0,0,0,.06);
}

.live-search-footer a{
    text-decoration:none;

    font-size:13px;
    font-weight:700;
}


/* =========================
   Loading / Empty
   ========================= */

.live-search-empty,
.live-search-loading{
    padding:14px;

    font-size:13px;

    color:#6c757d;
}


/* =========================
   Dark Mode
   ========================= */

[data-bs-theme="dark"] .live-search-dropdown{
    background:#1f232a;
    color:#fff;

    border-color:rgba(255,255,255,.08);

    box-shadow:0 18px 40px rgba(0,0,0,.35);
}

[data-bs-theme="dark"] .live-search-group{
    border-bottom-color:rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .live-search-group-title,
[data-bs-theme="dark"] .live-search-item-type,
[data-bs-theme="dark"] .live-search-empty,
[data-bs-theme="dark"] .live-search-loading{
    color:rgba(255,255,255,.72);
}

[data-bs-theme="dark"] .live-search-item{
    color:#fff;
}

[data-bs-theme="dark"] .live-search-item:hover{
    background:rgba(255,255,255,.06);
    color:#fff;
}

[data-bs-theme="dark"] .live-search-thumb{
    background:rgba(255,255,255,.06);
}

[data-bs-theme="dark"] .live-search-footer{
    background:rgba(255,255,255,.04);

    border-top-color:rgba(255,255,255,.08);
}


/* =========================
   Mobile
   ========================= */

@media (max-width:575.98px){

    .header-live-search{
        min-width:0;
    }

    body > .live-search-dropdown{
        max-width:calc(100vw - 24px);
    }

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

    .live-search-group-title{
        padding-right:12px;
        padding-left:12px;
    }

    .live-search-footer{
        padding-right:12px;
        padding-left:12px;
    }
}

/* جلوگیری از Auto Zoom آیفون هنگام فوکوس روی سرچ */
@media (max-width: 767.98px){

    #headerLiveSearchInput,
    #headerLiveSearchInput2{
        font-size:16px !important;
    }

}