/**
 * LUMARION Media 2.9.13 — mobile floating navigation.
 * Native Apple Liquid Glass is not exposed to arbitrary web page controls;
 * .lum-glass-capable opts eligible Apple WebKit 26+ browsers into a CSS approximation.
 */
@media (max-width: 900px) {
  /* Existing site.css rules are overridden here rather than creating a second nav. */
  body.lum-mobile-nav-enabled {
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  body:not(.lum-mobile-nav-enabled) { padding-bottom: 0; }

  .mobile-bottom {
    --lum-nav-text: #273244;
    --lum-nav-muted: #66738a;
    position: fixed;
    z-index: 60;
    left: 50%;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 28px), 560px);
    max-width: 560px;
    min-height: 68px;
    padding: 7px 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    transform: translateX(-50%);
    border: 1px solid #dde3ec;
    border-radius: 24px;
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 10px 32px rgba(21, 38, 66, .14);
    isolation: isolate;
  }

  .mobile-bottom a,
  .mobile-bottom button {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 5px 3px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--lum-nav-muted);
    text-align: center;
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .16s ease, color .16s ease;
  }
  .mobile-bottom svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-bottom button svg circle { fill: currentColor; stroke: none; }
  .mobile-bottom span {
    display: block;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
  }
  .mobile-bottom a[aria-current="page"],
  .mobile-bottom button[aria-expanded="true"] {
    background: #eaf1fa;
    color: #15517f;
  }
  .mobile-bottom a:focus-visible,
  .mobile-bottom button:focus-visible {
    outline: 3px solid #2e6de0;
    outline-offset: -2px;
  }
  .mobile-bottom a:active,
  .mobile-bottom button:active { background: #e7eef8; }

  /* More-menu and search overlays must remain above the floating bar. */
  .primary-nav.is-open { z-index: 100; }

  /* Input focus: the keyboard takes priority; otherwise the bar stays fixed. */
  html.lum-mobile-keyboard-open .mobile-bottom { display: none; }

  /* iOS/iPadOS 26+ on a capable Apple WebKit browser: Liquid Glass-inspired UI. */
  @supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
    html.lum-glass-capable .mobile-bottom {
      background: linear-gradient(165deg, rgba(255,255,255,.76), rgba(242,249,255,.60) 55%, rgba(225,235,247,.66));
      border-color: rgba(255,255,255,.76);
      -webkit-backdrop-filter: blur(26px) saturate(175%);
      backdrop-filter: blur(26px) saturate(175%);
      box-shadow: 0 12px 40px rgba(15,29,53,.17), inset 0 1px 1px rgba(255,255,255,.94), inset 0 -1px 1px rgba(255,255,255,.30);
    }
    html.lum-glass-capable .mobile-bottom::before {
      content: "";
      position: absolute;
      inset: 1px 10px auto;
      height: 19px;
      border-radius: 999px;
      background: linear-gradient(to bottom, rgba(255,255,255,.40), transparent);
      pointer-events: none;
      z-index: -1;
    }
    html.lum-glass-capable .mobile-bottom a[aria-current="page"],
    html.lum-glass-capable .mobile-bottom button[aria-expanded="true"] {
      color: #123b61;
      background: rgba(255,255,255,.54);
      box-shadow: inset 0 1px rgba(255,255,255,.8), 0 2px 10px rgba(15,36,66,.08);
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    html.lum-glass-capable .mobile-bottom {
      background: #fff;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
      border-color: #d6dde8;
    }
    html.lum-glass-capable .mobile-bottom::before { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .mobile-bottom a, .mobile-bottom button { transition: none; }
  }
}

/* Keep latest news and member entry reachable after moving them from the bottom bar. */
.primary-nav__quicklinks { display: none; }
.primary-nav.is-open .primary-nav__quicklinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #dfe5ed; }
.primary-nav.is-open .primary-nav__quicklinks a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border-radius: 11px; background: #edf3fa; color: #173b63; text-decoration: none; font-size: 13px; font-weight: 750; }
.primary-nav.is-open .primary-nav__quicklinks a:focus-visible { outline: 3px solid #2e6de0; outline-offset: 2px; }
