/* ───────────── নিচের মেনুবার (মোবাইল) — নেটিভ অ্যাপের মতো ─────────────
 * পাবলিক সাইট (.site-bottomnav, ≤640px — layouts.site দেখায়) ও সব ড্যাশবোর্ড (.app-bottomnav, ≤768px) একই নকশায়।
 * মার্কআপ: <a><span class="bn-ic"><i class="fa …"></i>[<span class="bn-badge">৩</span>|<span class="bn-dot"></span>]</span><span class="bn-lb">নাম</span></a>
 * সক্রিয় ঘরে আইকনের পেছনে টিলের নরম "পিল" (Material 3-এর মতো); চাপলেই পিল সরে যায় (theme-init-এর স্ক্রিপ্ট), পাতা লোড হওয়ার অপেক্ষা নয়।
 * উচ্চতা ৫৮px + ফোনের নিচের নিরাপদ অংশ — অন্য পাতার ভাসমান বার (bottom: calc(58px + env(...))) এই মাপ ধরে বসানো, তাই বদলাবেন না।
 */
.app-bottomnav, .site-bottomnav { display: none; }
@media (max-width: 768px) { .app-bottomnav { display: flex; } }

.app-bottomnav, .site-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
    box-sizing: content-box; height: 58px;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    align-items: stretch;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 -8px 28px rgba(15, 23, 42, .07);
}
.site-bottomnav { z-index: 200; }

.app-bottomnav a, .site-bottomnav a {
    flex: 1 1 0; min-width: 0; min-height: 44px; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 1px 5px;
    color: #64748b; text-decoration: none;
    font-size: 10.5px; font-weight: 600; line-height: 1.15; letter-spacing: 0;
    -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
    transition: color .2s ease;
}
.app-bottomnav a:hover, .site-bottomnav a:hover, .app-bottomnav a:focus, .site-bottomnav a:focus { text-decoration: none; color: #334155; }

/* আইকনের ঘর ও তার পেছনের পিল */
.bn-ic { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 30px; border-radius: 999px; transition: transform .15s ease; }
.bn-ic::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--brand-tint, #e1f3ef); opacity: 0; transform: scaleX(.45); transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
.bn-ic > i { position: relative; font-size: 19px; line-height: 1; }
.bn-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-bottomnav a.active, .site-bottomnav a.active { color: var(--brand-ink, #0f766e); font-weight: 800; }
.app-bottomnav a.active .bn-ic::before, .site-bottomnav a.active .bn-ic::before { opacity: 1; transform: scaleX(1); }
.app-bottomnav a:active .bn-ic, .site-bottomnav a:active .bn-ic { transform: scale(.9); }

/* প্রোফাইল ছবি (আমি / প্রোফাইল) */
.bn-ic .bn-av { position: relative; width: 23px; height: 23px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(15, 23, 42, .12); }
a.active .bn-ic .bn-av { box-shadow: 0 0 0 2px var(--brand-ink, #0f766e); }

/* সংখ্যার ব্যাজ ও লাইভের লাল বিন্দু — আইকনের ডান কাঁধে */
.bn-badge { position: absolute; top: -2px; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; box-sizing: border-box;
    background: #ef4444; color: #fff; font-size: 9.5px; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px var(--surface, #fff); }
.bn-dot { position: absolute; top: 2px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--surface, #fff); }
.bn-dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #ef4444; animation: bnPulse 1.6s ease-out infinite; }
@keyframes bnPulse { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .bn-ic, .bn-ic::before { transition: none; }
    .bn-dot.live::after { animation: none; }
}

html[data-theme="dark"] .app-bottomnav, html[data-theme="dark"] .site-bottomnav { background: rgba(19, 30, 29, .94); border-top-color: var(--line); box-shadow: 0 -8px 28px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .app-bottomnav a, html[data-theme="dark"] .site-bottomnav a { color: #94a3b8; }
html[data-theme="dark"] .app-bottomnav a.active, html[data-theme="dark"] .site-bottomnav a.active { color: #5eead4; }
