@keyframes appAlertIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes appAlertOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.alert--visible {
  animation: appAlertIn 0.28s ease;
}

.alert--hiding {
  animation: appAlertOut 0.28s ease forwards;
}

.app-toast-stack {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  left: auto;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  align-items: flex-end;
  max-width: min(420px, calc(100vw - 2rem));
}

.app-toast {
  pointer-events: auto;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  animation: appAlertIn 0.28s ease;
}

.app-toast--hiding {
  animation: appAlertOut 0.28s ease forwards;
}

.app-toast--error,
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.app-toast--success,
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.app-toast--info,
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.app-toast--warning,
.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}
