/* mobile-nav: phone top bar (centred logo) + sticky bottom icon bar. Jaecoo Forums.
   Generated by /var/www/forum-tools/mobile-nav/build.py; edit the template, not this file. */
#mnav { display: none; }
@media (max-width: 767px) {
  /* ---- top bar: logo only, centred, opaque so the logo's white box never shows ---- */
  body #jaecoo-site-header {
    display: block !important; position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important;
    width: 100% !important; height: 56px; box-sizing: border-box;
    background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border-bottom: 1px solid rgba(0,0,0,.08) !important; box-shadow: none !important; z-index: 300 !important;
  }
  body #jaecoo-site-header::after { display: none !important; }
  body #jaecoo-site-header .jsh-inner {
    position: relative; display: flex !important; align-items: center; justify-content: center;
    width: 100% !important; max-width: none !important; height: 56px !important; margin: 0 !important;
    padding: 0 8px !important; box-sizing: border-box !important;
  }
  body #jaecoo-site-header nav { display: none !important; }
  body #jaecoo-site-header .jsh-logo { display: flex; align-items: center; margin: 0 auto; }
  body #jaecoo-site-header .jsh-logo img { height: 30px; width: auto; display: block; }
  body #jaecoo-site-header .jsh-drawer {
    position: absolute; right: 4px; top: 50%; margin-top: -22px; width: 44px; height: 44px; padding: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
  }

  /* ---- bottom icon bar ---- */
  #mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; box-sizing: border-box;
    background: #fff; border-top: 1px solid rgba(0,0,0,.08); box-shadow: 0 -6px 22px rgba(0,0,0,.07);
    padding: 0 4px; padding-bottom: env(safe-area-inset-bottom);
  }
  #mnav a {
    flex: 1 1 0; min-width: 0; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; text-decoration: none; color: #6c6c68; -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: .01em;
  }
  #mnav .mn-ico { width: 48px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
  #mnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  #mnav a[aria-current="page"] { color: #0a0a08; font-weight: 700; }
  #mnav a[aria-current="page"] .mn-ico { background: #F5C842; }
  #mnav a:active .mn-ico { background: #fbeab2; }

  /* ---- never let the page become a nested scroller (can trap scrolling short of the top on phones) ---- */
  html, body { overflow-x: clip !important; overflow-y: visible !important; height: auto !important; }
  html { scroll-padding-top: 56px; }

  /* ---- room for both bars ---- */
  body { padding-bottom: 72px !important; }
  body.mn-static { padding-top: 56px !important; }

  /* ---- Flarum pages: start below the top bar; lift floating controls above the bottom bar ---- */
  #app #content { padding-top: 56px !important; }
  #app .IndexPage .Hero { margin-top: 14px !important; }
  #app li.item-newDiscussion.App-primaryControl { bottom: 78px !important; right: 14px !important; }
  #app .DiscussionPage .Dropdown:has(.Dropdown-toggle[aria-label*="discussion actions"]) { bottom: 78px !important; right: 14px !important; }
  #jf-top { bottom: 140px !important; right: 16px !important; }
  #jht-wrap { bottom: 74px !important; left: 12px !important; }
  #jht-btn { width: 40px; height: 40px; font-size: 18px; }
  #app .App-drawer { z-index: 1050; }
}
