/* Popup notifications for the sign in / sign up pages */

.wo-auth-toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.wo-auth-toast {
  --wo-auth-accent: #6c5ce7;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 40px 14px 14px;
  background: #ffffff;
  color: #1f2430;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid var(--wo-auth-accent);
  border-radius: 14px;
  box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.35), 0 2px 8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  animation: wo-auth-toast-in 0.32s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.wo-auth-toast--success { --wo-auth-accent: #16a34a; }
.wo-auth-toast--error   { --wo-auth-accent: #dc2626; }
.wo-auth-toast--warning { --wo-auth-accent: #d97706; }
.wo-auth-toast--info    { --wo-auth-accent: #2563eb; }

.wo-auth-toast__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(108, 92, 231, 0.12);
  color: var(--wo-auth-accent);
}

.wo-auth-toast--success .wo-auth-toast__icon { background: rgba(22, 163, 74, 0.12); }
.wo-auth-toast--error .wo-auth-toast__icon   { background: rgba(220, 38, 38, 0.12); }
.wo-auth-toast--warning .wo-auth-toast__icon { background: rgba(217, 119, 6, 0.12); }
.wo-auth-toast--info .wo-auth-toast__icon    { background: rgba(37, 99, 235, 0.12); }

.wo-auth-toast__icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.wo-auth-toast__content {
  flex: 1 1 auto;
  min-width: 0;
}

.wo-auth-toast__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.wo-auth-toast__message {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
  white-space: pre-line;
  word-wrap: break-word;
}

.wo-auth-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wo-auth-toast__close:hover,
.wo-auth-toast__close:focus {
  background: rgba(15, 23, 42, 0.08);
  color: #374151;
  outline: none;
}

.wo-auth-toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--wo-auth-accent);
  opacity: 0.65;
  transform-origin: left center;
  animation-name: wo-auth-toast-progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.wo-auth-toast:hover .wo-auth-toast__progress {
  animation-play-state: paused;
}

.wo-auth-toast--hide {
  animation: wo-auth-toast-out 0.22s ease forwards;
}

@keyframes wo-auth-toast-in {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes wo-auth-toast-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
}

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

@media (max-width: 600px) {
  .wo-auth-toast-stack {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .wo-auth-toast {
    padding: 13px 36px 13px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wo-auth-toast,
  .wo-auth-toast--hide,
  .wo-auth-toast__progress {
    animation-duration: 0.01ms !important;
  }
}
