.tab-touch-ripple {
  &-root {
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    border-radius: inherit;
  }

  &-ripple {
    opacity: 0;
    position: absolute;
  }

  &-visible {
    opacity: 0.3;
    transform: scale(1);
    animation-duration: 550ms;
    animation-name: rippleVisibleKeyframe;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  &-pulsate {
    animation-duration: 200ms;
  }

  &-child {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;

    &-leaving {
      opacity: 0;
      animation-name: rippleChildLeavingKeyframe;
      animation-duration: 550ms;
      animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    &-pulsate {
      position: absolute;
      left: 0;
      top: 0;
      animation-name: ripplePulsateKeyframe;
      animation-duration: 2500ms;
      animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      animation-iteration-count: infinite;
      animation-delay: 200ms;
    }
  }
}

@keyframes rippleVisibleKeyframe {
  0% {
    transform: scale(0);
    opacity: 0.1;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

@keyframes rippleChildLeavingKeyframe {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes ripplePulsateKeyframe {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}
