/**
 * Prepriga brand watermark and copy/screenshot protection
 * for Notes, Mocks, and Syllabus content.
 */

/* Wrapper for any content that should show watermark and resist copy */
.content-protected-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
/* Mock run page: allow page to scroll (scroll is on body, not this wrap) */
.mock-run-page .content-protected-wrap {
  overflow: visible;
  min-height: 0;
}

/* MD viewer: wrap is flex child; body inside must fill and scroll */
.md-viewer .content-protected-wrap {
  display: flex;
  flex-direction: column;
}
.md-viewer .content-protected-wrap .md-viewer-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Disable text selection and copy */
.content-protected,
.md-viewer-body.content-protected,
.mock-run-content.content-protected,
.syllabus-content-protected {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

/* Watermark layer: sits on top of content, pointer-events none so clicks pass through */
.content-watermark-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.content-watermark-layer .watermark-text {
  position: absolute;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  color: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  transform: rotate(-22deg);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Fewer watermarks — 4 per layer, spread out for lower frequency */
.content-watermark-layer .watermark-text:nth-child(1) { top: 15%; left: 8%; }
.content-watermark-layer .watermark-text:nth-child(2) { top: 55%; left: 15%; }
.content-watermark-layer .watermark-text:nth-child(3) { top: 25%; left: 58%; }
.content-watermark-layer .watermark-text:nth-child(4) { top: 78%; left: 55%; }

@media (max-width: 480px) {
  .content-watermark-layer .watermark-text {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.06);
  }
}
