/* =========================================================
   App Lockdown: make app feel native (no copying app text)
   Allow selection/copy only inside input/textarea.
   ========================================================= */

/* 1) Default: block selection + iOS long-press callout everywhere */
html, body, * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS: disables "Copy/Look Up" callout */
}

/* 2) Keep form fields usable: allow cursor + select + copy/paste */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

/* 3) Optional: allow selecting inside a specific element if needed later
   Example:
   .allow-select { user-select:text !important; -webkit-user-select:text !important; }
*/

html,
body,
body * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

.modalContentBody,
.modalContentBody *,
.app-dialog,
.app-dialog *,
.modal-card,
.modal-card * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/*
 * Dialog form controls remain intentionally selectable.
 * This allows copy/paste and mobile long-press selection
 * without relaxing selection restrictions on dialog text.
 */
.app-dialog input,
.app-dialog textarea,
.app-dialog [contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

/*
 * Installed/mobile app experience:
 * prevent top-edge browser pull-to-refresh from restarting the
 * application lifecycle. Normal vertical page scrolling remains enabled.
 */
html,
body {
  overscroll-behavior-y: none;
}
