/* Different animations */

@keyframes scale-up {
  from { transform: scale(0); opacity: .25; }
  to { transform: scale(1); opacity: 1; }
}

.animation-pop-in {
  will-change: opacity, transform;
  opacity: .25;
  transform: scale(0);
  animation: scale-up 200ms ease-in-out-back forwards;
}

@keyframes increase-stroke-dashoffset-300 {
  from { stroke-dashoffset: 300; }
  to { stroke-dashoffset: 0; }
}

.animation-stroke-dashoffset-300 {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: increase-stroke-dashoffset-300 2s forwards;
}

@keyframes animation-slide-in-from-right {
  from { transform: translate(25px,0px); }
  to { transform: translate(0px,0px); }
}

.animation-slide-in-from-right {
  will-change: transform;
  transform: translate(25px,0px);
  animation: animation-slide-in-from-right 1s ease-in-out-back forwards;
}

@keyframes animation-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animation-fade-in {
  will-change: opacity;
  opacity: 0;
  animation: animation-fade-in 200ms linear forwards;
}

.animation-height {
  transition: height 200ms;
}

@keyframes animation-loading-bar {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 100% 0;
  }
}

.animation-loading-bar {
  background: linear-gradient(to right, var(--gray), var(--white), var(--gray), var(--white), var(--gray));
  background-size: 200% 100%;
  animation: animation-loading-bar 0.5s infinite linear;
  opacity: 0.5;
}

/* Animation modification utilities */

.animation-delay-1 { animation-delay: 1s; }
.animation-delay-2 { animation-delay: 2s; }
.animation-delay-3 { animation-delay: 3s; }
.animation-delay-4 { animation-delay: 4s; }

.animation-duration-1 { animation-duration: 1s; }
.animation-duration-2 { animation-duration: 2s; }
.animation-duration-3 { animation-duration: 3s; }
.animation-duration-4 { animation-duration: 4s; }

@keyframes animation-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(359deg);
  }
}

.animation-spin {
  will-change: transform;
  animation: animation-spin 0.55s infinite linear;
}

.animation-spin-slow {
  will-change: transform;
  animation: animation-spin 1.05s infinite linear;
}

/* Allow CSS animations to be disabled (used in integration tests) */
.animation-disable * {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
}
