/* ══════════════════════════════════════════════════════════════
   📱 نوار ناوبری پایینی اپ‌مانند — فقط موبایل
   ══════════════════════════════════════════════════════════════
   این فایل در تمام صفحات عمومی (index.html, cafes.html,
   cafe-detail.html, map.html, blog.html) بارگذاری می‌شه. هدف: به‌جای
   منوی همبرگری/کشویی معمولی وب، یه نوار ناوبری ثابت و همیشه در دسترس
   پایین صفحه — دقیقاً مثل اپ‌های واقعی (اسنپ، دیجی‌کالا، اینستاگرام)
   — تا کاربر موبایل حس کنه داره یه اپلیکیشن واقعی رو استفاده می‌کنه. */

.bm-bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 9990;
    display: none; /* پیش‌فرض مخفی — فقط با media query زیر روی موبایل ظاهر می‌شه */
    background: rgba(18, 16, 12, .92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .35);
}

@media (max-width: 768px) {
    .bm-bottom-nav { display: flex; align-items: stretch; justify-content: space-around; }
    /* فضای خالی پایین صفحه تا محتوا زیر نوار ناوبری گم نشه */
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}

.bm-bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    color: rgba(245, 241, 234, .5);
    text-decoration: none;
    font-size: .62rem;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s ease, transform .15s ease;
    position: relative;
}

.bm-bn-item:active { transform: scale(.9); }

.bm-bn-item i {
    font-size: 1.18rem;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.bm-bn-item.active {
    color: #F5A623;
}

.bm-bn-item.active i {
    transform: translateY(-2px);
}

.bm-bn-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #F5A623;
    box-shadow: 0 0 8px rgba(245, 166, 35, .8);
}

/* دکمه‌ی مرکزی برجسته (کشف/جستجو) — کمی بزرگ‌تر و بالاتر، مثل خیلی از اپ‌های واقعی */
.bm-bn-item.bm-bn-center {
    position: relative;
    top: -14px;
}
.bm-bn-item.bm-bn-center .bm-bn-center-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5A623, #E8801A);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(232, 128, 26, .5), 0 0 0 4px rgba(18, 16, 12, .92);
    margin-bottom: 2px;
}
.bm-bn-item.bm-bn-center .bm-bn-center-circle i {
    color: #0C0B09;
    font-size: 1.2rem;
}
.bm-bn-item.bm-bn-center span { color: rgba(245, 241, 234, .7); }

.bm-bn-badge {
    position: absolute;
    top: 2px;
    left: calc(50% - 16px);
    background: #e74c3c;
    color: #fff;
    font-size: .55rem;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ══════════════════════════════════════════════════
   🔧 اصلاح تداخل با المان‌های شناور موجود در صفحات
   ══════════════════════════════════════════════════
   چند المان دیگه (بری شناور، دکمه‌های اکشن، پیام‌های toast) از قبل
   position:fixed با bottom پایین داشتن که الان — فقط روی موبایل —
   دقیقاً پشت نوار ناوبری جدید قایم می‌شن. اینجا فقط ارتفاعشون رو، فقط
   روی موبایل، به اندازه‌ی ارتفاع نوار ناوبری بالا می‌بریم. */
@media (max-width: 768px) {
    .bari-float-wrap { bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important; }
    .floating-actions { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
    #toastMsg, .toast, #globalToast, .toast-msg, #dynamicToast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; }
    .go-top { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
}
