/* Animation keyframes for real-time UI updates */

/* Pulse animation for updated elements (200ms) */
@keyframes pulse-once {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.animate-pulse-once {
  animation: pulse-once 200ms ease-in-out;
}

/* Slide-in with highlight for new list items (600ms) */
@keyframes slide-in-highlight {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    background-color: rgb(234 179 8 / 0.2); /* yellow-500/20 */
  }
  30% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    background-color: transparent;
  }
}

.animate-slide-in-highlight {
  animation: slide-in-highlight 600ms ease-out;
}

/* Progress bar smooth transitions (300ms) */
.progress-bar {
  transition: width 300ms ease-out;
}

turbo-frame[busy] {
  position: relative;
}

turbo-frame[busy]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3em;
  height: 3em;
  margin-top: -1.5em;
  margin-left: -1.5em;
  border: 3px solid rgba(0,0,0,0.12);
  border-top: 3px solid var(--color-rosser-red);
  border-radius: 50%;
  animation: spin-loader 0.8s linear infinite;
  z-index: 51;
  pointer-events: none;
  background: none;
}

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