/* ==========================================================
   🧾 MODALES UNIFICADOS — Las Glorias de la Cocina
   Aplica el mismo estilo a todos los pasos del pedido
   ========================================================== */

/* Fondo oscuro del modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Caja blanca del modal */
.modal-backdrop .modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 480px;
  
  /* 🔥 Habilitar scroll y corregir estructura flex */
  display: flex;                 
  flex-direction: column;        
  max-height: 90vh;              
  overflow-y: auto;              
  -webkit-overflow-scrolling: touch;

  font-family: 'Poppins', system-ui, sans-serif;
  animation: slideIn 0.25s ease;
}


@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Encabezado (rojo/naranja) */
.modal-backdrop .modal header {
  background: linear-gradient(90deg, #b91c1c, #f59e0b);
  color: #fff;
  text-align: center;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 600;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

/* Contenido del modal */
.modal-backdrop .modal .content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-backdrop label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
  color: #333;
}

.modal-backdrop input,
.modal-backdrop select,
.modal-backdrop textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-backdrop input:focus,
.modal-backdrop select:focus,
.modal-backdrop textarea:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  outline: none;
}

/* Pie de botones */
.modal-backdrop .actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 20px;
  background: #fafafa;
}

.modal-backdrop .actions .button {
  flex: 1;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 10px;
  transition: all 0.25s ease;
}

/* Colores botones */
.button-danger {
  background: #dc2626;
  color: #fff;
}
.button-danger:hover {
  background: #b91c1c;
}

.button-primary {
  background: #16a34a;
  color: #fff;
}
.button-primary:hover {
  background: #15803d;
}

/* Texto auxiliar */
.modal-backdrop .content .lead {
  font-size: 13px;
  color: #777;
  margin-top: 8px;
  text-align: center;
}

/* Lista del resumen */
#resumen-list-final {
  list-style: none;
  margin: 0;
  padding: 0;
}
#resumen-list-final li {
  border-bottom: 1px solid #eee;
  padding: 6px 0;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
  .modal-backdrop .modal {
    max-width: 94%;
  }
}


/* ==========================================================
   🎨 Ajuste: Botones dorados SOLO en las opciones del modal
   ========================================================== */

/* Solo afecta los botones dentro de la zona de opciones (content) */
#modal-agregar-backdrop .content .button-gold,
#modal-agregar-backdrop .content .button-primary {
  background: #facc15;       /* Amarillo dorado */
  color: #000;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease, background 0.2s ease;
}

#modal-agregar-backdrop .content .button-gold:hover,
#modal-agregar-backdrop .content .button-primary:hover {
  background: #eab308;       /* Tono más oscuro al pasar el mouse */
  transform: scale(1.03);
}

/* Línea separadora arriba del pie del modal */
#modal-agregar-backdrop .actions {
  border-top: 1px solid #eee;
  padding-top: 16px;
}



/* 🔥 Scroll vertical dentro del modal en móviles */
#modal-cliente-backdrop .modal {
  max-height: 90vh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

/* 🔥 Scroll real en el contenido del modal */
#modal-cliente-backdrop .modal .content {
  max-height: calc(90vh - 140px); /* header + botones */
  overflow-y: auto;
  padding-right: 8px;  /* evita que tape el scroll */
  -webkit-overflow-scrolling: touch;
}

