/* Lightweight Toast System (Global) */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #111827; /* Texto oscuro para mejor contraste */
  background: #ffffff; /* Fondo blanco solicitado */
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: auto;
  animation: toast-slide-in .25s ease forwards;
}

/* Variante BEM (compat): si algún HTML usa clases con guión bajo, mantener mínimos */
.toast__icon { width: 22px; flex-shrink: 0; font-size: 18px; line-height: 1; }
.toast__body { flex: 1; }
.toast__title { font-weight: 800; font-size: 14px; letter-spacing: .02em; margin-bottom: 2px; }
.toast__msg { font-size: 13px; opacity: .98; }
.toast__close { cursor: pointer; background: transparent; border: 0; color: #111827; opacity: .7; font-size: 16px; line-height: 1; padding: 2px; }
.toast__close:hover { opacity: 1; }

/* Variante simple (productos.html) */
.toast-icon { width: 22px; flex-shrink: 0; font-size: 18px; line-height: 1; }
.toast-content { flex: 1; }
.toast-title { font-weight: 800; font-size: 14px; letter-spacing: .02em; margin-bottom: 2px; }
.toast-message { font-size: 13.5px; opacity: .98; line-height: 1.45; }
.toast-close { cursor: pointer; background: transparent; border: 0; color: #111827; opacity: .7; font-size: 16px; line-height: 1; padding: 2px; }
.toast-close:hover { opacity: 1; }

/* Type accents */
.toast.success, .toast--success { border-left: 4px solid #10b981; }
.toast.error,   .toast--error   { border-left: 4px solid #ef4444; }
.toast.warning, .toast--warning { border-left: 4px solid #f59e0b; }
.toast.info,    .toast--info    { border-left: 4px solid #3b82f6; }

@keyframes toast-slide-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes toast-fade-out {
  to { opacity: 0; transform: translateX(10px); }
}

/* Responsive tweaks for very small screens */
@media (max-width: 420px) {
  .toast {
    min-width: 240px;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
  }
  .toast-title {
    font-size: 14px;
  }
  .toast-message {
    font-size: 13px;
  }
}
