/* Micro-Animations & Transitions */

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

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

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

/* Base Utility Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Staggered lists (e.g., table rows) */
.animate-stagger-list > *:nth-child(1) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.05s; opacity: 0; }
.animate-stagger-list > *:nth-child(2) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.1s; opacity: 0; }
.animate-stagger-list > *:nth-child(3) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s; opacity: 0; }
.animate-stagger-list > *:nth-child(4) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s; opacity: 0; }
.animate-stagger-list > *:nth-child(5) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.25s; opacity: 0; }
.animate-stagger-list > *:nth-child(6) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s; opacity: 0; }
.animate-stagger-list > *:nth-child(7) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.35s; opacity: 0; }
.animate-stagger-list > *:nth-child(8) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s; opacity: 0; }
.animate-stagger-list > *:nth-child(9) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.45s; opacity: 0; }
.animate-stagger-list > *:nth-child(10) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s; opacity: 0; }
.animate-stagger-list > *:nth-child(n+11) { animation: staggerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.55s; opacity: 0; }

/* Interactive Hover States */
.hover-lift, 
.nex-card,
.nex-btn:not(.nex-btn-borderless, :disabled) {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s, color 0.2s;
}

.hover-lift:hover,
.nex-card:hover,
.nex-btn:not(.nex-btn-borderless, :disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Global Loading Bar */
.nex-global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nex-global-loader.loading {
  opacity: 1;
}

.nex-global-loader::after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--nex-primary, #0079fa);
  animation: nexGlobalLoading 2s infinite linear;
}

@keyframes nexGlobalLoading {
  0% {
    left: 0;
    width: 0;
  }
  50% {
    left: 25%;
    width: 50%;
  }
  100% {
    left: 100%;
    width: 0;
  }
}
