/**
 * Content Protection Styles
 * These styles help prevent copying and saving content
 */

/* Disable text selection globally */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Protect all content areas */
  .book-content,
  .book-page,
  .book-page-left,
  .book-page-right,
  .book-scrollable-content,
  .book-content-section,
  #contentWrapper,
  #htmlViewer,
  .content-wrapper,
  .blog-post,
  .story-content,
  .projects-content,
  .challenge-content {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    position: relative;
  }
  
  /* Protect against image saving */
  img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    /* Optional: Add a subtle watermark effect to images */
    position: relative;
  }
  
  /* Add subtle watermark to content (can be customized) */
  .book-content::after,
  .book-page::after,
  .book-scrollable-content::after,
  #contentWrapper::after,
  #htmlViewer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" opacity="0.03"><text x="50%" y="50%" font-family="Arial" font-size="12" text-anchor="middle" fill="rgba(128,128,128,0.5)">Protected Content</text></svg>');
    pointer-events: none;
    z-index: 5;
    opacity: 0.07;
  }
  
  /* Provide subtle visual feedback when someone tries to select text */
  ::selection {
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    text-shadow: none;
  }
  
  /* Override any inline styles that might be added */
  [style*="user-select: text"],
  [style*="user-select:text"],
  [style*="-webkit-user-select: text"],
  [style*="-webkit-user-select:text"],
  [style*="-moz-user-select: text"],
  [style*="-moz-user-select:text"],
  [style*="-ms-user-select: text"],
  [style*="-ms-user-select:text"] {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
  }
  
  /* Make content look like text but actually be no-copy spans */
  .secure-text-container span {
    display: inline;
  }
  
  /* Special class for dynamic overlay protection */
  .content-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    cursor: default;
    background: transparent;
  }
  
  /* Make all inputs and textareas selectable for form functionality */
  input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
  
  /* Ensure PDF viewer content is protected */
  .pdf-container iframe,
  .pdf-embed,
  object[type="application/pdf"],
  embed[type="application/pdf"] {
    pointer-events: none;
  }