/* ═══════════════════════════════════════════════════════════════════
   Mabsut Bottom Navigation — منوی اپلیکیشنی موبایل
   نسخه بازنویسی‌شده با گرادیان + انیمیشن + safe-area
   ═══════════════════════════════════════════════════════════════════ */

/* ─── کانتینر اصلی ─── */
.mbs-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--mbs-border, #e5e7eb);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .06);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-sizing: content-box;
}

@media (max-width: 1023px) {
    .mbs-bottom-nav {
        display: block;
    }
    body.mbs-body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0));
    }
}

.mbs-bottom-nav__inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 64px;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 4px;
}

/* ─── آیتم‌ها ─── */
.mbs-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--mbs-text-muted, #94a3b8);
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none;
    transition: color .25s cubic-bezier(.2, .8, .2, 1);
    position: relative;
    padding: 6px 2px 4px;
    border-radius: 12px;
    min-width: 0;
}

.mbs-bnav-item:hover,
.mbs-bnav-item:active {
    color: var(--mbs-brand, #1a5fb4);
}

/* ─── نوار گرادیانی فعال (بالای آیتم) ─── */
.mbs-bnav-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 25%;
    left: 25%;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #6c5ce7);
    border-radius: 0 0 3px 3px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.mbs-bnav-item.is-active::before {
    transform: scaleX(1);
}

.mbs-bnav-item.is-active {
    color: var(--mbs-brand, #1a5fb4);
}

/* ─── آیکن ─── */
.mbs-bnav-item__icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    position: relative;
    flex-shrink: 0;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.mbs-bnav-item__icon svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: block;
    color: currentColor;
}

.mbs-bnav-item.is-active .mbs-bnav-item__icon {
    transform: translateY(-2px) scale(1.05);
}

/* ─── متن ─── */
.mbs-bnav-item__label {
    font-size: 10.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: all .2s;
}

.mbs-bnav-item.is-active .mbs-bnav-item__label {
    font-weight: 800;
}

/* [حذف‌شده — v2] */
.mbs-bnav-item--center {
    position: relative;
    flex: 0 0 auto;
    width: 68px;
    padding: 0;
    margin: 0 4px;
    justify-content: flex-start;
    padding-top: 4px;
}

.mbs-bnav-item--center .mbs-bnav-item__icon--center {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1e40af, #6c5ce7);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 14px -2px rgba(30, 64, 175, .45),
                0 0 0 4px rgba(255, 255, 255, 1);
    transform: translateY(-16px);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1),
                box-shadow .3s cubic-bezier(.2, .8, .2, 1);
    margin-bottom: -18px;
}

.mbs-bnav-item--center .mbs-bnav-item__icon--center svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    filter: brightness(0) invert(1);
}

.mbs-bnav-item--center:hover .mbs-bnav-item__icon--center,
.mbs-bnav-item--center.is-active .mbs-bnav-item__icon--center {
    transform: translateY(-18px) scale(1.06);
    box-shadow: 0 8px 20px -4px rgba(30, 64, 175, .55),
                0 0 0 4px rgba(255, 255, 255, 1);
}

.mbs-bnav-item--center .mbs-bnav-item__label {
    margin-top: 2px;
    color: var(--mbs-brand, #1a5fb4);
    font-weight: 800;
}

/* حذف indicator برای دکمه مرکزی */
.mbs-bnav-item--center::before {
    display: none;
}

/* [حذف‌شده — v2] */
.mbs-bnav-item--soon {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.4);
}

