/**
 * 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 base ───────────────────────────────────────────────────── */
.drccp-notification {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-sizing: border-box;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.drccp-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 300px;
    padding: 12px 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 999999;
    word-wrap: break-word;
    animation: drccpSlideInRight 0.3s ease-out;
}

@keyframes drccpSlideInRight {
    from { opacity: 0; transform: translateX(110%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Banner ──────────────────────────────────────────────────────────────── */
.drccp-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 14px 24px;
    text-align: center;
    z-index: 999999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    animation: drccpSlideInDown 0.3s ease-out;
}

@keyframes drccpSlideInDown {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal overlay ───────────────────────────────────────────────────────── */
.drccp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: drccpFadeIn 0.2s ease-out;
}

@keyframes drccpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.drccp-modal-box {
    position: relative;
    max-width: 400px;
    width: 90%;
    padding: 32px 28px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: drccpPopIn 0.25s ease-out;
}

@keyframes drccpPopIn {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

.drccp-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.75;
}

.drccp-modal-close:hover { opacity: 1; }

.drccp-modal-message {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

/* ── Inline ──────────────────────────────────────────────────────────────── */
.drccp-inline {
    display: block;
    padding: 12px 20px;
    margin: 16px 0;
    border-radius: 4px;
    border-left: 4px solid rgba(255, 255, 255, 0.4);
    text-align: center;
    animation: drccpFadeIn 0.3s ease-out;
}

/* ── Responsive overrides ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .drccp-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Legacy class kept for back-compat (old inline styles removed) */
.disable-right-click-content-copy-protection-notification {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}