/* ============================================================
 * Lucidity — Shared Bottom Tab Navigation
 * ============================================================ */

/* ──────────────────────────────────────────────────────────
 * Top-bar avatar (shared across all pages)
 * Lives in nav.css because nav.css is loaded by every page,
 * and the avatar is now the universal entry point to /settings.html.
 * The notification bell is index-only (lives in index.css) since it
 * surfaces coaching nudges; the avatar appears wherever there's a header.
 * ────────────────────────────────────────────────────────── */
.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #8be7ff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(236, 72, 153, 0.22));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(139, 231, 255, 0.38);
}

.avatar-btn:hover {
  border-color: #8be7ff;
  box-shadow: 0 0 20px rgba(139, 231, 255, 0.52);
  filter: brightness(1.1);
}

.avatar-initials {
  text-transform: uppercase;
  user-select: none;
}

.avatar-btn.avatar-has-image {
  background: rgba(255, 255, 255, 0.06);
  padding: 0;
}

/* Preset avatars are black line art on a transparent background. On the dark
 * nav surface they'd read as "inverted" (dark on dark), so give them the same
 * light disc the picker uses — that way the avatar appears in the top nav
 * exactly as it appears when selected in the modal preview. */
.avatar-btn.avatar-preset-image {
  background: #f3f4f6;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* Pack presets are line art on a large transparent canvas; cover crops to a
   tight zoom. Contain shows the full figure like the small grid thumbnails. */
.avatar-btn.avatar-preset-image .avatar-img,
.identity-avatar.avatar-preset-image .avatar-img {
  object-fit: contain;
}



.bottom-nav {
  display: flex;
  background: rgba(5, 8, 20, 0.94);
  border-top: 1px solid rgba(217, 168, 255, 0.16);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  flex-shrink: 0;
  z-index: 200;
}

/* Fixed variant — used on scrollable pages (dashboard) */
.bottom-nav--fixed {
  position: fixed;
  /* Keep at visible bottom; lift by keyboard inset via transform. */
  bottom: 0;
  left: 0;
  right: 0;
  transform: translate3d(0, calc(-1 * var(--keyboard-inset-bottom, 0px)), 0);
  will-change: transform;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 4px;
  text-decoration: none;
  color: #89849d;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
  position: relative;
}

.nav-tab:hover {
  color: #d9d7e6;
}

.nav-tab.active {
  color: #d9a8ff;
}

/* Active indicator pill above icon */
.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: #d9a8ff;
  border-radius: 0 0 2px 2px;
}

.nav-tab svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.nav-tab:active svg {
  transform: scale(0.9);
}

/* Coach tab — mic accent when active */
.nav-tab.active[data-tab="coach"] {
  color: #8be7ff;
}
.nav-tab.active[data-tab="coach"]::before {
  background: #8be7ff;
}

/* Chronicle tab — purple accent when active */
.nav-tab.active[data-tab="vault"],
.nav-tab.active[data-tab="chronicle"] {
  color: #d9a8ff;
}
.nav-tab.active[data-tab="vault"]::before,
.nav-tab.active[data-tab="chronicle"]::before {
  background: #d9a8ff;
}

/* Note: the [data-tab="account"] rules were removed — settings is now reached
 * via the top-bar avatar instead of a bottom-nav tab. */
