/* Disable selection on protected area. You can narrow this via the PHP filter to target .site-content, .entry-content, etc. */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Escape hatch: allow selection where needed, e.g., forms, T&C, code samples */
.cg-allow-select,
.cg-allow-select * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Keep forms usable by default */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Prevent image dragging/saving by overlaying a transparent shield that still allows clicks to pass through */
.cg-img-wrap {
    position: relative;
    display: inline-block;
}

.cg-img-wrap > img {
    pointer-events: none; /* removes right-click on the image itself */
}

.cg-img-wrap > .cg-img-shield {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    background: transparent;
}

/* Optional: visually no change, purely functional */
