/* Shared touch controls. Page content and ordinary links remain selectable. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:where(button, a[href], summary, [role="button"], [role="tab"], input[type="checkbox"], input[type="radio"]) {
  touch-action: manipulation;
}

:where(button, summary, [role="button"], [role="tab"], a.button, a.btn, a.home-primary, a.home-secondary, a.payment-cta) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Replace the tap flash only where there is a visible press response. */
:is(button, a[href], summary, [role="button"], [role="tab"]):not(:disabled, [aria-disabled="true"]) {
  -webkit-tap-highlight-color: transparent;
}
:is(button, a[href], summary, [role="button"], [role="tab"]):not(:disabled, [aria-disabled="true"]):active {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* A coarse pointer can focus a field without Safari zooming into small text.
   max() preserves larger text, including the code entry field. */
@media (pointer: coarse) {
  input, textarea, select {
    font-size: max(16px, 1em);
  }
}
