/*
 * VMiniApp SDK — stylesheet injected into every mini app at documentStart.
 *
 * Native-feel text selection default
 * ----------------------------------
 * Static content (labels, buttons, headings, list items) is not selectable by
 * default: a long-press on it pops the OS callout (Copy / Look Up / Translate
 * on iOS, selection handles on Android), which immediately reads as "this is a
 * web page" rather than an app.
 *
 * This is a DEFAULT, not a rule. No `!important` anywhere — a mini app that
 * deliberately wants selection back just declares it and wins:
 *
 *     .order-id { -webkit-user-select: text; user-select: text; }
 *
 * The -webkit- prefix is not optional there: WebKit only accepts the unprefixed
 * property from iOS 17 on, and this SDK ships down to iOS 14. Drop it and the
 * override silently does nothing on older devices.
 *
 * Set on `html`, not `*`, precisely so that override works with one line.
 * `user-select: auto` (the initial value) resolves to the parent's value, so
 * the `none` here propagates down the whole tree on its own — and a mini app
 * overriding one node automatically frees that node's subtree too. Writing
 * `* { ... }` instead would stamp a value onto every element individually and
 * force the mini app to override the subtree as well.
 *
 * Editable fields are exempt below. Killing selection on an <input> also kills
 * the Paste menu, caret placement and select-to-edit — users could no longer
 * paste an OTP, a coupon code or an address into a form.
 */

html {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/*
 * Form fields: always selectable. A mini app can still opt out of this if it
 * really means to — same cascade rules, nothing is locked.
 */
input,
textarea,
[contenteditable]:not([contenteditable="false"]) {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
