/* ============================================================================
   Stafferin training-page copy protection
   Activated when copy-protection.js sets <body data-protected="true">.
   Non-training pages (home, blog, pricing, contact, etc.) are unaffected.
   ========================================================================== */

body[data-protected] {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text input to remain selectable (search box on the hub etc.) */
body[data-protected] input,
body[data-protected] textarea,
body[data-protected] [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Block image dragging onto desktop */
body[data-protected] img,
body[data-protected] svg {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Hide the inline print/save buttons that exist in 44 individual training pages.
   All such buttons follow the convention class="<prefix>-print-btn".
   This rule alone removes them — no per-file edits required. */
body[data-protected] [class*="-print-btn"],
body[data-protected] button[onclick*="print"],
body[data-protected] a[onclick*="print"] {
  display: none !important;
}

/* Toast displayed on copy/cut/contextmenu attempts */
.tc-protect-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: #fff;
  font: 600 13px/1.4 'Inter', system-ui, sans-serif;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
  letter-spacing: .2px;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 99999;
  pointer-events: none;
}
.tc-protect-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Print stylesheet — replace page with a stark notice */
@media print {
  body[data-protected] {
    visibility: hidden;
  }
  body[data-protected]::after {
    content: "Printing disabled \2014 Stafferin Confidential";
    visibility: visible;
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 22px/1.4 'Inter', Arial, sans-serif;
    color: #0F172A;
    background: #fff;
  }
}
