/* Shared by Halo's blue actions. Paint the surface beneath the label so the
   native button, focus outline, icons and rolling text keep their own layout. */
@property --halo-wave-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --halo-wake {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@property --halo-ring-radius {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
@property --halo-ring-alpha {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

@media (forced-colors: none) {
  [data-water-button]:not(:disabled, [aria-disabled="true"], [aria-busy="true"]) {
    --halo-water-ink: linear-gradient(100deg, #0b2343db, #112f5266 55%, #0d2b4826);
    --halo-water-art: url('/assets/media/flow-water.svg#button-wave');
    --halo-water-coat: var(--halo-water-ink) center / cover no-repeat,
      var(--halo-water-art) var(--halo-wave-x, 50%) 52% / 116% 155% no-repeat #183e66;
    /* Several existing action styles set an ID-specific background shorthand. */
    background: var(--halo-water-light, linear-gradient(transparent, transparent)) center / cover no-repeat,
      var(--halo-water-coat) !important;
  }
}

@media (forced-colors: none) and (prefers-reduced-motion: no-preference) {
  [data-water-button] {
    --halo-point: var(--halo-pointer-x, 50%) var(--halo-pointer-y, 50%);
    --halo-water-light: radial-gradient(circle at var(--halo-point),
        transparent max(0px, calc(var(--halo-ring-radius) - 1.5px)),
        rgb(207 245 255 / var(--halo-ring-alpha)) var(--halo-ring-radius),
        transparent calc(var(--halo-ring-radius) + 1.5px)),
      radial-gradient(ellipse 72px 32px at var(--halo-point), rgb(151 225 245 / var(--halo-wake)), transparent);
  }
  [data-water-button]:focus-visible { --halo-wake: .15; }
  .pass-window[open][data-step="details"] [data-pass-next] { animation: halo-water-drift 11s ease-in-out infinite alternate; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-water-button]:hover { --halo-wake: .2; }
}
@keyframes halo-water-drift {
  from { --halo-wave-x: 30%; }
  to { --halo-wave-x: 70%; }
}
