/* ============================================================
   MOYSIZ Animations
   Enterprise Platform Animation System
   ============================================================ */

/* ---------- Keyframes ---------- */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

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

/* ---------- Animation Utility Classes ---------- */

.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-default) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp var(--duration-normal) var(--ease-default) forwards;
}

.animate-fade-in-down {
  animation: fadeInDown var(--duration-normal) var(--ease-default) forwards;
}

.animate-slide-in-right {
  animation: slideInRight var(--duration-normal) var(--ease-default) forwards;
}

.animate-scale-in {
  animation: scaleIn var(--duration-normal) var(--ease-default) forwards;
}

.animate-pulse {
  animation: pulse 2s var(--ease-default) infinite;
}

.animate-status-pulse {
  animation: statusPulse 2s var(--ease-default) infinite;
}

.animate-shimmer {
  background: var(--bg-skeleton);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.animate-shake {
  animation: shake 0.4s var(--ease-default);
}

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

/* ---------- Transitions ---------- */

.transition-all {
  transition: var(--transition-all);
}

.transition-colors {
  transition: var(--transition-colors);
}

.transition-transform {
  transition: var(--transition-transform);
}

/* ---------- Reduced Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
