/* ═══════════════════════════════════════════════════════════════
   SHARED BOTTOM NAVIGATION — floating glass dock used on every page.
   Load css/design-tokens.css before this file for spacing/z-index.
═══════════════════════════════════════════════════════════════ */

/* The dock is a centered floating pill ~92% of the viewport wide,
   capped at a comfortable maximum. Sits a small distance above the
   screen edge so it reads as floating, not anchored. Five tabs share
   equal flex width; the Scan tab in the middle wraps its icon in a
   glowing emerald ring at the same icon size as the others. */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 24px);
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 16, 14, 0.72);
  border: 1px solid rgba(16, 185, 129, 0.20);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(16, 185, 129, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: var(--z-bottom-nav, 1000);
  box-sizing: border-box;
}

.b-nav-item {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 999px;
  color: rgba(236, 253, 245, 0.55);
  text-decoration: none;
  transition: color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.b-nav-item i { font-size: 20px; }
.b-nav-item span { font-size: 10px; font-weight: 500; letter-spacing: 0.1px; }
.b-nav-item:hover { color: rgba(236, 253, 245, 0.85); }
.b-nav-item.active {
  color: var(--color-primary, #10b981);
}
.b-nav-item.active i {
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
}

/* Scan tab: leaf in a glowing emerald ring. Icon stays exactly 20px
   (same as the other dock icons) — the ring is only a circular
   highlight around it, not a larger raised circle. */
.b-nav-scan {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 185, 129, 0.55);
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 16, 14, 0.55);
  color: var(--color-primary, #10b981);
  text-decoration: none;
  box-shadow:
    0 0 18px rgba(16, 185, 129, 0.35),
    inset 0 0 12px rgba(16, 185, 129, 0.18);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.b-nav-scan i {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
}
/* Slow dashed outer halo — the "epic border" feel */
.b-nav-scan::before {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px dashed rgba(16, 185, 129, 0.22);
  animation: navScanSpin 12s linear infinite;
  pointer-events: none;
}
.b-nav-scan::after { content: none; }   /* drop the old larger pulse ring */
.b-nav-scan.active-tab {
  background: rgba(16, 185, 129, 0.18);
  box-shadow:
    0 0 26px rgba(16, 185, 129, 0.50),
    inset 0 0 14px rgba(16, 185, 129, 0.28);
}

@keyframes navScanSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .b-nav-scan::before { animation: none !important; }
}
