.button-ripple-position { position: relative; }

@media (prefers-reduced-motion: no-preference) {
  .button-ripple.is-rippling::after {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: currentColor;
    animation: button-click-wave var(--ripple-duration, 460ms) cubic-bezier(.2, .65, .3, 1) both;
  }

  .product-demo .button-ripple.is-rippling::after { animation-play-state: running !important; }

  @keyframes button-click-wave {
    from { clip-path: circle(0 at var(--ripple-x) var(--ripple-y)); opacity: .23; }
    to { clip-path: circle(var(--ripple-size) at var(--ripple-x) var(--ripple-y)); opacity: 0; }
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 671px) and (prefers-reduced-motion: no-preference) {
  /* The painted face and labels move inside the original hit target. */
  .contact-method > .button.pointer-tilt::before,
  .contact-method > .button.button-ripple::after {
    translate: var(--magnet-x, 0px) var(--magnet-y, 0px);
  }
  .contact-method > .button.pointer-tilt > :is(.tilt-label, svg) {
    translate: var(--magnet-x, 0px) calc(var(--magnet-y, 0px) + var(--contact-label-lift, 0px));
  }
  .contact-method > .button.is-tilting { --contact-label-lift: -3px; }
  .contact-method > .button.is-tilting.button-ripple::after { transform: var(--tilt-pose); }
}
