/**
 * Frontend content-protection layer for the godam/feed block.
 *
 * IMPORTANT: this is a *deterrent*, not real protection. It stops casual
 * right-click/drag saving and stamps a per-user watermark so any leaked
 * screenshot is traceable to the account. It does NOT stop a determined user
 * (Network tab, browser cache, screen recording, and screenshots are all
 * outside JS's reach). Enforce hard limits server-side — signed/expiring media
 * URLs, tokenized HLS segments, or DRM (Widevine/FairPlay) via the godam player.
 *
 * Styling only. The watermark overlay element and the image/dvideo hardening are
 * added by content-protection.js; the diagonal-text tile is injected there as a
 * `--gf-wm-image` custom property on the feed root (inherits down to overlays).
 */

/* Discourage text selection + drag-to-save on all feed media (locked included)
 * and on the same media re-shown inside the comments panel.
 * `-webkit-touch-callout: none` suppresses the iOS long-press "Save Image" sheet. */
.godam-feed-card__media,
.godam-feed-card__media img,
.godam-feed-card__media video,
.godam-comments__post-media,
.godam-comments__post-media img,
.godam-comments__post-media video {
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}

/* Keep media interactive (video tap/mute controls, gallery swipe) — only the
 * watermark overlay opts out of pointer events. */
.godam-feed-card__media img,
.godam-feed-card__media video {
	pointer-events: auto;
}

/* The panel media box sizes with `aspect-ratio` (not the feed's padding-bottom
 * hack), so it isn't a positioning context by default — give the watermark
 * overlay something to pin to. Its img/video are in-flow, so this is inert
 * layout-wise. */
.godam-comments__post-media {
	position: relative;
}

/**
 * Tiled diagonal username watermark.
 *
 * Sits above the media (which stacks at the default z-index) but below the
 * video/gallery controls (z-index 2+ in style.css), so controls stay crisp and
 * clickable. `pointer-events: none` means it never intercepts taps, swipes, or
 * the delegated right-click/drag guards. Added only to unlocked media boxes.
 */
.godam-feed-wm {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image: var( --gf-wm-image, none );
	background-repeat: repeat;
	background-position: center center;
}
