/*
 * Front-end content protection (public pages only).
 *
 * This file is intentionally separate from style.css so it never touches
 * the site's existing visual design — it only adds selection/drag/callout
 * behavior. It is linked from includes/header.php (public pages) and is
 * NOT linked from admin/inc_header.php, so the admin panel is unaffected.
 *
 * Scope: disables text selection/highlighting and the iOS "long-press"
 * callout bubble everywhere by default, then explicitly re-enables normal
 * text selection inside form fields and anything opted back in via
 * .allow-select / [data-allow-select], so login/search/textarea/contenteditable
 * fields keep working normally everywhere they exist (now or in the future).
 */

html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Disables the iOS "callout" bubble (Copy / Save Image / etc.) that
     appears on long-press, without disabling scrolling or tapping. */
  -webkit-touch-callout: none;
}

/* Re-enable normal selection/typing wherever a visitor legitimately needs
   to select or edit text: form fields, editable areas, and anything an
   author explicitly opts back in with .allow-select / [data-allow-select]. */
input,
textarea,
select,
option,
[contenteditable="true"],
[contenteditable=""],
.allow-select,
.allow-select *,
[data-allow-select],
[data-allow-select] * {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

/* Images: block the native drag-out and the long-press "Save Image" /
   copy callout, without altering size, layout, lazy loading, or src URLs. */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
