/* BAIO mobile navigation: side menu, bottom bar, offer strip. */

/* Menu button in the header (shown where the theme shows its mobile menu) */
.bm-burger { width: 42px; height: 42px; display: grid; place-content: center; gap: 4px; padding: 0; background: transparent; border: 1px solid #d9d2c2; border-radius: 11px; cursor: pointer; text-decoration: none; }
.bm-burger span { display: block; width: 17px; height: 2px; background: #14213d; }
.bm-burger:focus-visible { outline: 3px solid #9a3412; outline-offset: 2px; }

/* Header (with the offer strip inside it) stays pinned to the top while the
   page scrolls. The page is pushed down by the header's real height, which
   mobile-nav.js measures and stores in --baio-header-h. */
html body .baio-header { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 9980 !important; }
html body { padding-top: var(--baio-header-h, 79px) !important; }
html { scroll-padding-top: calc(var(--baio-header-h, 79px) + 12px); }
html body.admin-bar .baio-header { top: 32px !important; }
@media (max-width: 782px) {
	html body.admin-bar .baio-header { top: 46px !important; }
	html body.has-bm-offer { padding-top: var(--baio-header-h, 118px) !important; }
}

/* Side menu */
.bm-backdrop { position: fixed; inset: 0; z-index: 9998; background: rgba(16, 27, 51, .42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.bm-drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 9999; width: min(86vw, 330px); display: flex; flex-direction: column; background: #fffdf8; color: #14213d; border-right: 1px solid #14213d; transform: translateX(-102%); visibility: hidden; transition: transform .22s ease, visibility .22s; font-family: "Noto Sans Bengali", Manrope, system-ui, sans-serif; overscroll-behavior: contain; }
.bm-open .bm-drawer, .bm-drawer:target { transform: none; visibility: visible; }
.bm-open .bm-backdrop, .bm-drawer:target ~ .bm-backdrop, .bm-backdrop:has(+ .bm-drawer:target) { opacity: 1; visibility: visible; }
.bm-open body { overflow: hidden; }

.bm-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 20px; border-bottom: 2px solid #14213d; }
.bm-drawer-brand { font-size: 13px; color: #46506a; letter-spacing: .02em; }
.bm-drawer-brand strong { display: block; font-size: 20px; line-height: 1.2; color: #14213d; letter-spacing: 0; }
.bm-close { width: 44px; height: 44px; display: grid; place-items: center; font-size: 30px; line-height: 1; color: #14213d; text-decoration: none; border-radius: 8px; }
.bm-close:hover { background: #f1e9d8; }
.bm-close:focus-visible, .bm-item:focus-visible { outline: 3px solid #9a3412; outline-offset: -3px; }

.bm-drawer-nav { flex: 1; overflow-y: auto; padding: 4px 0 28px; -webkit-overflow-scrolling: touch; }
.bm-drawer-nav ul { list-style: none; margin: 0; padding: 0; }
.bm-group { margin: 18px 20px 4px; font-size: 13px; font-weight: 600; color: #9a3412; }
.bm-item { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 8px 20px; color: #14213d; text-decoration: none; font-size: 16.5px; font-weight: 500; line-height: 1.4; }
a.bm-item:hover { background: #f6efdf; }
.bm-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #e2d6bd; border-radius: 9px; background: #fbf7ee; color: #14213d; }
.bm-name { flex: 1; min-width: 0; }
.bm-badge { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: #9a3412; padding: 2px 8px; border-radius: 4px; }
.bm-item.is-soon { color: #6b7386; }
.bm-item.is-soon .bm-ico { color: #8b92a3; }
.bm-badge-soon { color: #6b7386; background: transparent; border: 1px solid #c9bb9c; font-weight: 600; letter-spacing: 0; }

/* Bottom bar and offer strip: phones only */
.bm-bar, .bm-offer { display: none; }

@media (max-width: 782px) {
	.bm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: grid; grid-template-columns: repeat(4, 1fr); background: #fffdf8; border-top: 1px solid #14213d; padding-bottom: env(safe-area-inset-bottom, 0); font-family: "Noto Sans Bengali", Manrope, system-ui, sans-serif; }
	.bm-bar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; color: #46506a; text-decoration: none; font-size: 11.5px; font-weight: 600; line-height: 1.2; }
	.bm-bar-item.is-active { color: #9a3412; box-shadow: inset 0 3px 0 #9a3412; }
	.bm-bar-item:focus-visible { outline: 3px solid #9a3412; outline-offset: -3px; }
	body.has-bm-bar { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
	body.has-bm-bar #ht-ctc-chat { bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; }

	.bm-offer { display: flex; align-items: center; gap: 8px; background: #14213d; color: #fff; padding: 0 4px 0 14px; font-family: "Noto Sans Bengali", Manrope, system-ui, sans-serif; }
	.bm-offer[hidden] { display: none; }
	.bm-offer-text { flex: 1; min-width: 0; padding: 9px 0; color: #fff; font-size: 13.5px; font-weight: 500; line-height: 1.45; text-decoration: none; }
	a.bm-offer-text { text-decoration: underline; text-underline-offset: 3px; }
	.bm-offer-close { flex: none; width: 40px; height: 40px; font-size: 24px; line-height: 1; color: #fff; background: transparent; border: 0; cursor: pointer; }
	.bm-offer-close:focus-visible { outline: 2px solid #f0b48a; outline-offset: -4px; }
}

@media (prefers-reduced-motion: reduce) {
	.bm-drawer, .bm-backdrop { transition: none; }
}
