/* Animation master - Button animation */

/*
  Usage:
    <button class="t-button-animation">...</button>

  Put `.t-button-animation` on any button or control to create
  a subtle repeated click/press animation.
*/

:root {
  --button-animation-dur: 1150ms;
  --button-animation-ease: cubic-bezier(0.25, 0, 0.62, 1);
}

.t-button-animation {
  animation: t-button-animation var(--button-animation-dur) var(--button-animation-ease) infinite;
  transform-origin: center;
  will-change: transform;
}

@keyframes t-button-animation {
  0% {
    transform: scale(1, 1);
  }

  13.04% {
    transform: scale(0.878, 0.877);
  }

  30.44% {
    transform: scale(1, 1);
  }

  43.48% {
    transform: scale(0.904, 0.904);
  }

  60.87% {
    transform: scale(1, 1);
  }

  72.46% {
    transform: scale(0.941, 0.937);
  }

  100% {
    transform: scale(1, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-button-animation {
    animation: none !important;
  }
}
