/* Popup Stall Manager - Tablet-Optimized Styles */

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 18px;
  }
}

/* Tablet-Optimized Base Styles */
body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

/* Large Touch Targets (minimum 44px) */
.btn {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 1.1rem;
  margin: 8px 4px;
  border-radius: 8px;
  font-weight: 500;
}

.btn-lg {
  min-height: 60px;
  padding: 16px 32px;
  font-size: 1.3rem;
}

.form-control {
  min-height: 48px;
  padding: 12px 16px;
  font-size: 1.1rem;
  border-radius: 8px;
}

.form-select {
  min-height: 48px;
  padding: 12px 16px;
  font-size: 1.1rem;
}

/* Navigation optimized for tablets */
.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-link {
  padding: 12px 20px !important;
  font-size: 1.1rem;
  margin: 0 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Card Styles for better touch interaction */
.card {
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  border: none;
}

.card-header {
  background-color: #ffffff;
  border-bottom: 2px solid #e9ecef;
  padding: 20px;
  font-weight: 600;
  font-size: 1.2rem;
}

.card-body {
  padding: 24px;
}

/* Order Entry Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.menu-item-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.menu-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-item-card.selected {
  background-color: #e3f2fd;
  border: 2px solid #2196f3;
}

.menu-item-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.menu-item-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: #4caf50;
  margin-bottom: 12px;
}

.menu-item-partner {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.quantity-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: #2196f3;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.quantity-btn:hover {
  background-color: #1976d2;
}

.quantity-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.quantity-display {
  font-size: 1.3rem;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
  padding: 8px;
  background-color: #f5f5f5;
  border-radius: 6px;
}

/* Dashboard Styles */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.dashboard-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-card h3 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.dashboard-card p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

.dashboard-card.revenue {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.dashboard-card.tax {
  background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
}

.dashboard-card.orders {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.dashboard-card.partners {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.dashboard-card.items {
  background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

/* Table Styles for Reports */
.table-responsive {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
  padding: 16px;
  border-top: none;
}

.table td {
  padding: 16px;
  vertical-align: middle;
}

/* Status Badges */
.status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

/* Alert Styles */
.alert {
  border-radius: 8px;
  padding: 16px 24px;
  font-size: 1.1rem;
  margin: 16px 0;
}

/* Focus styles for accessibility */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
  outline: none;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
    margin: 8px 0;
  }
  
  .card-body {
    padding: 16px;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Additional form styles */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navigation Menu Visibility Fix */
.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #e3f2fd !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.navbar-nav .dropdown-toggle::after {
  border-top-color: #ffffff !important;
}

.navbar-brand {
  color: #ffffff !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar-nav .dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  border-radius: 8px;
  padding: 8px 0;
}

.navbar-nav .dropdown-item {
  color: #212529 !important;
  padding: 8px 20px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
  background-color: #f8f9fa !important;
  color: #0d6efd !important;
}

.navbar-nav .dropdown-item i {
  color: #6c757d;
  width: 20px;
}

.navbar-nav .dropdown-item:hover i,
.navbar-nav .dropdown-item:focus i {
  color: #0d6efd !important;
}

.navbar-nav .dropdown-divider {
  border-top: 1px solid #dee2e6;
  margin: 8px 0;
}