/* Image Protection System - CSS Styles */

/* Protected image styling */
.image-protected {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    cursor: default !important;
}

/* Watermark styling */
.image-protected.with-watermark {
    position: relative;
    overflow: hidden;
}

/* Protection message animations */
@keyframes slide-in-protection {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out-protection {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Protection alert message */
.image-protection-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6a00 0%, #ff8a2a 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3);
    z-index: 999999;
    font-family: Arial, sans-serif;
    font-size: 13px;
    animation: slide-in-protection 0.3s ease;
    max-width: 350px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Violation indicator dot */
.image-protection-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff6a00;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Admin panel styling */
.image-protection-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    border: 2px solid #ff6a00;
    border-radius: 8px;
    padding: 15px;
    z-index: 999998;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.image-protection-panel h4 {
    margin: 0 0 10px 0;
    color: #ff6a00;
    font-size: 14px;
}

.image-protection-stat {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.image-protection-stat:last-child {
    border-bottom: none;
}

.image-protection-stat label {
    font-weight: bold;
    color: #333;
}

.image-protection-stat value {
    color: #ff6a00;
    font-weight: bold;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .image-protection-message {
        right: 10px;
        left: 10px;
        max-width: 100%;
    }
    
    .image-protection-panel {
        left: 10px;
        right: 10px;
        max-width: 100%;
        bottom: 10px;
    }
}

/* Print stylesheet */
@media print {
    .image-protection-message,
    .image-protection-panel,
    .image-protected.with-watermark::after {
        display: none !important;
    }
    
    img.image-protected,
    [style*="background-image"].image-protected {
        opacity: 0.5;
    }
}

/* Accessibility improvements */
.image-protected:focus-visible {
    outline: 2px solid rgba(255, 106, 0, 0.3);
    outline-offset: 2px;
}

/* Anti-theft visual indicator */
.image-protected-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 106, 0, 0.1);
    border-left: 2px solid #ff6a00;
    border-bottom: 2px solid #ff6a00;
    border-radius: 0 0 0 4px;
}

/* Blur effect for sensitive images */
.image-protected.blur-sensitive {
    position: relative;
}

.image-protected.blur-sensitive {
    filter: blur(0px);
    transition: filter 0.3s ease;
}

/* Dev tools detection styling */
.devtools-detected {
    border: 2px dashed #ff4444;
    opacity: 0.7;
}

/* Success animation for blocked attempts */
@keyframes block-animation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(255, 106, 0, 0.5);
    }
    100% {
        transform: scale(1);
    }
}

.image-copy-blocked {
    animation: block-animation 0.4s ease;
}

/* Security badge styling */
.image-protected-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6a00;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-protected:hover .image-protected-badge {
    opacity: 1;
}

/* Protected image container */
.image-protected-container {
    position: relative;
    display: inline-block;
}

.image-protected-container::before {
    content: '🛡️';
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.image-protected-container:hover::before {
    opacity: 0.7;
}

/* Toast notification styling */
.image-protection-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    z-index: 999999;
    font-family: Arial, sans-serif;
    text-align: center;
    max-width: 300px;
    animation: toast-pop 0.3s ease;
}

@keyframes toast-pop {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .image-protection-panel {
        background: #2a2a2a;
        border-color: #ff8844;
        color: #e0e0e0;
    }
    
    .image-protection-panel h4 {
        color: #ff8844;
    }
    
    .image-protection-stat {
        border-bottom-color: #444;
    }
    
    .image-protection-stat label {
        color: #ccc;
    }
    
    .image-protection-stat value {
        color: #ff8844;
    }
}

/* High contrast mode */
@media (prefers-contrast: more) {
    .image-protected {
        outline: 2px solid #ff6a00;
        outline-offset: 1px;
    }
    
    .image-protection-message {
        border: 2px solid white;
    }
}
