/* ==========================================================================
   Mental Health Score — Micro-Interactions & Animation Styles
   ========================================================================== */

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px #f97316;
  }
  50% {
    opacity: 0.6;
    transform: scale(1.15);
    box-shadow: 0 0 16px #f97316;
  }
}

@keyframes pulseBig {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 24px rgba(234, 88, 12, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 45px rgba(234, 88, 12, 0.75);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.animate-fade-in {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.shake-error {
  animation: cardShake 0.4s ease;
}

@keyframes shakeHighlight {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-5px);
  }
  40%, 80% {
    transform: translateX(5px);
  }
}

.shake-highlight {
  animation: shakeHighlight 0.45s ease;
  border-color: #ea580c !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.35), 0 8px 24px rgba(234, 88, 12, 0.15) !important;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
