/* Fixed bottom nav — mobile only (parity with SPA MobileBottomNav). */
.surface-mobile-nav,
.member-mobile-nav {
  display: none;
}

.surface-mobile-nav-spacer,
.member-mobile-nav-spacer {
  display: none;
}

@media (max-width: 767px) {
  .surface-mobile-nav,
  .member-mobile-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.15rem;
    margin: 0;
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border, #cbd5e1);
    background: color-mix(in srgb, var(--surface, #fff) 95%, transparent);
    backdrop-filter: blur(8px);
    list-style: none;
  }

  .surface-mobile-nav a,
  .surface-mobile-nav button,
  .member-mobile-nav a,
  .member-mobile-nav button {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.2rem;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.15;
    text-decoration: none;
    color: var(--muted, #64748b);
    cursor: pointer;
  }

  .surface-mobile-nav a[aria-current="page"],
  .member-mobile-nav a[aria-current="page"] {
    color: var(--primary, #0f766e);
  }

  .surface-mobile-nav__center {
    margin-top: -1rem;
  }

  .surface-mobile-nav__center-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: #115e59;
    color: #f0fdfa;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgb(15 23 42 / 0.2);
  }

  .surface-mobile-nav-spacer,
  .member-mobile-nav-spacer {
    display: block;
    height: 4.25rem;
  }

  /* Hide chrome that duplicates the bar */
  .member-foot-dup,
  .go-nav-dup,
  .counter-foot-dup {
    display: none !important;
  }

  /* Keep evaluate row above the bar */
  .counter-shell .counter-actions {
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    padding-bottom: 0.75rem;
  }
}

.surface-mobile-nav-sheet {
  display: none;
}

@media (max-width: 767px) {
  .surface-mobile-nav-sheet[data-open="1"] {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgb(0 0 0 / 0.4);
  }

  .surface-mobile-nav-sheet__panel {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    max-height: 70vh;
    overflow: auto;
    padding: 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
    background: var(--surface, #fff);
    color: var(--text, #0f172a);
    box-shadow: 0 -8px 24px rgb(15 23 42 / 0.18);
  }

  .surface-mobile-nav-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
  }

  .surface-mobile-nav-sheet__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
