/* ==========================================================================
   Synergy Design System — Animations
   CSS-only animations for page transitions and micro-interactions.
   ========================================================================== */

/* Fade in — page content entrance */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

/* Slide in from left — sidebar mobile open */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.animate-slide-in-left {
  animation: slideInLeft var(--transition-normal) ease-out;
}

/* Slide in from right — toast notification */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-toast {
  animation: slideInRight 300ms ease-out;
}

/* Pulse dot — urgent request indicator */
@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.animate-pulse-dot {
  animation: pulseDot 2s ease-in-out infinite;
}

/* Toast progress bar shrink */
@keyframes shrinkWidth {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.animate-toast-progress {
  animation: shrinkWidth 5s linear forwards;
}

/* Loading spinner */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 0.6s linear infinite;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-slide-in-left,
  .animate-toast,
  .animate-pulse-dot,
  .animate-toast-progress {
    animation: none;
  }
}
