/**
 * ============================================
 * Bottom Navigation Bar - CSS
 * ============================================
 * סרגל ניווט תחתון מודרני למובייל
 * מחליף את תפריט ההמבורגר העליון
 */

/* ============================================
   Bottom Nav Container
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-bottom-nav, 1001);

  /* Safe Area for iPhone X+ */
  padding-bottom: env(safe-area-inset-bottom);

  /* Glass effect */
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  /* Border */
  border-top: 1px solid rgba(192, 192, 192, 0.1);

  /* Shadow */
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);

  /* Transition */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hidden state - slides down */
.bottom-nav.hidden {
  transform: translateY(100%);
}

/* ============================================
   Nav Items Container
   ============================================ */
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Nav Item
   ============================================ */
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;

  /* Touch target size */
  min-width: 64px;
  min-height: 48px;
  padding: 0.5rem;

  /* Remove button styles */
  background: none;
  border: none;
  cursor: pointer;

  /* Text */
  color: var(--color-text-secondary, #94A3B8);
  font-family: var(--font-family-body, 'Assistant', sans-serif);
  font-size: 0.75rem;
  font-weight: 400;
  text-decoration: none;

  /* Transition */
  transition: all 0.3s ease;

  /* Accessibility */
  position: relative;
}

/* Icon - Font Awesome */
.bottom-nav-item i {
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

/* Hover state */
.bottom-nav-item:hover {
  color: var(--color-primary-silver, #C0C0C0);
}

.bottom-nav-item:hover i {
  transform: translateY(-2px);
}

/* WhatsApp item special styling */
.bottom-nav-item.whatsapp-item {
  color: #25D366;
}

.bottom-nav-item.whatsapp-item:hover {
  color: #1FA855;
}

.bottom-nav-item.whatsapp-item i {
  color: #25D366;
}

.bottom-nav-item.whatsapp-item:hover i {
  color: #1FA855;
  transform: translateY(-2px) scale(1.1);
}

/* Active state */
.bottom-nav-item.active {
  color: var(--color-primary-silver, #C0C0C0);
}

.bottom-nav-item.active i {
  color: var(--color-gold-champagne, #C9A961);
}

/* Active indicator */
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-primary-silver, #C0C0C0),
    var(--color-gold-champagne, #C9A961)
  );
  border-radius: 0 0 3px 3px;
}

/* Focus state */
.bottom-nav-item:focus {
  outline: 3px solid var(--focus-outline-color, #38BDF8);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ============================================
   Badge (notification indicator)
   ============================================ */
.bottom-nav-item .badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  min-width: 18px;
  height: 18px;
  padding: 0 0.25rem;

  background: var(--color-accent-red, #EF4444);
  color: #FFFFFF;

  font-size: 0.625rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;

  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ============================================
   Hide on Desktop
   ============================================ */
@media (min-width: 1025px) {
  .bottom-nav {
    display: none;
  }
}

/* ============================================
   Tablet adjustments
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .bottom-nav-items {
    max-width: 768px;
    padding: 1rem 2rem;
  }

  .bottom-nav-item {
    min-width: 80px;
    font-size: 0.875rem;
  }

  .bottom-nav-item i {
    font-size: 1.75rem;
  }
}

/* ============================================
   Mobile specific
   ============================================ */
@media (max-width: 768px) {
  /* Add bottom padding to body to prevent content hiding */
  body.has-bottom-nav {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  /* Smaller items on very small screens */
  @media (max-width: 360px) {
    .bottom-nav-item {
      min-width: 56px;
      gap: 0.125rem;
    }

    .bottom-nav-item i {
      font-size: 1.25rem;
    }

    .bottom-nav-item {
      font-size: 0.625rem;
    }
  }
}

/* ============================================
   Dark/Light mode compatibility
   ============================================ */
body.light-mode .bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(15, 23, 42, 0.1);
}

body.light-mode .bottom-nav-item {
  color: var(--color-text-secondary, #64748B);
}

body.light-mode .bottom-nav-item:hover,
body.light-mode .bottom-nav-item.active {
  color: var(--color-navy-deep, #0A2540);
}

/* ============================================
   High contrast mode
   ============================================ */
body.high-contrast .bottom-nav {
  background: #000000;
  border-top: 3px solid #FFFFFF;
}

body.high-contrast .bottom-nav-item {
  color: #FFFFFF;
}

body.high-contrast .bottom-nav-item.active::before {
  height: 4px;
  background: #FFFFFF;
}

/* ============================================
   No animations mode
   ============================================ */
body.no-animations .bottom-nav,
body.no-animations .bottom-nav-item,
body.no-animations .bottom-nav-item .icon {
  transition: none !important;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
  .bottom-nav {
    display: none;
  }
}
