/**
 * Notifications toast ARINWA
 */
.arinwa-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.arinwa-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1rem 0.85rem;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  position: relative;
  transform: translateX(110%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.arinwa-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.arinwa-toast.is-leaving {
  transform: translateX(110%);
  opacity: 0;
}

.arinwa-toast__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.arinwa-toast__icon svg {
  width: 20px;
  height: 20px;
}

.arinwa-toast--success .arinwa-toast__icon {
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
}

.arinwa-toast--error .arinwa-toast__icon {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}

.arinwa-toast--warning .arinwa-toast__icon {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.arinwa-toast--info .arinwa-toast__icon {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.arinwa-toast__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.arinwa-toast__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.arinwa-toast__message {
  font-size: 0.84rem;
  color: #475569;
  margin: 0;
  line-height: 1.45;
  word-break: break-word;
}

.arinwa-toast__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -0.15rem -0.25rem 0 0;
  transition: background 0.15s, color 0.15s;
}

.arinwa-toast__close:hover {
  background: #f1f5f9;
  color: #334155;
}

.arinwa-toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  animation: arinwa-toast-progress linear forwards;
}

.arinwa-toast--success .arinwa-toast__progress { background: #15803d; }
.arinwa-toast--error .arinwa-toast__progress { background: #b91c1c; }
.arinwa-toast--warning .arinwa-toast__progress { background: #d97706; }
.arinwa-toast--info .arinwa-toast__progress { background: #2563eb; }

.arinwa-toast--paused .arinwa-toast__progress {
  animation-play-state: paused;
}

@keyframes arinwa-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 575.98px) {
  .arinwa-toast-stack {
    top: auto;
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .arinwa-toast {
    transform: translateY(110%);
  }

  .arinwa-toast.is-visible {
    transform: translateY(0);
  }

  .arinwa-toast.is-leaving {
    transform: translateY(110%);
  }
}
