/* Touch feel for the pages people use on a phone: the partner app, order
   detail, the public trial and catalog pages, login and the staff screens.
   The rules follow Emil Kowalski's mobile-native and animation skills:
   feedback the moment a finger lands, no grey tap flash, no text selection on
   controls, and motion only on transform/opacity with strong curves.
   Gestures (sheet drag, drawer swipe, sliding tab thumb) live in
   js/touch-feel.js. */
:root {
  --lh-ease-out: cubic-bezier(.23, 1, .32, 1);      /* entering, leaving, press */
  --lh-ease-in-out: cubic-bezier(.77, 0, .175, 1);  /* moving on screen: tab thumb */
  --lh-ease-drawer: cubic-bezier(.32, .72, 0, 1);   /* sheets and drawers (iOS curve) */
  --lh-press: .97;                                  /* buttons */
  --lh-press-card: .985;                            /* wide cards and rows */
}

/* The browser's own tap flash fights the press styles below. */
html { -webkit-tap-highlight-color: transparent; }

/* Controls are not text: a long press must not select a label or open the
   link callout. Content (order codes, addresses, messages) stays selectable. */
:where(button, [role="button"], [role="tab"], summary) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* Press feedback. The individual `scale` property composes with any transform
   an element already has (translateY(-50%) centring, a keyframe pulse), so it
   can sit on every button without moving it. :where() keeps it at zero
   specificity: a page rule with its own transition or scale wins. */
:where(button, [role="button"], [role="tab"]) { transition: scale 160ms var(--lh-ease-out); }
:where(button:not(:disabled), [role="button"]:not([aria-disabled="true"]), [role="tab"]):active { scale: var(--lh-press); }
