/**
 * The Return Period — print.css
 * Linked in <head> with media="print" on all paid lesson and case study pages.
 * Suppresses lesson body content on Ctrl+P / Save as PDF,
 * replacing it with a copyright notice only.
 *
 * Usage in HTML:
 *   <link rel="stylesheet" href="css/print.css" media="print">
 */

/* ============================================================
   RESET — strip navigation, sidebars, interactive elements
   ============================================================ */
@media print {

  /* Hide everything by default */
  body * {
    visibility: hidden !important;
  }

  /* Hide structural chrome */
  #topbar,
  .nav-links,
  .cs-nav,
  .filter-btn,
  .ev-filter-bar,
  footer,
  .watermark,
  button,
  .quiz-area,
  .quiz-display,
  video,
  audio,
  iframe {
    display: none !important;
  }


  /* ============================================================
     COPYRIGHT NOTICE — the only thing that prints
     ============================================================ */
  body::before {
    content: '';
    visibility: visible !important;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
  }

  body::after {
    visibility: visible !important;
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    z-index: 10000;

    content:
      'The Return Period\A\A'
      'This content is licensed for personal, non-commercial use only.\A\A'
      'Printing, saving, reproducing, or redistributing this material\A'
      'in any form is a breach of your licence agreement.\A\A'
      'If you have purchased a licence, please read the content\A'
      'in your browser at www.thereturnperiod.com\A\A'
      '© 2025 The Return Period. All rights reserved.';

    white-space: pre;
    font-size: 13pt;
    line-height: 1.9;
    color: #1a1a1a;
  }


  /* ============================================================
     OVERRIDE — if you ever want a printable version of a specific
     page (e.g. a certificate), add class .print-allowed to <body>
     and the rules below restore normal print behaviour.
     ============================================================ */
  body.print-allowed * {
    visibility: visible !important;
  }

  body.print-allowed::before,
  body.print-allowed::after {
    display: none !important;
  }

  body.print-allowed {
    font-family: Georgia, serif;
    font-size: 11pt;
    color: #000;
    background: #fff;
  }

  body.print-allowed #topbar,
  body.print-allowed footer,
  body.print-allowed .cs-nav,
  body.print-allowed .filter-btn,
  body.print-allowed .watermark {
    display: none !important;
  }

  body.print-allowed .cs-article,
  body.print-allowed .lesson-body {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  /* Print header on allowed pages */
  body.print-allowed::before {
    content: 'The Return Period · www.thereturnperiod.com · © 2025 · Licensed to: ' attr(data-user-email);
    display: block !important;
    visibility: visible !important;
    position: static;
    font-family: 'Courier New', monospace;
    font-size: 8pt;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6pt;
    margin-bottom: 12pt;
    background: transparent;
    height: auto;
    width: auto;
  }
}
