/**
 * VTS Content Shield — CSS Protection Rules
 * Disables text selection and visual copying on protected content
 */

/* Disable text selection on all protected elements */
[data-vts-protect] {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  /* Prevent text selection highlighting */
  -webkit-highlight: none;

  /* Disable dragging */
  -webkit-user-drag: none;
  user-drag: none;
}

/* Disable selection on common protected elements */
.vts-job-title,
.vts-job-description,
.vts-job-requirements,
.vts-job-benefits,
.vts-job-salary,
.vts-job-location {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Override Bootstrap/other frameworks that might have user-select: auto */
[data-vts-protect] *,
.vts-job-title *,
.vts-job-description *,
.vts-job-requirements *,
.vts-job-benefits *,
.vts-job-salary *,
.vts-job-location * {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Prevent image saving */
[data-vts-protect] img,
.vts-job-listing img {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;

  /* Prevent right-click on images */
  -webkit-user-drag: none;
  user-drag: none;
}

/* Prevent highlight on mouse drag */
[data-vts-protect]::selection {
  background-color: transparent;
  color: inherit;
}

[data-vts-protect]::-moz-selection {
  background-color: transparent;
  color: inherit;
}

/* Disable printing */
@media print {
  [data-vts-protect],
  .vts-job-listing,
  .vts-protected-content {
    display: none !important;
  }

  body::before {
    content: "Impression not allowed";
    display: block;
    text-align: center;
    padding: 50px;
    font-weight: bold;
  }
}

/* Cursor indication */
[data-vts-protect] {
  cursor: default;
}

/* Prevent text-to-speech selection */
[data-vts-protect] {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Mobile-specific: disable long-press copy menu */
[data-vts-protect] {
  -webkit-touch-callout: none;
}

/* Disable placeholder text selection */
[data-vts-protect]::placeholder {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Alert styling */
.vts-shield-alert {
  animation: vts-slide-in 0.3s ease-out;
}

@keyframes vts-slide-in {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Body class indicator */
body.vts-shield-active {
  /* Add any body-level protection styles here */
}

/* Prevent selection of inline elements */
[data-vts-protect] span,
[data-vts-protect] p,
[data-vts-protect] a,
[data-vts-protect] strong,
[data-vts-protect] em,
[data-vts-protect] code {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Prevent table cell selection */
[data-vts-protect] table,
[data-vts-protect] td,
[data-vts-protect] th,
[data-vts-protect] tr {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* List protection */
[data-vts-protect] ul,
[data-vts-protect] ol,
[data-vts-protect] li {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Form input protection */
[data-vts-protect] input[type="text"],
[data-vts-protect] textarea {
  /* Allow selection in inputs but prevent outside */
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* Honeypot styling (never visible) */
[style*="display:none"],
[style*="visibility:hidden"],
[style*="position:absolute"][style*="left:-999"],
[style*="height:0"],
[style*="width:0"],
[style*="overflow:hidden"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -999px !important;
  top: -999px !important;
  z-index: -9999 !important;
  pointer-events: none !important;
}

/* Accessibility: Ensure visibility for screen readers doesn't affect protection */
.sr-only,
.screen-reader-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Ensure protection even with important overrides in theme */
[data-vts-protect] {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}
