/* ==========================================================================
   G&C Central Automation Platform - Micro-Animations & Dynamic Effects
   ========================================================================== */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
  }
}

@keyframes profitGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.25s ease forwards;
}

.glow-gold {
  animation: pulseGlow 3s infinite;
}

.glow-profit {
  animation: profitGlow 3s infinite;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  will-change: transform;
}

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

/* Respect user's reduced-motion OS preference */
@media (prefers-reduced-motion: reduce) {
  .animate-slide-in,
  .animate-fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .glow-gold,
  .glow-profit {
    animation: none !important;
  }
  .loading-spinner {
    animation-duration: 2s !important; /* Slower, less dizzying */
  }
}

