/* Mobile-first enhancements (non-destructive) */

/* Bottom Tab Bar for Mobile */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #2c3e50;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.mobile-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ecf0f1;
  text-decoration: none;
  font-size: 11px;
}

.mobile-bottom-nav i {
  font-size: 20px;
  margin-bottom: 4px;
}

/* Touch-friendly components */
.btn {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 16px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  min-height: 48px;
  font-size: 16px;
  padding: 10px;
}

.item-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-qty-group .btn {
  min-height: 48px;
  padding: 12px 14px;
}

.mobile-cart-toggle {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 60px;
  z-index: 1001;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

.mobile-cart-toggle .btn {
  border-radius: 8px;
}

.mobile-cart-sheet {
  transition: transform 0.25s ease-in-out;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

.mobile-item-list {
  margin-bottom: 10px;
}

.mobile-item-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-item-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-item-title {
  font-size: 16px;
  font-weight: 600;
}

.mobile-item-available {
  color: #6c757d;
  font-size: 12px;
}

.mobile-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-item-qty .mobile-card-qty {
  width: 70px;
  text-align: center;
}

.cart-row.swipe-left {
  background: #ffe6e6;
}

.mobile-stat-card .card {
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.mobile-action-card a.btn {
  border-radius: 12px;
}

.mobile-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 12px;
  margin-bottom: 12px;
}

.mobile-filter-chips .chip {
  padding: 6px 12px;
  border-radius: 16px;
  background: #f1f3f5;
  color: #2c3e50;
  text-decoration: none;
  font-size: 12px;
}

.mobile-filter-chips .chip.active {
  background: #2c3e50;
  color: #ffffff;
}

.mobile-action-bar {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 12px;
}

.mobile-action-bar .btn {
  flex: 1;
}

.rental-card {
  margin-bottom: 12px;
}

.rental-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rental-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  font-size: 13px;
}

.rental-card-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Hide desktop sidebar on mobile */
@media (max-width: 768px) {
  .side-nav {
    display: none;
  }

  .mobile-search-header {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: #ffffff;
    z-index: 1002;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .mobile-search-spacer {
    height: 80px;
  }

  .mobile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mobile-stat-grid > [class*="col-"] {
    width: 100%;
  }

  .mobile-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mobile-action-grid > [class*="col-"] {
    width: 100%;
  }

  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }

  .mobile-cart-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 70vh;
    overflow-y: auto;
    background: #ffffff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    z-index: 1000;
    padding-bottom: 10px;
  }

  body.cart-open .mobile-cart-sheet {
    transform: translateY(0);
  }

  body.cart-open .mobile-cart-toggle .toggle-caret {
    transform: rotate(180deg);
    display: inline-block;
  }

  #page-wrapper {
    margin: 0;
    padding-bottom: 70px;
  }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none;
  }

  .mobile-cart-toggle {
    display: none;
  }

  .mobile-search-spacer {
    display: none;
  }
}
