/* ── Bottom navigation ───────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: stretch;
  background: rgba(6, 16, 20, 0.97);
  border-top: 1px solid rgba(165, 202, 214, 0.14);
  backdrop-filter: blur(10px);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* During active route: slide nav off screen */
body.in-route .bottom-nav {
  transform: translateY(100%);
}

/* Peek: user tapped FAB to temporarily show nav */
body.in-route.nav-peek .bottom-nav {
  transform: translateY(0);
}

/* ── Nav toggle FAB (only during active route) ───────────────────────────── */
.nav-fab {
  position: fixed;
  bottom: calc(0.9rem + env(safe-area-inset-bottom));
  right: 0.9rem;
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(9, 22, 26, 0.88);
  border: 1px solid rgba(165, 202, 214, 0.22);
  color: var(--text-soft);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: color 180ms ease, border-color 180ms ease, transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

body.in-route .nav-fab {
  display: flex;
}

/* FAB slides up when nav peeks (so it sits above the nav bar) */
body.in-route.nav-peek .nav-fab {
  color: var(--primary);
  border-color: rgba(24, 191, 125, 0.45);
  transform: translateY(calc(-1 * var(--nav-h)));
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 0;
  color: rgba(159, 182, 190, 0.65);
  cursor: pointer;
  padding: 0.3rem 0.2rem;
  transition: color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab:hover {
  color: var(--text-soft);
}

.nav-tab.active {
  color: var(--primary);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg {
  display: block;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

/* active indicator bar */
.nav-tab.active::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  width: 36px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--primary);
}

.nav-tab {
  position: relative;
}
