/* The glow sits in the background, keeping text, icons and clicks unobstructed. */
.button:is(a[href], button):not(:disabled):not([aria-disabled="true"]) {
  --button-glow-strength: 0;
  background-image: radial-gradient(
    125px circle at var(--button-glow-x, 50%) var(--button-glow-y, 50%),
    rgb(255 220 231 / var(--button-glow-strength)),
    rgb(255 220 231 / 0) 75%
  );
}

.button:is(a[href], button):not(:disabled):not([aria-disabled="true"]):focus-visible {
  --button-glow-strength: .14;
}

.button:is(a[href], button):not(:disabled):not([aria-disabled="true"]):active {
  --button-glow-strength: .24;
  box-shadow: inset 0 0 0 1px #f3bdcb66, 0 2px 14px #9d233826;
}

@media (hover: hover) and (pointer: fine) {
  .button:is(a[href], button):not(:disabled):not([aria-disabled="true"]):hover {
    --button-glow-strength: .14;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .button[data-button-glow]:not(:disabled):not([aria-disabled="true"]) {
    --button-glow-strength: .18;
  }
  .button[data-button-glow]:not(:disabled):not([aria-disabled="true"]):active {
    --button-glow-strength: .24;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
    transform: none;
  }
  .button:hover, .button:active {
    transform: none;
  }
}
