/**
 * Content Protection Styles
 *
 * Adds visual protection layer and disables selection
 *
 * @package Kildare_Comic_Reader
 */

/* Protection Overlay */
.kcr-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    text-decoration: none;
    display: block;
}

/* Ad Overlay - Clickable Protection */
.kcr-protection-overlay.kcr-ad-overlay {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.kcr-protection-overlay.kcr-ad-overlay:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Disable selection on protected pages (both comic and ad pages) */
body.kcr-protection-enabled .kcr-page-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

/* Disable selection on images (both comic and ad images) */
body.kcr-protection-enabled .kcr-page-container img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Allow pointer events on overlay for interaction */
body.kcr-protection-enabled .kcr-protection-overlay {
    pointer-events: auto;
}

/* Disable print screen blur effect (optional) */
body.kcr-protection-enabled .kcr-page-container.kcr-blurred {
    filter: blur(20px);
    transition: filter 0.1s;
}

/* Watermark overlay (optional - for future use) */
.kcr-watermark-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.05);
    font-weight: bold;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 5;
}

/* Disable text selection on reader controls (they should still work) */
body.kcr-protection-enabled .kcr-reader-controls,
body.kcr-protection-enabled .kcr-nav-buttons {
    user-select: auto;
    -webkit-user-select: auto;
}

/* Mobile-specific protection */
@media (max-width: 768px) {
    body.kcr-protection-enabled .kcr-page-container {
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Vertical reader specific protection */
body.kcr-protection-enabled .kcr-reader-vertical .kcr-page-container {
    user-select: none;
    -webkit-user-select: none;
}

/* Horizontal reader specific protection */
body.kcr-protection-enabled .kcr-reader-horizontal .kcr-page-container {
    user-select: none;
    -webkit-user-select: none;
}

/* Protection notice (optional - can be added via JavaScript) */
.kcr-protection-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 1000;
    display: none;
    animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

body.kcr-protection-enabled .kcr-protection-notice {
    display: block;
}
