/**
 * Media Protection CSS
 * Additional CSS-based protection for media elements
 */

/* Prevent selection and dragging of all media */
img,
video,
audio,
picture,
source {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    -webkit-touch-callout: none !important;
    pointer-events: auto !important;
}

/* Disable selection highlighting on media */
img::selection,
video::selection,
audio::selection {
    background: transparent !important;
    color: inherit !important;
}

img::-moz-selection,
video::-moz-selection,
audio::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* Additional protection for background images */
[style*="background-image"],
.background-image,
div[style*="background"] {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Prevent pointer events on media containers during drag */
img:active,
video:active,
audio:active {
    pointer-events: none !important;
}

/* Disable long-press actions on mobile */
img,
video,
audio {
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Hide download button in video controls */
video::-webkit-media-controls-download-button,
audio::-webkit-media-controls-download-button {
    display: none !important;
}

video::-internal-media-controls-download-button,
audio::-internal-media-controls-download-button {
    display: none !important;
}

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

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