/* =========================================================
   Toast aksi (feedback PRG) — popup pojok kanan bawah.
   Sengaja BEDA dari notifikasi (lonceng) & alert inline validasi.
   Dipakai bersama: public / terapis / admin.
   ========================================================= */

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #181715;
  color: #faf9f5;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 12px 40px rgba(20, 20, 19, 0.22);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.is-in { opacity: 1; transform: translateY(0) scale(1); }
.toast.is-out { opacity: 0; transform: translateY(14px) scale(0.98); }

.toast__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.toast__icon svg { width: 16px; height: 16px; }
.toast--success .toast__icon { background: rgba(93, 184, 114, 0.18); color: #7dd69a; }
.toast--error   .toast__icon { background: rgba(198, 69, 69, 0.2);  color: #ff9b9b; }
.toast--warning .toast__icon { background: rgba(212, 160, 23, 0.2); color: #f2c94c; }
.toast--info    .toast__icon { background: rgba(58, 110, 165, 0.22); color: #8fb8e6; }

.toast__msg { flex: 1; min-width: 0; padding-top: 1px; }

.toast__close {
  flex-shrink: 0;
  background: none;
  border: 0;
  color: rgba(250, 249, 245, 0.55);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.1rem;
  -webkit-tap-highlight-color: transparent;
}
.toast__close:hover { color: #faf9f5; }

@media (max-width: 480px) {
  .toast-stack { left: 1rem; right: 1rem; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.01ms; }
}
