/* Mobile nav sheet behind the bottom bar's More button.
 *
 * Layer 02 of the stylesheet. ORDER IS SIGNIFICANT: this file's rules
 * are overridden by every later layer and override every earlier one, exactly as
 * when they were one file. See docs/frontend-architecture.md. */

/* Mobile nav overlay — the sheet behind the bottom bar's "More" button.
   (The floating ☰ bubble that used to open it was retired with the bottom
   navbar, tester 4 item 5.) */
@media (max-width: 1024px) {
  #mobileNavOverlay.open {
    display: flex !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 9500;
    align-items: flex-end;
  }
  .mobile-nav-sheet {
    background: #0a1218;
    width: 100%;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px 20px calc(16px + env(safe-area-inset-bottom));
    max-height: 85vh;
    border-top: 1px solid rgba(0,255,153,.25);
    /* Column layout so only the link list scrolls — the header and the Close
       button stay put however long the list gets. */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
  }
  .sheet-x {
    background: transparent !important;
    border: none !important;
    color: #8e9aa5 !important;
    padding: 8px !important;
    cursor: pointer;
  }
  .sheet-x:hover { color: #ffffff !important; transform: none !important; }
  .sheet-x svg { width: 20px; height: 20px; }
  .sheet-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* without this a flex child refuses to shrink and scroll */
    overscroll-behavior: contain;
  }
  .sheet-close {
    flex-shrink: 0;
    margin-top: 14px;
    width: 100%;
    padding: 14px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: #d7e2e9 !important;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .sheet-close:hover { transform: none !important; border-color: rgba(0,255,153,.35) !important; }
  .mobile-nav-sheet .nav-item {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 6px;
  }
}
