/* SOVIA V50 — success toast. CSS mandiri, tanpa dependensi eksternal. */
.sovia-toast-stack {
  position: fixed;
  top: calc(76px + env(safe-area-inset-top, 0px));
  right: 22px;
  width: min(392px, calc(100vw - 32px));
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.sovia-toast {
  --sovia-toast-color: #16a34a;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: start;
  padding: 15px 14px 17px 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6eaf2;
  border-left: 4px solid var(--sovia-toast-color);
  border-radius: 14px;
  box-shadow: 0 14px 45px rgba(6, 24, 61, .16), 0 3px 10px rgba(6, 24, 61, .06);
  color: #172b4d;
  font: inherit;
  pointer-events: auto;
  animation: soviaToastEnter .25s cubic-bezier(.2,.8,.2,1) both;
}
.sovia-toast--info { --sovia-toast-color: #2563eb; }
.sovia-toast--warning { --sovia-toast-color: #d97706; }
.sovia-toast--error { --sovia-toast-color: #dc2626; }
.sovia-toast--leaving { animation: soviaToastLeave .18s ease-in forwards; }
.sovia-toast__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eaf8ef;
  color: var(--sovia-toast-color);
  flex-shrink: 0;
  font-size: 19px;
}
.sovia-toast--info .sovia-toast__icon { background: #eff6ff; }
.sovia-toast--warning .sovia-toast__icon { background: #fffbeb; }
.sovia-toast--error .sovia-toast__icon { background: #fef2f2; }
.sovia-toast__title {
  display: block;
  margin: 0 0 3px;
  color: #172b4d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}
.sovia-toast__message {
  display: block;
  margin: 0;
  color: #58677b;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-height: 8em;
  overflow-y: auto;
}
.sovia-toast__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}
.sovia-toast__close:hover, .sovia-toast__close:focus-visible {
  color: #0d2e62;
  background: #f1f5f9;
  outline-offset: 2px;
}
.sovia-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--sovia-toast-color);
  transform-origin: left;
  animation: soviaToastProgress var(--sovia-toast-duration, 4500ms) linear forwards;
  opacity: .72;
}
.sovia-toast--paused .sovia-toast__progress { animation-play-state: paused; }
@keyframes soviaToastEnter {
  from { opacity: 0; transform: translate3d(20px,-8px,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
@keyframes soviaToastLeave {
  from { opacity: 1; transform: translate3d(0,0,0); }
  to { opacity: 0; transform: translate3d(15px,-6px,0); }
}
@keyframes soviaToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@media (max-width: 767.98px) {
  .sovia-toast-stack {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: 12px;
    width: auto;
  }
  .sovia-toast {
    grid-template-columns: 36px minmax(0,1fr) 26px;
    padding: 12px 11px 15px 12px;
    gap: 9px;
    border-radius: 12px;
  }
  .sovia-toast__icon { width: 34px; height: 34px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sovia-toast, .sovia-toast--leaving { animation-duration: .01ms !important; }
  .sovia-toast__progress { animation: none !important; }
}
/* V51: perilaku bersama untuk empat jenis dan pesan panjang. */
.sovia-toast--warning .sovia-toast__icon { background: #fff7ed; }
.sovia-toast__message { overflow-wrap: break-word; word-break: normal; }
.sovia-toast { isolation: isolate; }
@media (max-width: 575.98px) {
  .sovia-toast__message { max-height: 7em; }
}
