/**
 * Abutic Dot toast — universal compact chip (top-center stack)
 */

#abutic-toast-stack {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: min(calc(100vw - 2rem), 22rem);
  pointer-events: none;
}

.abutic-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  width: 100%;
  max-width: 100%;
  padding: 0.6875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  opacity: 0;
  transform: translateY(-0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
}

.abutic-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.abutic-toast__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.abutic-toast__msg {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.abutic-toast__msg strong {
  font-weight: 700;
}

.abutic-toast__msg a {
  color: #0a66cc;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.abutic-toast--success {
  border-color: rgba(11, 95, 255, 0.22);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.97));
}

.abutic-toast--success .abutic-toast__icon {
  background: #0a66cc;
}

.abutic-toast--error {
  border-color: rgba(239, 68, 68, 0.26);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.97));
}

.abutic-toast--error .abutic-toast__icon {
  background: #dc2626;
}

.abutic-toast--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.97));
}

.abutic-toast--warning .abutic-toast__icon {
  background: #d97706;
}

.abutic-toast--info {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.abutic-toast--info .abutic-toast__icon {
  background: #475569;
}

@media (prefers-reduced-motion: reduce) {
  .abutic-toast {
    transition: none;
    transform: none;
  }

  .abutic-toast:not(.is-visible) {
    opacity: 0;
  }
}
