/* ── Mobile Navigation CSS ──────────────────────────────────────── */
/* Desktop: hide all mobile-only elements */
.bm-mobile-topnav,
.bm-bottom-nav,
.bm-drawer,
.bm-drawer-backdrop {
  display: none;
}

/* ── Mobile (<860px) ──────────────────────────────────────────────── */
@media (max-width: 860px) {

  /* ── Mobile Topnav visible items ── */
  .bm-mobile-topnav {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .bm-mobile-topnav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(139, 92, 246, .45);
    border-radius: 14px;
    background: rgba(139, 92, 246, .1);
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }

  .bm-mobile-topnav a:hover {
    background: rgba(139, 92, 246, .22);
    color: #fff;
  }

  /* ── Allow vertical scrolling on main — overflow:hidden was
     preventing body padding-bottom from being reachable ── */
  .bm-main {
    overflow-x: clip;
  }

  /* ── Body padding for fixed bottom nav ── */
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  /* Prevent double-padding on portal/dashboard pages */
  body.page-template-template-portal-php {
    padding-bottom: 0;
  }

  /* ── Bottom Navigation Bar ── */
  .bm-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 100;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(7, 10, 18, .96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, .1);
    justify-content: space-around;
    align-items: stretch;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .4);
  }

  .bm-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    color: rgba(255, 255, 255, .48);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    padding: 8px 4px;
    transition: color .2s ease;
    position: relative;
  }

  .bm-bottom-nav__item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .bm-bottom-nav__item .material-symbols-rounded {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
  }

  .bm-bottom-nav__item.is-active,
  .bm-bottom-nav__item:hover {
    color: var(--bm-violet, #8b5cf6);
  }

  /* Active indicator dot above active tab */
  .bm-bottom-nav__item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--bm-violet, #8b5cf6);
  }

  /* ── Drawer Backdrop ── */
  .bm-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .bm-drawer-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── Drawer Panel ── */
  .bm-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    width: min(320px, 90vw);
    background: rgba(10, 14, 28, .99);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-inline-start: 1px solid rgba(255, 255, 255, .1);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: -8px 0 40px rgba(0, 0, 0, .5);
  }

  .bm-drawer[aria-hidden="false"] {
    transform: translateX(0);
  }

  /* Prevent body scroll when drawer open */
  body.bm-drawer-open {
    overflow: hidden;
  }

  /* ── Drawer Head ── */
  .bm-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
  }

  .bm-drawer__head .bm-logo strong {
    font-size: 20px;
  }

  .bm-drawer-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .72);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background .2s, color .2s;
    font: inherit;
  }

  .bm-drawer-close:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
  }

  /* ── Drawer Menu ── */
  .bm-drawer-menu {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    flex: 1;
  }

  .bm-drawer-menu li {
    margin: 2px 8px;
  }

  .bm-drawer-menu li a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    transition: background .2s, color .2s;
  }

  .bm-drawer-menu li a:hover,
  .bm-drawer-menu li.current-menu-item > a {
    background: rgba(139, 92, 246, .14);
    color: #fff;
  }

  /* ── Drawer submenu (accordion) ── */
  .bm-drawer-menu .menu-item-has-children > a {
    justify-content: space-between;
  }

  .bm-drawer-menu .menu-item-has-children > a::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255,255,255,.4);
    border-bottom: 2px solid rgba(255,255,255,.4);
    transform: rotate(45deg);
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: 4px;
  }

  .bm-drawer-menu .menu-item-has-children.is-open > a::after {
    transform: rotate(-135deg);
  }

  .bm-drawer-menu .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    padding-right: 16px;
  }

  .bm-drawer-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  .bm-drawer-menu .sub-menu li {
    margin: 1px 8px;
  }

  .bm-drawer-menu .sub-menu a {
    min-height: 42px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.58);
    padding-right: 18px;
    position: relative;
  }

  .bm-drawer-menu .sub-menu a::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(139,92,246,.7);
  }

  .bm-drawer-menu .sub-menu a:hover {
    color: #fff;
    background: rgba(139,92,246,.12);
  }

  /* ── Drawer Footer ── */
  .bm-drawer__foot {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
  }

  .bm-drawer__foot .bm-btn,
  .bm-drawer__foot .bm-login-link {
    display: flex !important;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
  }

  /* ── Hamburger SVG icon ── */
  .bm-menu-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
  }

  /* ── Hide desktop-only header actions on mobile ── */
  .bm-header .bm-header__actions {
    display: none;
  }

}
