@layer utilities {
  /* Animation classes */
  .shake {
    animation: shake 400ms both;
  }

  /* Keyframes */
  @keyframes appear-then-fade {
    0%, 100% {
      opacity:0
    }
    5%, 60% {
      opacity:1
    }
  }

  @keyframes fade-out {
    to { opacity: 0; }
  }

  @keyframes shake {
    0%  { transform: translateX(-2rem); }
    25% { transform: translateX(2rem); }
    50% { transform: translateX(-1rem); }
    75% { transform: translateX(1rem); }
  }

  @keyframes submitting {
    0%    { -webkit-mask-position: 0% 0%,   50% 0%,   100% 0% }
    12.5% { -webkit-mask-position: 0% 50%,  50% 0%,   100% 0% }
    25%   { -webkit-mask-position: 0% 100%, 50% 50%,  100% 0% }
    37.5% { -webkit-mask-position: 0% 100%, 50% 100%, 100% 50% }
    50%   { -webkit-mask-position: 0% 100%, 50% 100%, 100% 100% }
    62.5% { -webkit-mask-position: 0% 50%,  50% 100%, 100% 100% }
    75%   { -webkit-mask-position: 0% 0%,   50% 50%,  100% 100% }
    87.5% { -webkit-mask-position: 0% 0%,   50% 0%,   100% 50% }
    100%  { -webkit-mask-position: 0% 0%,   50% 0%,   100% 0% }
  }

  @keyframes slide-up-fade-in {
    from {
      opacity: 0;
      transform: translateY(1rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* View Transitions */
  ::view-transition-old(root) {
    animation: 100ms cubic-bezier(0.4, 0, 1, 1) both fade-out;
  }

  ::view-transition-new(root) {
    animation: none;
  }
}
