/* Video Protection Styles */

/* Hide all native video controls that could allow downloading */
video::-webkit-media-controls-download-button {
  display: none !important;
}

video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

video::-webkit-media-controls-picture-in-picture-button {
  display: none !important;
}

video::-webkit-media-controls-overflow-button {
  display: none !important;
}

video::-webkit-media-controls-toggle-closed-captions-button {
  display: none !important;
}

/* For Firefox */
video::-moz-media-controls {
  display: none !important;
}

/* Prevent text selection and drag operations on videos */
video {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  pointer-events: auto !important;
}

/* Prevent selection on video containers */
.video-container {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  position: relative;
}

/* Add overlay to prevent right-click on videos */
.video-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Ensure video is behind the overlay but still playable */
.video-container video {
  position: relative;
  z-index: 0;
}

/* Hide cursor when hovering over protected videos */
video[data-protected="true"] {
  cursor: default !important;
}

/* Disable highlighting */
video[data-protected="true"]::-moz-selection {
  background: transparent !important;
}

video[data-protected="true"]::selection {
  background: transparent !important;
}

/* Additional protection for mobile devices */
@media (max-width: 768px) {
  video {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .video-container {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
}

/* Hide any potential download links or buttons */
.video-download,
.download-video,
a[href*=".mp4"],
a[href*=".mov"],
a[href*=".avi"],
a[href*=".wmv"],
a[href*=".flv"],
a[href*=".webm"],
a[href*="/assets/videos/"] {
  display: none !important;
  visibility: hidden !important;
}

/* Prevent inspect element highlighting on videos */
video:hover {
  outline: none !important;
  border: none !important;
}

/* Additional security for video containers */
.video-container:hover {
  outline: none !important;
  border: none !important;
}
