/* Mobile Bottom Navigation - Touch-optimized styles */

/* Main container with safe area handling */
.mobile-bottom-nav-container {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important; /* Higher than everything else */
  background-color: var(--mantine-color-white) !important;
  border-top: 1px solid var(--mantine-color-gray-3);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Horizontal scroll container */
.mobile-bottom-nav-scroll {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  gap: 4px;
  padding: 8px 8px;
}

/* Hide scrollbar for Chrome, Safari, Opera */
.mobile-bottom-nav-scroll::-webkit-scrollbar {
  display: none;
}

/* Individual nav item */
.mobile-bottom-nav-item {
  flex: 0 0 auto;
  min-width: 64px;
  max-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

/* Active state */
.mobile-bottom-nav-item.active {
  background-color: var(--mantine-color-blue-1);
}

.mobile-bottom-nav-item.active .mobile-bottom-nav-icon,
.mobile-bottom-nav-item.active .mobile-bottom-nav-label {
  color: var(--mantine-color-blue-7);
}

/* Inactive state */
.mobile-bottom-nav-item:not(.active) .mobile-bottom-nav-icon,
.mobile-bottom-nav-item:not(.active) .mobile-bottom-nav-label {
  color: var(--mantine-color-gray-6);
}

/* Icon wrapper */
.mobile-bottom-nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label */
.mobile-bottom-nav-label {
  font-size: 13px !important;
  font-weight: 400 !important;
  margin-top: 3px !important;
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

.mobile-bottom-nav-item.active .mobile-bottom-nav-label {
  font-weight: 500 !important;
}

/* Badge */
.mobile-bottom-nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* More button - fixed on right */
.mobile-bottom-nav-more {
  flex: 0 0 auto;
  min-width: 56px;
  background-color: var(--mantine-color-white);
  border-left: 1px solid var(--mantine-color-gray-2);
  margin-left: auto;
  padding-left: 8px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav-scroll {
    scroll-behavior: auto;
  }

  .mobile-bottom-nav-item {
    transition: none;
  }
}

/* Dark mode support */
[data-mantine-color-scheme="dark"] .mobile-bottom-nav-container {
  background-color: var(--mantine-color-dark-7);
  border-top-color: var(--mantine-color-dark-4);
}

[data-mantine-color-scheme="dark"] .mobile-bottom-nav-item.active {
  background-color: var(--mantine-color-dark-5);
}

[data-mantine-color-scheme="dark"] .mobile-bottom-nav-item:not(.active) .mobile-bottom-nav-icon,
[data-mantine-color-scheme="dark"] .mobile-bottom-nav-item:not(.active) .mobile-bottom-nav-label {
  color: var(--mantine-color-dark-2);
}

[data-mantine-color-scheme="dark"] .mobile-bottom-nav-more {
  background-color: var(--mantine-color-dark-7);
  border-left-color: var(--mantine-color-dark-4);
}
