/*
 * eLearning Hub Academy protected lesson reader.
 *
 * The server sends only one authorized lesson part at a time. These browser
 * controls add deterrence and account attribution, not unbreakable DRM.
 */

body.elhub-protected-lesson {
  position: relative;
}

body.elhub-protected-lesson [data-elhub-protected-reader] {
  position: relative;
  isolation: isolate;
}

body.elhub-protected-lesson
[data-elhub-protected-reader]
.eh-learning-section__body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.elhub-protected-lesson
[data-elhub-protected-reader]
input,
body.elhub-protected-lesson
[data-elhub-protected-reader]
textarea,
body.elhub-protected-lesson
[data-elhub-protected-reader]
select,
body.elhub-protected-lesson
[data-elhub-protected-reader]
button,
body.elhub-protected-lesson
[data-elhub-protected-reader]
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

body.elhub-protected-lesson img {
  -webkit-user-drag: none;
  user-drag: none;
}

.elhub-protection-watermark {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  grid-auto-rows: 210px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  opacity: 0.075;
  pointer-events: none;
}

.elhub-protection-watermark__item {
  width: 380px;
  transform: rotate(-24deg);
  color: #0b3150;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.elhub-protection-notice {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483646;
  max-width: 420px;
  padding: 13px 17px;
  border: 1px solid rgba(224, 168, 0, 0.65);
  border-radius: 10px;
  background: rgba(4, 19, 36, 0.96);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.elhub-protection-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.elhub-print-blocker {
  display: none;
}

@media (max-width: 900px) {
  .elhub-protection-watermark {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    grid-auto-rows: 180px;
  }

  .elhub-protection-watermark__item {
    width: 260px;
    font-size: 11px;
  }
}

@media print {
  body.elhub-protected-lesson > *:not(.elhub-print-blocker) {
    display: none !important;
  }

  body.elhub-protected-lesson .elhub-print-blocker {
    box-sizing: border-box;
    display: flex !important;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: #fff !important;
    color: #111 !important;
    text-align: center;
  }

  .elhub-print-blocker__inner {
    max-width: 720px;
    padding: 45px;
    border: 4px solid #1b4968;
  }

  .elhub-print-blocker h1 {
    margin: 0 0 22px;
    color: #8b1e1e;
    font-size: 32px;
  }

  .elhub-print-blocker p {
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.55;
  }

  .elhub-print-blocker__policy {
    margin-top: 24px !important;
    color: #8b1e1e !important;
    font-weight: 800;
  }

  .elhub-print-blocker__watermark {
    margin-top: 28px !important;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}
