/**
 * DM Content Protector - Frontend Styles
 * Cyberpunk-themed protection notification and styling
 */

/* Image Protection Wrapper */
.dm-cp-image-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.dm-cp-image-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: auto;
}

.dm-cp-image-wrapper img {
    pointer-events: none;
}

/* Notification Base Styles */
.dm-cp-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    z-index: 999999999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
}

.dm-cp-notification.dm-cp-show {
    opacity: 1;
    transform: translateX(0);
}

.dm-cp-notification .dm-cp-icon {
    font-size: 20px;
    line-height: 1;
}

.dm-cp-notification .dm-cp-message {
    flex: 1;
    line-height: 1.4;
}

/* Cyberpunk Style (Default) */
.dm-cp-notification.dm-cp-cyberpunk {
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.95) 0%, 
        rgba(255, 0, 255, 0.95) 100%);
    color: #1a1a2e;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(255, 0, 255, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dm-cp-notification.dm-cp-cyberpunk::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    border-radius: 8px;
}

/* Minimal Style */
.dm-cp-notification.dm-cp-minimal {
    background: rgba(26, 26, 46, 0.95);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Alert Style */
.dm-cp-notification.dm-cp-alert {
    background: linear-gradient(135deg, 
        rgba(255, 0, 0, 0.95) 0%, 
        rgba(200, 0, 0, 0.95) 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .dm-cp-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .dm-cp-notification .dm-cp-icon {
        font-size: 18px;
    }
}

/* Animation for notification appearance */
@keyframes dm-cp-slide-in {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes dm-cp-slide-out {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Pulse animation for emphasis */
@keyframes dm-cp-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 255, 255, 0.5),
            0 0 40px rgba(255, 0, 255, 0.3),
            0 4px 20px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 255, 255, 0.7),
            0 0 60px rgba(255, 0, 255, 0.5),
            0 4px 20px rgba(0, 0, 0, 0.5);
    }
}

.dm-cp-notification.dm-cp-cyberpunk.dm-cp-show {
    animation: dm-cp-pulse 2s ease-in-out infinite;
}

/* Prevent text selection styling (visual feedback) */
body.dm-cp-no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow selection in input fields */
body.dm-cp-no-select input,
body.dm-cp-no-select textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Cursor indication for protected content */
.dm-cp-protected {
    cursor: not-allowed !important;
}

/* Watermark for images (if needed) */
.dm-cp-watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #00ffff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
    font-family: monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* Additional security: Hide selection highlight */
::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}

/* Disable pointer events on images when protection is active */
img.dm-cp-protected {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Loading indicator for protection activation */
.dm-cp-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-top-color: #00ffff;
    border-radius: 50%;
    animation: dm-cp-spin 1s linear infinite;
    z-index: 999999998;
    display: none;
}

@keyframes dm-cp-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Custom scrollbar for protected pages (optional cyberpunk touch) */
.dm-cp-protected-page::-webkit-scrollbar {
    width: 10px;
}

.dm-cp-protected-page::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.dm-cp-protected-page::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffff, #ff00ff);
    border-radius: 5px;
}

.dm-cp-protected-page::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff00ff, #00ffff);
}

/* Shield icon animation for visual feedback */
@keyframes dm-cp-shield-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.dm-cp-shield-icon {
    display: inline-block;
    animation: dm-cp-shield-pulse 2s ease-in-out infinite;
}

/* Print protection styles */
@media print {
    body {
        display: none !important;
    }
    
    body::before {
        content: "This content is protected and cannot be printed.";
        display: block;
        text-align: center;
        padding: 50px;
        font-size: 18px;
        color: #333;
    }
}

/* Accessibility: Ensure important UI elements remain selectable */
.dm-cp-selectable,
input,
textarea,
select,
button,
a {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    cursor: auto !important;
}
