/* Mobile Navigation Styles */

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 10px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
  background: #f8f9fa;
  transform: scale(1.05);
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #333;
  margin: 4px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e9ecef;
  padding: 8px 0;
  z-index: 998;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}

.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #6c757d;
  padding: 8px 12px;
  min-width: 64px;
  transition: all 0.2s ease;
}

.mobile-bottom-nav-item:active {
  transform: scale(0.95);
}

.mobile-bottom-nav-item.active {
  color: #3498db;
}

.mobile-bottom-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.mobile-bottom-nav-label {
  font-size: 11px;
  font-weight: 500;
}

/* Responsive breakpoints for mobile navigation */
@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: block;
  }

  .mobile-nav-overlay {
    display: block;
  }

  .mobile-bottom-nav {
    display: block;
  }

  /* Adjust main content for mobile navigation */
  .main-content {
    padding-top: 70px; /* Space for mobile header */
    padding-bottom: 70px; /* Space for bottom navigation */
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Hide desktop sidebar on mobile */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.mobile-active {
    transform: translateX(0);
    z-index: 1000;
  }

  /* Adjust top bar for mobile */
  .top-bar {
    margin-top: 10px;
    padding: 8px 16px;
    position: relative;
    top: auto;
  }

  /* Optimize content area for mobile */
  .content-area {
    padding: 16px;
    margin: 0 8px 16px 8px;
    border-radius: 12px;
  }
}

/* Extra small devices optimization */
@media (max-width: 576px) {
  .mobile-nav-toggle {
    top: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
    padding: 8px;
  }

  .mobile-bottom-nav-item {
    min-width: 56px;
    padding: 6px 8px;
  }

  .mobile-bottom-nav-icon {
    font-size: 20px;
  }

  .mobile-bottom-nav-label {
    font-size: 10px;
  }

  .content-area {
    padding: 12px;
    margin: 0 4px 12px 4px;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 900px) and (orientation: landscape) {
  .mobile-bottom-nav {
    padding: 4px 0;
  }

  .mobile-bottom-nav-item {
    padding: 4px 8px;
  }

  .mobile-bottom-nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .main-content {
    padding-bottom: 60px;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes */
  .mobile-nav-toggle,
  .mobile-bottom-nav-item,
  .sidebar-btn,
  .btn {
    -webkit-tap-highlight-color: transparent;
  }

  /* Add touch feedback */
  .mobile-nav-toggle:active {
    background: #e9ecef;
  }

  .mobile-bottom-nav-item:active {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
  }
}
