/* ============================================================
   WP Terms - Content Protection Styles
   Loaded only on pages matching the configured protected path.
   ============================================================ */

/*
 * Disable text selection across the page.
 * The -webkit- prefix covers older Safari and Chrome on iOS.
 */
body {
    -webkit-user-select: none;
    -moz-user-select:    none;
    -ms-user-select:     none;
    user-select:         none;
}

/* ============================================================
   Print / PDF export blocking

   When the page is printed or saved to PDF via the browser
   print dialog, all page content is hidden and a copyright
   notice is rendered in its place via a CSS pseudo-element.

   Using ::before on body means the notice cannot be removed
   by the user via DOM manipulation - pseudo-elements are not
   part of the DOM tree and cannot be selected or deleted in
   browser developer tools.
   ============================================================ */

@media print {

    /* Hide every direct child of body - this covers the page
       header, content, footer, sidebars, and any overlays. */
    body > * {
        display: none !important;
        visibility: hidden !important;
    }

    /* Also suppress anything that might be positioned outside
       normal flow, such as fixed headers or sticky elements. */
    * {
        visibility: hidden !important;
    }

    /* Render the copyright notice as a pseudo-element.
       visibility: visible overrides the wildcard rule above. */
    body::before {
        display:    block !important;
        visibility: visible !important;
        content:    "Printing this course is not permitted due to copyright restrictions.";
        position:   fixed;
        top:        50%;
        left:       50%;
        transform:  translate(-50%, -50%);
        width:      80%;
        font-family: Georgia, "Times New Roman", serif;
        font-size:  18pt;
        font-weight: normal;
        color:      #1a1a1a;
        text-align: center;
        line-height: 1.8;
    }
}
