/* Mobile Bottom Navigation - Professional App-like Navigation */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 75px;
  }

  .mobile-bottom-nav {
    display: block;
    animation: slideUpNav 0.3s ease-out;
  }

  .mobile-bottom-nav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    max-width: 100%;
    height: 70px;
    padding: 0;
  }

  .mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666666;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    padding: 8px 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-top: 3px solid transparent;
  }

  .mobile-bottom-nav .nav-item:active {
    background-color: #f8f8f8;
  }

  .mobile-bottom-nav .nav-item.active {
    color: #007bff;
    border-top-color: #007bff;
    background-color: #f8fbff;
  }

  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
      background: #1a1a1a;
      border-top-color: #333;
    }

    .mobile-bottom-nav .nav-item {
      color: #999;
    }

    .mobile-bottom-nav .nav-item.active {
      color: #0d6efd;
    }

    .mobile-bottom-nav .nav-item:active {
      background-color: #2a2a2a;
    }
  }

  .mobile-bottom-nav .nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    display: block;
    line-height: 1;
  }

  .mobile-bottom-nav .nav-item > span:last-child {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.3px;
  }

  /* Badge Styling */
  .mobile-bottom-nav .nav-item .badge {
    position: absolute;
    top: 5px;
    right: 8px;
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
    animation: popIn 0.3s ease-out;
  }

  .mobile-bottom-nav .nav-item .badge.hide {
    display: none;
  }

  /* Ripple effect on click */
  .mobile-bottom-nav .nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.1);
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  .mobile-bottom-nav .nav-item:active::after {
    animation: ripple 0.6s ease-out;
  }

  @keyframes slideUpNav {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes popIn {
    from {
      transform: scale(0.5);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }

  @keyframes ripple {
    from {
      width: 0;
      height: 0;
    }
    to {
      width: 200px;
      height: 200px;
      opacity: 0;
    }
  }

  /* RTL Support */
  [dir="rtl"] .mobile-bottom-nav .nav-item {
    direction: rtl;
  }

  [dir="rtl"] .mobile-bottom-nav .nav-item .badge {
    right: auto;
    left: 8px;
  }
}

/* Extra small devices (phones) */
@media (max-width: 480px) {
  .mobile-bottom-nav .nav-item {
    padding: 6px 3px;
  }

  .mobile-bottom-nav .nav-item i {
    font-size: 22px;
  }

  .mobile-bottom-nav .nav-item > span:last-child {
    font-size: 9px;
  }

  .mobile-bottom-nav .nav-container {
    height: 65px;
  }

  body {
    padding-bottom: 70px;
  }
}

/* Landscape mode adjustment */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-bottom-nav .nav-container {
    height: 60px;
  }

  .mobile-bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .mobile-bottom-nav .nav-item > span:last-child {
    font-size: 9px;
  }

  body {
    padding-bottom: 60px;
  }
}
