/**
 * Frontend CSS for Disable Right Click & Content Copy Protection
 * These styles only apply when the respective protection classes are added to the body
 */

/* Copy Content Protection Styles - Only applied when copy protection is enabled */
body.disable-right-click-content-copy-protection-no-select {
    -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-tap-highlight-color: transparent !important;
}

body.disable-right-click-content-copy-protection-no-select * {
    -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-tap-highlight-color: transparent !important;
}

/* Prevent text highlighting when copy protection is enabled */
body.disable-right-click-content-copy-protection-no-select *::selection {
    background: transparent !important;
    color: inherit !important;
}

body.disable-right-click-content-copy-protection-no-select *::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* Image Protection Styles - Only applied when image protection is enabled */
body.disable-right-click-content-copy-protection-image-protect img {
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    pointer-events: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    draggable: false !important;
}

/* Cursor changes to indicate protection when image protection is enabled */
body.disable-right-click-content-copy-protection-image-protect img {
    cursor: default !important;
}

/* Disable image ghosting effect during drag attempts when image protection is enabled */
body.disable-right-click-content-copy-protection-image-protect img {
    opacity: 0.99; /* Prevents some browsers from showing image controls */
}

/* Ensure form elements remain functional when copy protection is enabled */
body.disable-right-click-content-copy-protection-no-select input,
body.disable-right-click-content-copy-protection-no-select textarea,
body.disable-right-click-content-copy-protection-no-select select {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
}

/* Disable print media queries when copy protection is enabled */
@media print {
    body.disable-right-click-content-copy-protection-no-select {
        display: none !important;
    }
    
    body.disable-right-click-content-copy-protection-no-select::before {
        content: "Content is protected and cannot be printed." !important;
        font-size: 24px !important;
        color: #000 !important;
        display: block !important;
        text-align: center !important;
        margin-top: 50px !important;
    }
}

/* Mobile optimizations when copy protection is enabled */
@media (max-width: 768px) {
    body.disable-right-click-content-copy-protection-no-select {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    }
}

/* Additional security for images when image protection is enabled */
body.disable-right-click-content-copy-protection-image-protect img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

/* Disable browser's built-in image toolbar on IE when image protection is enabled */
body.disable-right-click-content-copy-protection-image-protect img {
    -ms-interpolation-mode: bicubic !important;
    border: 0 !important;
}

/* Prevent iframe content access when copy protection is enabled */
body.disable-right-click-content-copy-protection-no-select iframe {
    pointer-events: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Default cursor when copy protection is enabled */
body.disable-right-click-content-copy-protection-no-select {
    cursor: default !important;
}

/* Disable drag and drop when copy protection is enabled */
body.disable-right-click-content-copy-protection-no-select * {
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
}

/* Disable focus outline when copy protection is enabled for better security */
body.disable-right-click-content-copy-protection-no-select *:focus {
    outline: none !important;
}

/* Notification Message Styles */
.disable-right-click-content-copy-protection-notification {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
    text-align: center;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Animation for notification */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive notification for mobile */
@media (max-width: 768px) {
    .disable-right-click-content-copy-protection-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        text-align: center;
    }
}