/* Keyframe Animations & Micro-interactions */

@keyframes floatSubtle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 25px -5px rgba(49, 84, 245, 0.25);
  }
  50% {
    box-shadow: 0 0 45px -2px rgba(49, 84, 245, 0.45);
  }
}

@keyframes scanlineDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 40px;
  }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes radarPing {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.ping-indicator {
  position: relative;
  display: inline-flex;
}

.ping-indicator::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--status-green);
  animation: radarPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

/* Reveal on Scroll Transitions */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle Cursor Trail */
.multi-cursor-trail {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.15;
  transition: all 0.3s ease-out;
}

/* Table Row & Cell Staggered Glide In (Top to Bottom Entrance) */
@keyframes cellGlideIn {
  0% {
    opacity: 0;
    transform: translateY(-22px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-row-animate > td {
  animation: cellGlideIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Dashboard Elements Glide In */
@keyframes dashCardGlide {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-card-animate {
  animation: dashCardGlide 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* KPI Number Value Glide In */
@keyframes kpiValGlide {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.kpi-val-animated {
  display: inline-block;
  animation: kpiValGlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Bar Chart Grow Up Animation */
@keyframes barGrowUp {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.dash-bar-animated {
  transform-origin: bottom;
  animation: barGrowUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Line Chart Draw Animation */
@keyframes lineDraw {
  0% {
    stroke-dashoffset: 700;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes areaFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.arr-line-animated {
  stroke-dasharray: 700;
  animation: lineDraw 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.arr-area-animated {
  animation: areaFadeIn 0.8s ease 0.15s both;
}

/* Donut Chart Rotate & Scale In */
@keyframes donutScaleIn {
  0% {
    transform: scale(0.8) rotate(-90deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.donut-animated {
  transform-origin: center;
  animation: donutScaleIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
