/* RZ — content protection (CSS half; the JS half is assets/js/rz-guard.js).
   Blocks text selection and the browser's built-in image save/drag paths. */

body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;   /* iOS long-press "Save Image" sheet */
}

/* form fields and anything explicitly opted in stay usable */
input,
textarea,
select,
[contenteditable="true"],
[data-allow-copy],
[data-allow-copy] * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* images: no drag to desktop, no long-press menu */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* …but images that are themselves links, buttons or lightbox targets must
   stay clickable, or the viewers below can no longer be opened/closed */
a img,
button img,
[role="button"] img,
label img,
.cat__book img,
[data-ql-cert] img,
[data-cglb-img],
[data-ql-lb-img],
[data-ab-lb-img],
.cglb img,
.ql-lb img,
.ab-lb img,
[role="dialog"] img {
  pointer-events: auto;
}

/* nothing is selectable via ::selection either */
::selection { background: transparent; }
::-moz-selection { background: transparent; }

/* keep selection visible where it is allowed */
[data-allow-copy] ::selection,
input::selection,
textarea::selection { background: #b3d4fc; }
