/* ===================================
   Engadina Now - Animations & Transitions
   =================================== */

/* ===== Global Smooth Transitions ===== */
* {
  transition-timing-function: var(--ease-smooth);
}

/* ===== Fade In Animation ===== */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in var(--duration-normal) var(--ease-smooth);
}

/* ===== Slide Up Animation (Cards) ===== */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slide-up var(--duration-slow) var(--ease-smooth);
}

/* ===== Pulse Animation (Loading States) ===== */
@keyframes pulse-soft {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
  }
}

.loading-pulse {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* ===== Status Indicator Pulse ===== */
@keyframes status-pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
}

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

/* ===== Hover Lift Effect ===== */
.card-lift {
  transition: transform var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth);
}

.card-lift:hover {
  transform: translateY(-2px) scale(1.001);
}

/* ===== Skeleton Loading ===== */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0px,
    var(--bg-card-hover) 40px,
    var(--bg-card) 80px
  );
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ===== Spin Animation (Loading Spinner) ===== */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ===== Staggered Animations ===== */
.stagger-1 {
  animation-delay: 100ms;
}

.stagger-2 {
  animation-delay: 200ms;
}

.stagger-3 {
  animation-delay: 300ms;
}

.stagger-4 {
  animation-delay: 400ms;
}

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