.mbs-bnav-item--soon:hover,
.mbs-bnav-item--soon:active {
    color: var(--mbs-text-muted, #94a3b8);
}

.mbs-bnav-item--soon .mbs-bnav-item__icon {
    position: relative;
}

.mbs-bnav-item__soon-badge {
    position: absolute;
    top: -4px;
    left: -12px;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 4px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 2px 6px -1px rgba(245, 158, 11, .5);
    animation: mbs-bnav-soon-pulse 2s ease-in-out infinite;
}

@keyframes mbs-bnav-soon-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════
   دکمه مرکزی که با لیو state تعامل نمی‌کنه
   ═══════════════════════════════════════════════════════ */
.mbs-bottom-nav .mbs-bnav-item,
.mbs-bottom-nav .mbs-bnav-item .mbs-bnav-item__label,
.mbs-bottom-nav .mbs-bnav-item .mbs-bnav-item__icon,
.mbs-bottom-nav .mbs-bnav-item .mbs-bnav-item__icon svg {
    transition: all .25s cubic-bezier(.2, .8, .2, 1);
}

/* ─── وقتی home فعال نیست ─── */
.mbs-bottom-nav .mbs-bnav-item--center:not(.is-active) .mbs-bnav-item__icon--center {
    background: linear-gradient(135deg, #1e40af, #6c5ce7);
    opacity: .85;
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */
@media (max-width: 380px) {
    .mbs-bnav-item__label {
        font-size: 9.5px;
    }
    .mbs-bnav-item--center {
        width: 60px;
    }
    .mbs-bnav-item--center .mbs-bnav-item__icon--center {
        width: 46px;
        height: 46px;
    }
}

@media (min-width: 1024px) {
    .mbs-bottom-nav {
        display: none !important;
    }
    body.mbs-body {
        padding-bottom: 0 !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   دکمه مرکزی خانه — برجسته و خاص
   ═══════════════════════════════════════════════════════════════ */

.mbs-bnav-item--center {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    padding: 0;
    margin: 0 6px;
    justify-content: flex-start;
    padding-top: 0;
}

/* ═══ هاله درخشان زیر دکمه خانه ═══ */
.mbs-bnav-item--center::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 62px;
    background: radial-gradient(circle,
        rgba(108, 92, 231, .35) 0%,
        rgba(108, 92, 231, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: mbs-bnav-home-glow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes mbs-bnav-home-glow {
    0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;  transform: translateX(-50%) scale(1.15); }
}

/* ═══ خود دکمه خانه ═══ */
.mbs-bnav-item--center .mbs-bnav-item__icon--center {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #1e40af 0%, #6c5ce7 50%, #c026d3 100%);
    color: #fff;
    border-radius: 50%;
    box-shadow:
        0 8px 20px -4px rgba(108, 92, 231, .55),
        0 4px 10px -2px rgba(30, 64, 175, .4),
        0 0 0 5px rgba(255, 255, 255, 1),
        0 0 0 6px rgba(108, 92, 231, .25);
    transform: translateY(-22px);
    transition: all .35s cubic-bezier(.2, .8, .2, 1);
    margin-bottom: -24px;
    position: relative;
    overflow: visible;
}

/* ═══ درخشش داخلی ═══ */
.mbs-bnav-item--center .mbs-bnav-item__icon--center::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, .35) 0%,
        rgba(255, 255, 255, 0) 50%);
    border-radius: 50%;
    pointer-events: none;
}

/* ═══ آیکن داخل دکمه ═══ */
.mbs-bnav-item--center .mbs-bnav-item__icon--center svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
    position: relative;
    z-index: 1;
}

/* ═══ hover / active ═══ */
.mbs-bnav-item--center:hover .mbs-bnav-item__icon--center,
.mbs-bnav-item--center.is-active .mbs-bnav-item__icon--center {
    transform: translateY(-26px) scale(1.08);
    box-shadow:
        0 12px 28px -6px rgba(108, 92, 231, .7),
        0 6px 14px -3px rgba(30, 64, 175, .5),
        0 0 0 5px rgba(255, 255, 255, 1),
        0 0 0 7px rgba(108, 92, 231, .4);
}

/* ═══ لیبل خانه ═══ */
.mbs-bnav-item--center .mbs-bnav-item__label {
    margin-top: 6px;
    color: var(--mbs-brand, #1a5fb4);
    font-weight: 800;
    font-size: 11px;
    background: linear-gradient(135deg, #1e40af, #6c5ce7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══ حذف indicator گرادیانی برای خانه ═══ */
.mbs-bnav-item--center::before {
    display: none !important;
}

/* ═══ مخفی کردن background hover معمولی برای خانه ═══ */
.mbs-bnav-item--center:hover {
    background: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   حالت «به‌زودی» — badge روی آیکن
   ═══════════════════════════════════════════════════════════════ */

.mbs-bnav-item--soon {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.4);
}

.mbs-bnav-item--soon:hover,
.mbs-bnav-item--soon:active {
    color: var(--mbs-text-muted, #94a3b8);
}

/* آیکن social — با badge گوشه */
.mbs-bnav-item__icon--soon {
    position: relative;
}

/* badge «به‌زودی» — گوشه‌ی بالا-راست آیکن */
.mbs-bnav-item__icon--soon::after {
    content: 'به‌زودی';
    position: absolute;
    top: -6px;
    left: -22px;
    font-size: 8.5px;
    font-weight: 800;
    padding: 2px 6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 5px;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow:
        0 2px 6px -1px rgba(245, 158, 11, .5),
        0 0 0 2px #fff;
    animation: mbs-bnav-soon-pulse 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes mbs-bnav-soon-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

/* حذف background قدیمی badge */
.mbs-bnav-item__soon-badge {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 380px) {
    .mbs-bnav-item--center {
        width: 64px;
    }
    .mbs-bnav-item--center .mbs-bnav-item__icon--center {
        width: 52px;
        height: 52px;
        transform: translateY(-20px);
    }
    .mbs-bnav-item--center .mbs-bnav-item__icon--center svg {
        width: 22px !important;
        height: 22px !important;
    }
    .mbs-bnav-item__icon--soon::after {
        font-size: 8px;
        padding: 1px 4px;
        left: -18px;
    }
}
