/* ==========================================================
   modals.css — Sistema de modales y notificaciones
   ========================================================== */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,29,38,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  transform: scale(.96) translateY(12px);
  transition: transform var(--transition);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-xl { max-width: 920px; }
.modal-sm { max-width: 400px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0; background: var(--white);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 800; color: var(--gray-900); }
.modal-header-sub { display: flex; flex-direction: column; gap: 2px; }
.modal-subtitle { font-size: 0.75rem; color: var(--gray-400); font-weight: 500; }

.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--off-white); border: 1.5px solid var(--gray-200);
  color: var(--gray-400); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 0.85rem;
  transition: all var(--transition); font-weight: 700;
}
.modal-close:hover { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }

.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--gray-100);
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
  background: var(--off-white);
}

/* COMENSALES SELECTOR */
.comensales-picker {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--off-white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 6px;
  margin: 8px 0;
}
.cp-minus, .cp-plus {
  width: 44px; height: 44px; border: none; border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-700);
  font-size: 1.4rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--gray-200);
}
.cp-minus:hover, .cp-plus:hover { background: var(--brand); color: white; border-color: var(--brand); }
.cp-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem; font-weight: 700; min-width: 80px; text-align: center; color: var(--gray-900);
}
.cp-label { font-size: 0.75rem; text-align: center; color: var(--gray-400); font-weight: 600; margin-top: 4px; }

/* TOAST */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 12px 18px;
  font-size: 0.85rem; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: toastIn .22s ease;
  display: flex; align-items: center; gap: 10px; min-width: 240px;
  color: var(--gray-800);
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--blue); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
@keyframes toastIn { from { opacity:0; transform:translateX(18px); } to { opacity:1; transform:none; } }

/* CONFIG MESAS */
.config-preview {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; padding: 16px;
  background: var(--off-white); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100); margin-top: 6px;
}
.preview-table {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--green-bg); border: 2px solid var(--green-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #00a844;
}
