/* mobile-nav.css — fixed bottom tab bar + More sheet (Bootstrap-standard colours). */
.mobile-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-index-fixed);
  display: flex;
  background: var(--bs-body-bg, #fff);
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-tabbar .mobile-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  font-size: 0.68rem;
  line-height: 1;
  color: var(--bs-secondary-color, var(--color-secondary));
  background: none;
  border: 0;
  text-decoration: none;
  text-align: center;
}

.mobile-tabbar .mobile-tab i {
  font-size: 1.15rem;
}

.mobile-tabbar .mobile-tab.active {
  color: var(--bs-primary, var(--bs-blue));
  font-weight: 600;
}

.mobile-more-link {
  display: block;
  padding: 10px 4px;
  text-decoration: none;
  color: var(--bs-body-color, #212529);
  border-bottom: 1px solid var(--bs-border-color, #f1f1f1);
}

/* Clear the fixed bar so page content isn't hidden behind it. */
@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* Scroll-hide top chrome (mobile only) — top bar + section strip slide up
   out of view on scroll-down, return on scroll-up. The bottom tab bar
   (.mobile-tabbar) never moves; see static/js/mobile-nav-chrome.js. */
@media (max-width: 991.98px) {
  .jm-top-chrome.jm-chrome-hidden {
    transform: translateY(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jm-top-chrome {
    transition: none;
  }
}

/* Cross-document View Transitions — progressive enhancement, a plain no-op
   navigation in browsers without support (Chrome/Edge 126+ as of writing).
   Softens the full-page-reload flash between nav taps into a crossfade. */
@view-transition {
  navigation: auto;
}

.mobile-tabbar {
  view-transition-name: jm-mobile-tabbar;
}

.jm-top-chrome {
  view-transition-name: jm-top-chrome;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
