/**
 * LumorowLMS — Site-wide Frontend Anti-Cheat (CSS half)
 *
 * Disables text selection everywhere on the frontend EXCEPT inside
 * inputs, textareas, and contenteditable surfaces — students can still
 * select / cut / copy / paste *within* their own work.
 *
 * Also hides browser-native spelling and grammar squiggle underlines
 * inside inputs/textareas, in case any extension or fallback still
 * tries to render them.
 */

body {
    -webkit-user-select: none;
    -moz-user-select:    none;
    -ms-user-select:     none;
    user-select:         none;
    -webkit-touch-callout: none; /* iOS long-press menu */
}

/* Editable surfaces stay selectable. */
input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""] {
    -webkit-user-select: text;
    -moz-user-select:    text;
    -ms-user-select:     text;
    user-select:         text;
    -webkit-touch-callout: default;
}

/* WordPress admin bar (shown to logged-in users on frontend) — keep
   default interactivity so the admin can use it. */
#wpadminbar,
#wpadminbar * {
    -webkit-user-select: auto;
    user-select:         auto;
}

/* Hide native spelling / grammar squiggles regardless of any extension
   trying to inject them. spellcheck="false" + data-gramm="false" stop
   most of them at the source; this is the last-line CSS defence. */
input::-webkit-spelling-error,
textarea::-webkit-spelling-error,
[contenteditable]::-webkit-spelling-error,
input::spelling-error,
textarea::spelling-error,
[contenteditable]::spelling-error {
    text-decoration: none !important;
    background: transparent !important;
}
input::-webkit-grammar-error,
textarea::-webkit-grammar-error,
[contenteditable]::-webkit-grammar-error,
input::grammar-error,
textarea::grammar-error,
[contenteditable]::grammar-error {
    text-decoration: none !important;
    background: transparent !important;
}
