/* WCU Learn — browser guards for course files (inc/protect.php, assets/protect.js). Learners only. */

/* No long-press menu, dragging or selecting of course pictures and video */
.wcul-guarded .wcul-main img,
.wcul-guarded .wcul-main video,
.wcul-guarded .wcul-main canvas,
.wcul-guarded .wcul-overlay img,
.wcul-guarded .wcul-overlay video {
	-webkit-touch-callout: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	user-select: none;
}

/* The slide show's Print (staff keep it; the print_slides setting brings it back for learners) */
.wcul-noprint .wcul-slides__tool[data-act="print"] { display: none !important; }

/* A Course Downloads link, and an Office file that is not one */
.wcul-main a.wcul-dl { font-weight: 600; }
.wcul-main .wcul-nodl { display: inline-block; padding: 2px 0; color: var(--fg, #3A4A5B); font-style: normal; }

/* A video file or picture opened over the lesson */
html.wcul-overlay-open { overflow: hidden; }
.wcul-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; background: rgba(5, 25, 41, .94); }
.wcul-overlay__box { position: relative; width: 100%; max-width: 1200px; max-height: 100%; display: flex; flex-direction: column; align-items: stretch; }
.wcul-overlay__close { position: absolute; right: 0; top: -48px; min-height: 40px; }
.wcul-overlay__media { display: block; width: 100%; max-height: calc(100vh - 88px); object-fit: contain; background: #000; }

/* A PDF read in the lesson (pdf.js): a bar, then the pages one under another */
.wcul-overlay.wcul-pdfview { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; background: #2B3A48; }
.wcul-pdfview__bar { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; background: #0B1A28; color: #FFFFFF; }
.wcul-pdfview__title { flex: 1 1 240px; min-width: 0; margin: 0; font-weight: 600; overflow-wrap: anywhere; color: #FFFFFF; }
.wcul-pdfview__count { margin: 0; white-space: nowrap; color: #FFFFFF; }
.wcul-pdfview__tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wcul-pdfview__tools .wcus-btn { min-height: 44px; min-width: 44px; }
.wcul-pdfview .wcul-pdfview__z { font-size: 20px; line-height: 1; background: #FFFFFF; color: #0B1A28; border-color: #FFFFFF; }
.wcul-pdfview .wcul-pdfview__z:hover { background: #DCE4EB; color: #0B1A28; }
.wcul-pdfview .wcul-pdfview__z:disabled { background: #5B6B7C; border-color: #5B6B7C; color: #FFFFFF; cursor: default; }
.wcul-pdfview .wcul-overlay__close { position: static; }
.wcul-pdfview__zoom { min-width: 4ch; text-align: center; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.wcul-pdfview__pages { flex: 1 1 auto; overflow: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.wcul-pdfview__pages:focus-visible { outline: 3px solid #FFFFFF; outline-offset: -3px; }
.wcul-pdfview__page { position: relative; margin: 0 auto 16px; background: #FFFFFF; }
.wcul-pdfview__page canvas { display: block; }
.wcul-guarded .wcul-overlay canvas { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
/* pdf.js's text layer (from its pdf_viewer.css): invisible text over the page, for screen readers and finding words */
.wcul-pdfview .textLayer { position: absolute; text-align: initial; inset: 0; overflow: clip; opacity: 1; line-height: 1; -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 0; }
.wcul-pdfview .textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.wcul-pdfview .textLayer > :not(.markedContent), .wcul-pdfview .textLayer .markedContent span:not(.markedContent) { z-index: 1; }
.wcul-pdfview .textLayer span.markedContent { top: 0; height: 0; }
.wcul-pdfview .textLayer ::selection { background: rgba(0, 0, 255, .25); }
.wcul-pdfview .textLayer br::selection { background: transparent; }
.wcul-pdfview .textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; -webkit-user-select: none; user-select: none; }

/* The watermark: the learner's name and email, small, across the slide, video or page; never in the way of a click */
.wcul-wm { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: repeat(2, 1fr); align-content: space-around; justify-items: center; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; }
.wcul-wm span { transform: rotate(-18deg); white-space: nowrap; font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; color: rgba(255, 255, 255, .55); text-shadow: 0 0 2px rgba(0, 0, 0, .55); }
.wcul-pdfview__page .wcul-wm span { color: rgba(11, 26, 40, .28); text-shadow: none; }

/* "Reload this page to continue." */
.wcul-reload { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100001; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; padding: 14px 16px; background: var(--card, #FFFFFF); color: var(--hd, #0B1A28); border: 1px solid var(--ru2, #B9C7D3); }
.wcul-reload p { margin: 0; font-weight: 600; }

.wcul-print-only { display: none; }

@media print {
	.wcul-noprint .wcul-slides,
	.wcul-noprint .wcul-lesson img,
	.wcul-noprint .wcul-materials img,
	.wcul-noprint .wcul-main video,
	.wcul-noprint .wcul-main iframe,
	.wcul-noprint .wcul-main canvas,
	.wcul-noprint .wcul-video,
	.wcul-noprint .wcul-saved__slides,
	.wcul-noprint .wcul-practice img,
	.wcul-noprint .wcul-overlay,
	.wcul-noprint .wcul-reload { display: none !important; }
	.wcul-noprint .wcul-print-only { display: block !important; margin: 0 0 12px; font-weight: 600; }
}
