/* My Custom Styles */

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom); /* iOS Safe Area */
}

.mobile-bottom-nav__item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.mobile-bottom-nav__item.active {
  color: #0d6efd; /* Bootstrap Primary */
}

.mobile-bottom-nav__item-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
  display: block;
}

/* Mobile Specific Optimizations */
@media (max-width: 767.98px) {
  /* Show Bottom Nav */
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  /* Adjust main content padding to prevent overlap with bottom nav */
  body {
    padding-bottom: 70px;
  }

  /* Hide Footer specific elements if too cluttered */
  footer p {
    margin-bottom: 0;
  }

  /* Modern Card Styling for Lists on Mobile */
  .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 1rem;
  }

  /* Bigger Buttons for Touch */
  .btn {
    padding: 0.5rem 1rem;
    min-height: 44px; /* Apple Human Interface Guidelines */
  }

  /* Offcanvas styling - Mobile Only */
  .offcanvas.text-bg-dark {
    background: #1a1d20 !important; /* Darker, solid background for better contrast */
    color: #f8f9fa;
  }

  .offcanvas-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
  }
  
  .offcanvas-body {
    padding: 1.5rem;
  }

  .offcanvas-title {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
  }

  .offcanvas-body .nav-link {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.2rem;
    transition: all 0.2s ease;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9) !important; /* Bright text */
    font-weight: 500;
  }

  .offcanvas-body .nav-link i {
    color: #6ea8fe; /* Lighter Blue accent for icons */
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    transition: transform 0.2s;
  }

  .offcanvas-body .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    padding-left: 1.2rem;
  }
  
  .offcanvas-body .nav-link:hover i {
    transform: scale(1.1);
    color: #fff;
  }

  /* Dropdown inside offcanvas */
  .offcanvas-body .dropdown-menu {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 1rem;
    box-shadow: none;
    padding: 0.5rem;
    margin-top: 0.25rem;
  }

  .offcanvas-body .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1rem;
    border-radius: 6px;
  }

  .offcanvas-body .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }
  
  /* Input search styling - Keep standard white for contrast */
  .offcanvas-body .input-group .btn-outline-light {
      border-color: rgba(255, 255, 255, 0.4);
      color: rgba(255, 255, 255, 0.9);
  }
  
  .offcanvas-body .input-group .btn-outline-light:hover {
      background-color: #fff;
      color: #000;
  }
}

/* Enhancing Tables on Mobile */
@media (max-width: 576px) {
  .table-mobile-card thead {
    display: none;
  }

  .table-mobile-card tr {
    display: block;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 15px;
  }

  .table-mobile-card td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 5px 0;
    text-align: right;
  }

  .table-mobile-card td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    text-align: left;
  }
}
