/* Each contact has its own clipped surface. Native focus rings stay outside. */
.ag-press-anchor {position:relative}
ag-press-wave {
  display:block;position:absolute;inset:0;overflow:hidden;pointer-events:none;
  border-radius:inherit;z-index:2;contain:paint;opacity:1;
}
ag-press-wave::before,ag-press-wave::after {
  content:"";position:absolute;left:var(--contact-x);top:var(--contact-y);
  width:var(--contact-size);height:var(--contact-size);border-radius:50%;
  transform:translate(-50%,-50%);pointer-events:none;
}
/* A curved highlight, a transparent middle and a fine blue edge define the lens. */
ag-press-wave::before {
  background:
    radial-gradient(ellipse at 39% 23%,#fff9 0%,#fff5 7%,#fff0 29%),
    radial-gradient(ellipse at 56% 72%,#e1faff12 27%,#a2d5fb50 68%,#f2ffff8c 82%,#b4dafa24 96%);
  box-shadow:inset 0 1px 1px #ffffffd6,inset 0 -1px 2px #176bab3d,0 1px 3px #1b62971f;
  animation:ag-lens 250ms var(--ease-out,ease-out) both;
}
ag-press-wave::after {
  border:1px solid #caefffd1;
  box-shadow:0 0 0 1px #4f92c542,inset 0 1px 1px #fff8;
  animation:ag-rim 280ms var(--ease-out,ease-out) both;
}
@keyframes ag-lens {
  from {transform:translate(-50%,-50%) scale(.9);opacity:.96}
  to {transform:translate(-50%,-50%) scale(1.36);opacity:.18}
}
@keyframes ag-rim {
  from {transform:translate(-50%,-50%) scale(.94);opacity:.9}
  to {transform:translate(-50%,-50%) scale(2.15);opacity:0}
}
.ag-press-still {outline:2px solid currentColor;outline-offset:-3px}
@media(prefers-reduced-motion:reduce){
  ag-press-wave {display:none}
}
@media(forced-colors:active){
  ag-press-wave {display:none}
  .ag-press-still {outline-color:Highlight}
}
