/* Chief Animation Components */
/* Animations and transitions from Chief desktop */

/* Fade animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

/* Slide animations */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Scale animations */
@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes pulseShadow {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(74, 158, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 158, 255, 0);
  }
}

/* Rotate animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateInfinite {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Glow animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--color-primary),
                0 0 10px var(--color-primary),
                0 0 15px var(--color-primary);
  }
  50% {
    box-shadow: 0 0 10px var(--color-primary),
                0 0 20px var(--color-primary),
                0 0 30px var(--color-primary);
  }
}

/* Wave animation */
@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  75% {
    transform: translateY(10px);
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Shake animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(10px);
  }
}

/* Loading spinner */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Dot loading animation */
@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Progress bar animation */
@keyframes progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* Animation classes */
.animate-fadeIn {
  animation: fadeIn 0.3s ease;
}

.animate-fadeOut {
  animation: fadeOut 0.3s ease;
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s ease;
}

.animate-fadeInDown {
  animation: fadeInDown 0.5s ease;
}

.animate-slideIn {
  animation: slideIn 0.3s ease;
}

.animate-slideOut {
  animation: slideOut 0.3s ease;
}

.animate-slideDown {
  animation: slideDown 0.3s ease;
}

.animate-slideUp {
  animation: slideUp 0.3s ease;
}

.animate-scaleIn {
  animation: scaleIn 0.3s ease;
}

.animate-scaleOut {
  animation: scaleOut 0.3s ease;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-pulseShadow {
  animation: pulseShadow 2s infinite;
}

.animate-rotate {
  animation: rotate 0.5s ease;
}

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

.animate-bounce {
  animation: bounce 1s ease infinite;
}

.animate-shake {
  animation: shake 0.5s ease;
}

.animate-glow {
  animation: glow 2s ease infinite;
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--spacing-md);
  border-radius: var(--border-radius-sm);
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: var(--border-radius-md);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  height: 200px;
  border-radius: var(--border-radius-lg);
}

/* Transition utilities */
.transition-all {
  transition: var(--transition-default);
}

.transition-fast {
  transition: var(--transition-fast);
}

.transition-slow {
  transition: var(--transition-slow);
}

.transition-none {
  transition: none;
}

/* Hover effects */
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-shrink:hover {
  transform: scale(0.95);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
}

/* Active states */
.active-scale:active {
  transform: scale(0.95);
}

.active-darken:active {
  filter: brightness(0.8);
}