/* keyframes, reduced-motion, loading/error states */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Transform-only: Playwright visibility treats opacity:0 as hidden for the full
   animation; starting keyframes at opacity 0 caused flaky e2e on <dialog> and toasts. */
@keyframes slideUp {
  from {
    transform: translateY(20px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    transform: translateY(8px) scale(0.98);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Results page: error & loading states */
.error-view {
  text-align: center;
  color: var(--text-secondary);
}

.error-code {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.4;
}

.error-message {
  margin-bottom: var(--space-xl);
}

.loading-text {
  color: var(--text-secondary);
}

.btn-link {
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
