/* ==============================
   TOAST — compatible con tu JS actual
   ============================== */

#iu-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999999;
  width: min(390px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.iu-toast {
  --iu-color: #2563eb;
  --iu-soft: #eaf2ff;

  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;

  background: #fff;
  color: #334155;
  border: 1px solid #e5eaf1;
  border-left: 4px solid var(--iu-color);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(25, 49, 77, .14);

  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  pointer-events: auto;
  animation: iuToastEnter .25s ease-out both;
}

.iu-toast::before {
  content: "i";
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--iu-soft);
  color: var(--iu-color);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.iu-toast.success {
  --iu-color: #16803d;
  --iu-soft: #e9f8ee;
}

.iu-toast.success::before {
  content: "✓";
}

.iu-toast.error {
  --iu-color: #dc3545;
  --iu-soft: #fff0f1;
}

.iu-toast.error::before {
  content: "!";
}

.iu-toast.warn {
  --iu-color: #b86b0b;
  --iu-soft: #fff5e5;
}

.iu-toast.warn::before {
  content: "!";
}

.iu-toast.info {
  --iu-color: #2563eb;
  --iu-soft: #eaf2ff;
}

@keyframes iuToastEnter {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 576px) {
  #iu-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iu-toast {
    animation: none;
  }
}