/**
 * Animations & Micro-interactions
 */

/* Ambient Glow Pulse */
@keyframes ambientPulse {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.15) translate(20px, -20px);
    opacity: 0.7;
  }
}

/* Shimmer Loading Skeleton */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Spinning Refresh Icon */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Subtle Sun Rotation / Pulse */
@keyframes sunGlow {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.4));
  }
  50% {
    transform: rotate(15deg) scale(1.04);
    filter: drop-shadow(0 0 24px rgba(251, 191, 36, 0.65));
  }
}

/* Gentle Raindrop Fall */
@keyframes raindrop {
  0% {
    transform: translateY(-2px);
    opacity: 0.6;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
  100% {
    transform: translateY(-2px);
    opacity: 0.6;
  }
}

/* Gentle Cloud Drift */
@keyframes cloudDrift {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

/* Toast In / Out */
@keyframes toastSlideIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

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

/* Modal In / Out */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Dropdown Slide */
@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Utility Classes */
.spinning svg {
  animation: spin 0.8s linear infinite !important;
}

.toast-enter {
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
  animation: toastSlideOut 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Weather Icon Micro-Animations */
.icon-sun {
  animation: sunGlow 8s ease-in-out infinite;
}

.icon-rain svg path, .icon-drizzle svg path {
  animation: raindrop 1.8s ease-in-out infinite;
}

.icon-cloud-sun, .icon-cloud-moon {
  animation: cloudDrift 6s ease-in-out infinite;
}
