/* ═══════════════════════════════════════════════════════════
   NAV BAR
═══════════════════════════════════════════════════════════ */
.nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 157px;
  display: flex;
  align-items: center;
  padding: 0 48px;
  gap: 16px;
  background: linear-gradient(to top, rgba(12,25,29,0.98) 0%, rgba(12,25,29,0.7) 60%, transparent 100%);
  z-index: 50;
}

/* pill base */
.pill {
  height: 72px;
  border-radius: 36px;
  background: var(--pill-bg);
  display: inline-flex;
  align-items: center;
  padding: 0 28px;
  gap: 20px;
  cursor: pointer;
  white-space: nowrap;
}

/* nav text */
.nv {
  font-size: var(--body);
  font-weight: 300;
  color: var(--text-primary);
  cursor: pointer;
  padding: 12px 4px;
  margin: -12px 0;
}
.nv.dim    { color: var(--text-tertiary); }
.nv.active { color: var(--text-primary); }
.nv.accent { color: var(--accent); }

/* divider */
.dv {
  width: 1px;
  height: 20px;
  background: rgba(238,247,247,0.15);
  flex-shrink: 0;
}

/* close btn inside pill */
.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.close-btn svg { width: 16px; height: 16px; }

/* spacer */
.nav-spacer { flex: 1; }

.section-pill-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* icon buttons (favorites, settings) */
.icon-btn {
  width: 72px;
  height: 72px;
  border-radius: 36px;
  background: var(--pill-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border: 1.5px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.icon-btn.active {
  border-color: rgba(238,247,247,0.35);
  background: rgba(238,247,247,0.08);
}

/* hidden animation state */
.hidden-anim {
  opacity: 0;
  pointer-events: none;
}
.hidden-sub {
  display: none !important;
}

/* left cluster */
.left-cluster {
  position: relative;
  height: 72px;
  /* stable width so nothing shifts — wide enough for both pills */
  min-width: 600px;
  flex-shrink: 0;
}

/* All left-cluster children are absolute, overlapping at their own positions */
#pillCategory,
#topLevelWrap,
#pillSubCollapsed,
#recommendedWrap,
#genreWrap {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* Category pill and its expanded state — anchored at left:0 */
#pillCategory  { left: 0; z-index: 2; }
#topLevelWrap  { left: 0; z-index: 2; }

/* Sub pill and its expanded state — left offset set by JS on boot */
#pillSubCollapsed { z-index: 1; }
#recommendedWrap  { z-index: 1; }

/* Genre pill (third tier) — sits inline after the sub pill */
#genreWrap {
  z-index: 1;
}

/* AI button */
.ai-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  bottom: 43px;
  left: 48px;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}
.ai-glow {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 3.5px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from 0deg, var(--accent-warm), var(--accent2), transparent 60%, var(--accent-warm)) border-box;
  opacity: 0;
  transition: opacity 0.4s;
}
.ai-btn.pulse .ai-glow {
  opacity: 0.35;
  animation: aiSpin 5s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: none;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-core svg { width: 28px; height: 28px; opacity: 0.8; }

/* flight cluster */
.right-cluster {
  position: relative;
  height: 72px;
  display: flex;
  align-items: center;
}
.flight-trig,
.flight-exp {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.26s ease;
}
.flight-trig { display: flex; align-items: center; gap: 0; }
.flight-collapsed {
  height: 72px;
  border-radius: 36px;
  background: var(--pill-dark);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.flight-collapsed svg { flex-shrink: 0; }
.flight-time {
  font-size: var(--body);
  font-weight: 300;
  color: var(--text-primary);
}

/* flight expanded */
.flight-exp {
  display: flex;
  align-items: center;
}
.flight-pill-exp {
  height: 72px;
  border-radius: 36px;
  background: var(--pill-dark);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 20px;
  white-space: nowrap;
}
.fc { font-size: var(--body); font-weight: 300; color: var(--text-tertiary); }
.scrubber-track,
.flight-track-wrap {
  position: relative;
  width: 560px;
  height: 40px;
  cursor: grab;
  flex-shrink: 0;
}
.flight-track-wrap:active { cursor: grabbing; }
.flight-line-bg {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 1px;
  background: rgba(238,247,247,0.2);
  pointer-events: none;
}
.flight-line-fill {
  position: absolute;
  left: 0;
  top: 50%; transform: translateY(-50%);
  height: 1px;
  background: rgba(238,247,247,0.7);
  width: 0%;
  pointer-events: none;
  transition: width 0.05s linear;
}
.flight-plane-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.flight-plane-handle:active { cursor: grabbing; }
.scrubber-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent-warm);
  border-radius: 2px;
  pointer-events: none;
}
.scrubber-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: grab;
  z-index: 2;
}
.scrubber-handle:active { cursor: grabbing; }
.beat-marker {
  display: none;
}
.beat-marker.active {
  display: none;
}
.scrub-time {
  font-size: var(--caption);
  font-weight: 300;
  color: var(--text-tertiary);
  width: 72px;
  flex-shrink: 0;
  text-align: left;
}
.flight-close {
  font-size: var(--body);
  font-weight: 200;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.2s;
}
