/**
 * Screen Share Protector Styles
 */

/* Blur overlay when screen sharing is detected */
body.screen-share-detected {
    position: relative;
}

body.screen-share-detected::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(var(--blur-intensity, 20px));
    -webkit-backdrop-filter: blur(var(--blur-intensity, 20px));
    background: rgba(0, 0, 0, 0.3);
    z-index: 999998;
    pointer-events: none;
    animation: blurIn 0.3s ease-out;
}

@keyframes blurIn {
    from {
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        opacity: 0;
    }
    to {
        backdrop-filter: blur(var(--blur-intensity, 20px));
        -webkit-backdrop-filter: blur(var(--blur-intensity, 20px));
        opacity: 1;
    }
}

/* Warning message overlay */
#screen-share-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff4444;
    color: white;
    padding: 30px 50px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 18px;
    font-weight: bold;
    max-width: 90%;
    animation: slideDown 0.3s ease-out;
    display: none;
}

#screen-share-warning.active {
    display: block;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

#screen-share-warning .warning-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

#screen-share-warning .warning-text {
    margin: 0;
    line-height: 1.5;
}

/* Additional blur for content protection */
body.screen-share-detected * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Prevent selection during screen share */
body.screen-share-detected img,
body.screen-share-detected video {
    filter: blur(5px);
    -webkit-filter: blur(5px);
}

/* Watermark overlay (optional) */
#screen-share-watermark {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 999997;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

#screen-share-watermark.active {
    display: block;
}

/* Disable text selection when protection is active */
body.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hide content on print */
@media print {
    body.screen-protected {
        visibility: hidden;
    }
    body.screen-protected::before {
        content: "This content is protected and cannot be printed.";
        visibility: visible;
        display: block;
        text-align: center;
        padding: 50px;
        font-size: 24px;
        color: #333;
    }
}

/* Recording indicator */
.recording-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff0000;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 999999;
    display: none;
    animation: pulse 1.5s infinite;
}

.recording-indicator.active {
    display: block;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.recording-indicator::before {
    content: '●';
    margin-right: 8px;
    font-size: 16px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}
