/* Estilos propios de la tienda (cuentas de cliente) — no comparte reglas con
   el checkout de invitado, que sigue usando solo styles.css/carrito.css. */

/* Mismo degradado que el botón "Agregar al carrito" (.btn-agregar-carrito en
   carrito.css), para que la barra se lea como parte del mismo sistema visual.
   Si ahí se cambia el degradado, cambiarlo también acá. */
.tienda-barra-cuenta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* Los enlaces y el botón de salir quedan como botoncitos sobre el degradado:
   blancos translúcidos para no competir con el botón sólido del producto. */
.tienda-barra-cuenta a,
.tienda-barra-cuenta button {
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 12px;
  transition: background 0.2s;
}

.tienda-barra-cuenta a:hover,
.tienda-barra-cuenta button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.tienda-barra-cuenta a:focus-visible,
.tienda-barra-cuenta button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.tienda-pagina {
  max-width: 640px;
  margin: 30px auto;
  padding: 0 16px;
}

.tienda-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.tienda-pedidos-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tienda-pedido-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tienda-pedido-estado {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #eee;
}

.tienda-pedido-estado.creado { background: #fff3cd; }
.tienda-pedido-estado.pagado,
.tienda-pedido-estado.confirmado { background: #cfe2ff; }
.tienda-pedido-estado.asignado,
.tienda-pedido-estado.preparado { background: #d1ecf1; }
.tienda-pedido-estado.entregado { background: #d4edda; }
.tienda-pedido-estado.cancelado { background: #f8d7da; }

.tienda-mensaje {
  margin-top: 10px;
  font-size: 0.9rem;
}

.tienda-mensaje.ok { color: #146c2e; }
.tienda-mensaje.error { color: #b02a37; }

/* --- Tienda abierta: barra anónima, aviso de verificación y modal de login --- */

.tienda-barra-texto {
  margin-right: auto;
}

.tienda-aviso-verificacion {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: #fff3cd;
  color: #7a5c00;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0e0a8;
}

.tienda-aviso-verificacion.error {
  background: #f8d7da;
  color: #b02a37;
  border-bottom-color: #f1b7bd;
}

.tienda-aviso-verificacion button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: inherit;
  padding: 3px 10px;
}

.tienda-aviso-verificacion button:disabled {
  opacity: 0.6;
  cursor: default;
}

.tienda-reenvio-resultado {
  font-size: 0.85rem;
}

/* Modal de login embebido en el checkout */
.tienda-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tienda-modal-content {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tienda-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tienda-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.tienda-modal-texto {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #555;
}

.tienda-modal-content .btn {
  width: 100%;
}

.tienda-modal-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
