/*
 * Bottom Navigation مشترکِ کلِ پلتفرم Chinro
 * ثابت، یکسان در همهٔ صفحات و دستگاه‌ها، چسبیده به پایینِ viewport.
 * با !important نوشته شده تا هیچ صفحه‌ای (مخصوصاً پروفایل) نتواند بازنویسی‌اش کند.
 * فقط برای Home Indicator آیفون از Safe Area استفاده می‌شود (بدون فاصلهٔ اضافی).
 */

/* پوستهٔ نوار: چسبیده به پایین، تمام‌عرض، بدون حاشیه و بدون گوشهٔ گرد */
.mobile-bottom-nav {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important; /* شناور، با فاصله از پایین */
    width: calc(100% - 24px) !important;
    max-width: 440px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 34px !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    z-index: 1000 !important;
    overflow: visible !important;
    transform: translateX(-50%) !important; /* وسطِ صفحه */
    transition: none !important;
}
/* هیچ‌گاه با اسکرول مخفی نشود (ولی وسط بماند) */
.mobile-bottom-nav.nav-hidden {
    transform: translateX(-50%) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* لایهٔ پس‌زمینهٔ سبز + گودیِ منحنیِ وسط */
.mobile-bottom-nav::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 34px !important;
    background: rgba(255, 253, 249, 0.78) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
            backdrop-filter: blur(20px) saturate(1.4) !important;
    border: 1px solid rgba(20, 40, 30, 0.08) !important;
    box-shadow: 0 10px 34px rgba(20, 40, 30, 0.20) !important;
    -webkit-mask: none !important;
            mask: none !important;
    z-index: 0 !important;
}

/* ردیفِ آیکن‌ها: ارتفاع و padding ثابت و یکسان */
.mobile-bottom-nav .mobile-nav-items {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    /* وقتی آیکون‌ها جا می‌شوند وسط می‌مانند؛ وقتی بیشتر شدند با دست افقی اسکرول می‌شوند */
    justify-content: center !important;
    justify-content: safe center !important;
    align-items: center !important;
    gap: 6px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 10px !important;
    height: 60px !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
/* نوارِ اسکرول پنهان بماند تا ظاهرِ نوار تمیز باشد */
.mobile-bottom-nav .mobile-nav-items::-webkit-scrollbar { display: none !important; }

.mobile-bottom-nav .mobile-nav-item {
    position: relative !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 9px 15px !important;
    border-radius: 24px !important;
    color: #9b9b94 !important; /* خاکستریِ روشن برای حالت غیرفعال تا انتخاب‌شده واضح باشد */
    text-decoration: none !important;
    white-space: nowrap !important;
    background: none !important;
    cursor: pointer !important;
    transition: color .18s, background .18s, transform .12s !important;
}
/* گزینهٔ انتخاب‌شده: سبزِ پررنگ + هالهٔ روشن */
.mobile-bottom-nav .mobile-nav-item.active,
.mobile-bottom-nav .mobile-nav-item:hover {
    color: #14432f !important; /* سبزِ سازمانی برای حالت فعال */
    background: rgba(20, 67, 47, 0.12) !important; /* هالهٔ روشنِ پشتِ آیکونِ فعال */
}
/* بازخوردِ فوریِ لمس (فشردن): رنگ عوض و کمی فشرده می‌شود */
.mobile-bottom-nav .mobile-nav-item:active {
    color: #14432f !important;
    background: rgba(20, 67, 47, 0.18) !important;
    transform: scale(.93) !important;
}
.mobile-bottom-nav .mobile-nav-item.active svg { stroke-width: 2.1 !important; }
.mobile-bottom-nav .mobile-nav-item i {
    font-size: 24px !important;
    margin: 0 !important;
}
/* آیکون‌های خط‌نازکِ مدرن (SVG) */
.mobile-bottom-nav .mobile-nav-item svg {
    width: 26px !important;
    height: 26px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
/* متنِ آیتم‌ها مطابق عکس حذف می‌شود (فقط آیکون) */
.mobile-bottom-nav .mobile-nav-item span:not(.nav-badge) {
    display: none !important;
}

/* جای خالیِ مرکز برای دکمهٔ شناور */
.mobile-bottom-nav .nav-fab-space {
    flex: 0 0 60px !important;
    min-width: 60px !important;
}

/* دکمهٔ وسط (+): مطلق و ثابت در مرکزِ گودی */
.mobile-bottom-nav .nav-center {
    position: absolute !important;
    left: 50% !important;
    top: -28px !important;
    transform: translateX(-50%) !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    margin: 0 !important;
    flex: none !important;
    border-radius: 50% !important;
    background: #14432f !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 18px rgba(20, 67, 47, 0.35) !important;
    border: 2px solid #fffdf9 !important;
    z-index: 4 !important;
    padding: 0 !important;
}
.mobile-bottom-nav .nav-center i {
    font-size: 22px !important;
    margin: 0 !important;
    color: #fff !important;
}
.mobile-bottom-nav .nav-center svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    stroke: #fff !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* نشانِ پیام/اعلان روی آیکن‌ها */
.mobile-bottom-nav .nav-badge {
    position: absolute !important;
    top: 4px !important;
    inset-inline-end: 8px !important;
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;
    border-radius: 9px !important;
    background: #ed4956 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: 0 0 0 2px #fffdf9 !important;
}

/* نمایش فقط روی موبایل/تبلت (مثل قبل)؛ روی دسکتاپ مخفی */
@media (max-width: 768px) {
    .mobile-bottom-nav { display: block !important; }
}
@media (min-width: 769px) {
    .mobile-bottom-nav { display: none !important; }
}
