/* src/css/pages/mesas.css */

body {
  background-color: #f8fafc !important;
  color: #111827 !important;
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
}

/* Header */
.header {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-bottom: 3px solid #E4002B !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  color: #111827 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header h2 {
  color: #111827 !important;
  font-size: 1.4rem;
  font-weight: 700;
}

.header .btn-back-global {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.header .btn-back-global:hover {
  background: #e5e7eb !important;
  color: #E4002B !important;
}

.header .user-name-small {
  color: #374151 !important;
  font-weight: 600;
}

.container h3 {
  color: #111827 !important;
}

/* Mesas Grid */
.mesas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding: 1rem 0;
}

@media (min-width: 640px) {
  .mesas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .mesas-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Table Card Base */
.mesa-btn {
  aspect-ratio: 1;
  border-radius: 1.5rem;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mesa-btn:active {
  transform: scale(0.96);
}

/* Mesa Libre */
.mesa-libre {
  border-color: #e5e7eb !important;
}

.mesa-libre:hover {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.15) !important;
  transform: translateY(-4px);
}

/* Mesa Ocupada */
.mesa-ocupada {
  border-color: #fecaca !important;
}

.mesa-ocupada:hover {
  border-color: #E4002B !important;
  background: #fef2f2 !important;
  box-shadow: 0 12px 30px rgba(228, 0, 43, 0.15) !important;
  transform: translateY(-4px);
}

/* Animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.mesa-number {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.2rem;
}

.mesa-nombre-custom {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151 !important;
  margin-bottom: 0.4rem;
}

.mesa-libre .mesa-number { 
  color: #111827 !important; 
}

.mesa-ocupada .mesa-number { 
  color: #dc2626 !important; 
}

.mesa-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mesa-libre .mesa-badge {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

.mesa-ocupada .mesa-badge {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.mesa-waiter {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #6b7280 !important;
  font-weight: 500;
}

/* Quantity Adjustment / Edit Buttons */
.btn-cant-edit {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  min-width: 28px;
  height: 28px;
}

.btn-cant-edit:hover {
  background-color: #fee2e2 !important;
  border-color: #E4002B !important;
  color: #E4002B !important;
}

/* Card de Redirección (Azul Sutil en Grid) */
.mesa-menu-redirect-btn {
  aspect-ratio: 1;
  border-radius: 1.5rem;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff !important;
  border: 1px solid #bfdbfe !important;
  color: #1e40af !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mesa-menu-redirect-btn:hover {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15) !important;
  transform: translateY(-4px);
}

.mesa-menu-redirect-btn:active {
  transform: scale(0.96);
}

.mesa-menu-redirect-icon {
  font-size: 2.2rem;
  color: #2563eb !important;
  margin-bottom: 0.3rem;
  transition: transform 0.3s ease;
}

.mesa-menu-redirect-btn:hover .mesa-menu-redirect-icon {
  transform: scale(1.1);
  color: #1d4ed8 !important;
}

.mesa-menu-redirect-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a8a !important;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 0.2rem;
}

.mesa-menu-redirect-btn .mesa-badge {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  margin-top: 0.5rem;
}

/* Modals styling for mesas page */
.drawer-overlay .card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.drawer-overlay .card h3 {
  color: #111827 !important;
}

.drawer-overlay .card .form-control {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

.drawer-overlay #editMesaPedidoItemsContainer {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.drawer-overlay .btn-secondary {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}

.drawer-overlay .btn-secondary:hover {
  background: #e5e7eb !important;
  color: #111827 !important;
}
