﻿/* =========================
   Header Account (Login Partial) - Scoped
   ========================= */

/* ستون لاگین در هدر: بچسبد به چپ ستون و از سرچ فاصله بگیرد */
.topbar-left{
    display:flex;
    align-items:center;
    justify-content:flex-start;   /* مهم: نچسبد به سرچ */
    text-align:left;             /* مهم: موقعیت در ستون */
}

/* ناحیه اکانت */
#header-account.header-account{
    position:relative;
    z-index:13000;               /* بالاتر از هدر کارت */
}

/* nav داخل partial */
#header-account .nav{
    margin:0;
    padding:0;
    list-style:none;
    display:flex;
    align-items:center;
}

/* آیتم dropdown */
#header-account .nav-item.dropdown{
    position:relative;
}

/* دکمه حساب کاربری */
#header-account .nav-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:6px 10px;
    border-radius:12px;
    white-space:nowrap;
}

/* متن خوش آمدید */
#header-account .label-dropdown{
    font-weight:700;
    font-size:13px;
}

/* خود منوی بازشونده */
#header-account .dropdown-menu{
    min-width:230px;
    max-width:calc(100vw - 24px);
    margin-top:10px;
    border-radius:12px;
    border:1px solid rgba(0,0,0,.08);
    box-shadow:0 12px 30px rgba(0,0,0,.14);
    padding:6px 0;
    z-index:13010;

    direction:rtl;
    text-align:right;
}

/* اگر خواستی منو دقیقاً از سمت چپِ دکمه باز شود */
#header-account .dropdown-menu.dropdown-menu-left{
    left:0;
    right:auto;
}

/* آیتم‌های داخل dropdown */
#header-account .dropdown-item{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    font-weight:700;
    color:#222;
}

/* آیکن‌ها */
#header-account .dropdown-item i{
    font-size:18px;
    opacity:.85;
}

/* ردیف کیف پول: چپ/راست */
#header-account .wallet-row{
    justify-content:space-between;
}
#header-account .wallet-left{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

/* دکمه خروج داخل فرم */
#header-account .logout-form{
    margin:0;
}
#header-account .logout-btn{
    width:100%;
    background:transparent;
    border:0;
    cursor:pointer;
    text-align:right;
}

/* Badge */
#header-account .badge-success{
    background-color:#28a745;
    color:#fff;
    font-size:.75rem;
    padding:3px 7px;
    border-radius:12px;
}

/* تضمین اینکه dropdown زیر bottom-header/سبد خرید نرود */
.main-header .topbar,
.main-header .topbar.dt-sl{
    position:relative;
    z-index:12990;
}
.main-header .bottom-header{
    position:relative;
    z-index:12000;
}
/* FIX: در RTL، flex-start سمت راست است؛ برای چسبیدن به چپ، کانتینر را LTR می‌کنیم */
.main-header .topbar-left {
    direction: ltr !important;
    justify-content: flex-start !important;
}

/* خود دکمه متن فارسی باشد */
#header-account .nav-link {
    direction: rtl;
}

/* خود dropdown همان RTL بماند */
#header-account .dropdown-menu {
    direction: rtl;
    text-align: right;
}
