/* ============================================
   thynkLab - Bottom Navigation
   Floating bottom nav bar (mobile-first design)
   ============================================ */

/* ============================================
   BOTTOM NAV CONTAINER
   ============================================ */

.bottom-nav {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-fixed);
  width: calc(100% - var(--space-xl));
  max-width: 420px;
  padding: var(--space-sm) var(--space-md);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* ============================================
   NAV ITEMS CONTAINER
   ============================================ */

.bottom-nav-items {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--space-sm);
}

/* ============================================
   INDIVIDUAL NAV ITEM
   ============================================ */

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--color-text-muted);
  flex: 1;
  min-width: 60px;
}

.nav-item:hover {
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

/* Active State */
.nav-item.active {
  color: var(--color-accent-cyan);
  background: rgba(0, 217, 255, 0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: slideInDown 0.3s ease;
}

/* ============================================
   NAV ICON
   ============================================ */

.nav-icon {
  font-size: var(--text-xl);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.nav-item:hover .nav-icon {
  transform: translateY(-2px) scale(1.1);
}

.nav-item.active .nav-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px currentColor);
}

/* Icon Animation on Active */
@keyframes iconPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1.2);
  }
}

.nav-item.active .nav-icon {
  animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   NAV LABEL
   ============================================ */

.nav-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.nav-item.active .nav-label {
  font-weight: var(--font-bold);
}

/* Hide labels on very small screens */
@media (max-width: 380px) {
  .nav-label {
    display: none;
  }
  
  .nav-item {
    padding: var(--space-sm);
    min-width: 48px;
  }
}

/* ============================================
   NOTIFICATION BADGE ON NAV ITEM
   ============================================ */

.nav-item-badge {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  min-width: 18px;
  height: 18px;
  padding: 0 var(--space-xs);
  background: var(--color-accent-pink);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--font-bold);
  border: 2px solid var(--color-bg-primary);
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   CENTER ACTION BUTTON (Optional - FAB style)
   ============================================ */

.nav-fab {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  cursor: pointer;
  border: 3px solid var(--color-bg-primary);
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.4);
  transition: all var(--transition-base);
}

.nav-fab:hover {
  transform: translateX(-50%) translateY(-4px) scale(1.1);
  box-shadow: 0 12px 40px rgba(0, 217, 255, 0.6);
}

.nav-fab:active {
  transform: translateX(-50%) translateY(-2px) scale(1.05);
}

/* Pulsing effect on FAB */
.nav-fab::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  z-index: -1;
  opacity: 0;
  animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.2);
  }
}

/* ============================================
   GLOW EFFECT ON HOVER
   ============================================ */

.nav-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.3), transparent);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
  pointer-events: none;
}

.nav-item:hover::after {
  width: 100px;
  height: 100px;
  opacity: 1;
}

.nav-item.active::after {
  width: 120px;
  height: 120px;
  opacity: 0.5;
}

/* ============================================
   RIPPLE EFFECT ON CLICK
   ============================================ */

.nav-item-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 217, 255, 0.5);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ============================================
   HIDE ON DESKTOP (Optional - show different nav)
   ============================================ */

@media (min-width: 1024px) {
  .bottom-nav {
    /* You can choose to hide on desktop */
    /* display: none; */
    
    /* Or keep it and adjust styling */
    max-width: 600px;
  }
}

/* ============================================
   BOTTOM NAV VARIANTS
   ============================================ */

/* Compact Version */
.bottom-nav.compact {
  padding: var(--space-sm) var(--space-md);
}

.bottom-nav.compact .nav-item {
  padding: var(--space-xs) var(--space-sm);
}

.bottom-nav.compact .nav-icon {
  font-size: var(--text-xl);
}

.bottom-nav.compact .nav-label {
  font-size: 10px;
}

/* Expanded Version (with labels always visible) */
.bottom-nav.expanded {
  max-width: 700px;
}

.bottom-nav.expanded .nav-item {
  flex-direction: row;
  padding: var(--space-md) var(--space-lg);
  gap: var(--space-md);
}

.bottom-nav.expanded .nav-label {
  font-size: var(--text-sm);
}

/* Minimal Version (icons only) */
.bottom-nav.minimal .nav-label {
  display: none;
}

.bottom-nav.minimal .nav-item {
  padding: var(--space-md);
}

/* ============================================
   FLOATING EFFECT
   ============================================ */

.bottom-nav.floating {
  animation: floatSlow 6s ease-in-out infinite;
}

/* ============================================
   GLASS EFFECT VARIANT
   ============================================ */

.bottom-nav.glass {
  background: rgba(20, 20, 31, 0.4);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(0, 217, 255, 0.2);
}

/* ============================================
   HIDE ON SCROLL DOWN
   ============================================ */

.bottom-nav.hide {
  transform: translateX(-50%) translateY(150px);
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   TOOLTIP ON HOVER (Optional)
   ============================================ */

.nav-item-tooltip {
  position: absolute;
  bottom: calc(100% + var(--space-sm));
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
  z-index: 1;
}

.nav-item:hover .nav-item-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Tooltip arrow */
.nav-item-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-bg-secondary);
}

/* ============================================
   SPECIAL INTERACTIONS
   ============================================ */

/* Long Press Effect */
.nav-item.pressing {
  transform: scale(0.9);
  background: rgba(0, 217, 255, 0.2);
}

/* Magnetic Effect (cursor attraction) */
@media (hover: hover) and (pointer: fine) {
  .nav-item.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.nav-item:focus {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 2px;
}

.nav-item:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 480px) {
  .bottom-nav {
    bottom: var(--space-md);
    width: calc(100% - var(--space-lg));
    padding: var(--space-sm) var(--space-md);
  }
  
  .nav-item {
    padding: var(--space-sm);
  }
  
  .nav-icon {
    font-size: var(--text-xl);
  }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bottom-nav {
    bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
  }
  
  .nav-item {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .nav-label {
    display: none;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .bottom-nav {
    max-width: 600px;
  }
  
  .nav-item {
    padding: var(--space-md) var(--space-lg);
  }
}

/* ============================================
   SAFE AREA (for devices with notches)
   ============================================ */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  }
}

/* ============================================
   DARK MODE OVERRIDE (if needed)
   ============================================ */

@media (prefers-color-scheme: light) {
  /* Light mode adjustments if you ever add a light theme */
  .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
  }
}

/* Enhanced Theme Matching */
.bottom-nav {
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid rgba(0, 217, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 217, 255, 0.15);
}

.nav-item {
  min-width: 50px;
}

.nav-item.active {
  background: rgba(0, 217, 255, 0.15);
  border: 1px solid rgba(0, 217, 255, 0.3);
}

.nav-item.active .nav-icon {
  color: var(--color-accent-cyan);
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.nav-item.active .nav-label {
  color: var(--color-accent-cyan);
}