/* Flash toasts — notificaciones flotantes abajo a la derecha */

.flash-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 420px;
  pointer-events: none;        /* los toasts re-activan sus eventos */
}

.flash-stack > .flash-toast {
  pointer-events: auto;
}

.flash-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 0.9375rem;
  font-weight: 500;
  animation: toast-slide-in 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.flash-toast.-hiding {
  animation: toast-slide-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

.flash-toast.-success {
  border-left-color: var(--green);
}

.flash-toast.-success > .icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-dim);
  color: var(--green);
}

.flash-toast.-error {
  border-left-color: var(--red);
}

.flash-toast.-error > .icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red-dim);
  color: var(--red);
}

.flash-toast > .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.flash-toast > .text {
  flex: 1;
  color: var(--text-1);
  line-height: 1.4;
}

.flash-toast > .close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 1.375rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 120ms;
}

.flash-toast > .close:hover {
  color: var(--text-1);
}

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

@keyframes toast-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(120%); }
}

@media (max-width: 480px) {
  .flash-stack {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}
