/* QA presentation only. Authorization, visibility and access rules own state. */
.bbai-qa-mobile-menu-close { display: none; }

@media (max-width: 991px) and (hover: none), (max-width: 991px) and (pointer: coarse) {
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .kid-mobile-nav-card {
    box-sizing: border-box;
    z-index: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
    min-width: 0;
    max-height: min(78dvh, calc(100dvh - 112px - env(safe-area-inset-bottom))) !important;
    padding: 10px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .kid-mobile-nav-card > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .bbai-mobile-nav-head {
    position: sticky !important;
    top: 0;
    z-index: 2 !important;
    background: #091527;
    min-height: 46px;
    padding: 4px 48px 8px 6px !important;
    align-content: center;
    gap: 4px;
  }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .bbai-mobile-nav-kicker { line-height: 1.25; letter-spacing: .1em; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .bbai-mobile-nav-subtitle { line-height: 1.3; letter-spacing: .14em; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .kid-mobile-nav-card > .bbai-mobile-route {
    min-height: 48px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    border-radius: 12px !important;
  }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) .nav-link-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard:not([hidden]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0;
    padding: 12px !important;
    margin: 6px 0 0 !important;
    border-radius: 14px !important;
  }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard .mobile-wallet-session-copy { gap: 5px; padding: 0 2px 3px; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard .mobile-wallet-session-kicker { line-height: 1.3 !important; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard .mobile-wallet-session-address { line-height: 1.3 !important; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard > .btn:not([hidden]) {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    align-items: center;
    justify-content: center !important;
    border-radius: 12px !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: .8rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: .025em !important;
    text-align: center;
    touch-action: manipulation;
  }
  /* Respect the existing renderer's hidden state, including connected/busy. */
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard[hidden],
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletSessionCard > [hidden],
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) #mobileWalletConnectGrid[hidden] { display: none !important; }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) > .bbai-qa-mobile-menu-close {
    position: absolute;
    top: 9px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(100, 223, 249, .28);
    border-radius: 12px;
    color: #eafaff;
    background: linear-gradient(135deg, #102c40, #24152f);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 12px rgba(56,220,255,.06);
    font: 400 28px/1 system-ui, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
  }
  body.presale-page.bbai-mobile-menu-open #mobileNav:is(.show,.collapsing) > .bbai-qa-mobile-menu-close:focus-visible { outline: 2px solid #77edff; outline-offset: 2px; }
}
