/*
 * Afritech Content Protection — frontend styles.
 *
 * The CSS half of the selection-blocking strategy. Loaded only on pages
 * where protection is active (logic lives in class-protection.php), so it
 * is safe to apply broadly here.
 *
 * The body class `.afritech-cp-protected` is added by the plugin so themes
 * can target protected pages specifically if they want to layer extra
 * styling on top of the defaults below.
 */

.afritech-cp-protected,
.afritech-cp-protected * {
	/* Disable text selection across the page. JS provides a fallback for
	   the few browsers/edge cases where CSS alone is not honoured. */
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;

	/* Suppress the long-press callout on iOS/Android Safari. */
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
}

/* Form fields must remain selectable so users can still type and edit
   inside inputs, textareas, and contenteditable regions. */
.afritech-cp-protected input,
.afritech-cp-protected textarea,
.afritech-cp-protected select,
.afritech-cp-protected [contenteditable="true"],
.afritech-cp-protected [contenteditable=""] {
	-webkit-user-select: auto;
	-moz-user-select: auto;
	-ms-user-select: auto;
	user-select: auto;
	-webkit-touch-callout: default;
}

/* Block native image dragging at the CSS level as well — covers browsers
   that ignore the JS `dragstart` cancellation. */
.afritech-cp-protected img {
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	user-drag: none;
	pointer-events: auto; /* keep clicks/links on images working */
}
