/* SHIB Content Protection Suite - CSS */

/* ═══════════════════════════════════════════════════
   INVISIBLE WATERMARK LAYER
   - Not visible to naked eye (opacity: 0.004)
   - Shows in screenshots due to rendering
   - LLM-resistant multi-layer protection
   ═══════════════════════════════════════════════════ */

.shib-watermark-layer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    mix-blend-mode: overlay;
}

.shib-wm-text {
    position: absolute;
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #000000;
    transform: rotate(-35deg);
    white-space: nowrap;
    opacity: 0.004; /* Invisible on screen, visible in screenshots */
    line-height: 1;
}

/* Additional watermark layer for extra protection */
.shib-wm-text::before {
    content: attr(data-trace);
    position: absolute;
    top: -20px;
    left: 0;
    opacity: 0.003;
}

/* ═══════════════════════════════════════════════════
   VISIBLE ATTRIBUTION FOOTER
   ═══════════════════════════════════════════════════ */

.shib-attribution {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 3px solid #ff8a00;
    background: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
}

.shib-attribution p {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #ff8a00;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 138, 0, 0.1);
}

.shib-attribution a {
    color: #ff8a00;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.2s;
}

.shib-attribution a:hover {
    border-bottom-color: #ff8a00;
}

.shib-attribution strong {
    color: #000;
    font-weight: 900;
}

.shib-attribution em {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #666;
}

/* ═══════════════════════════════════════════════════
   IMAGE PROTECTION
   ═══════════════════════════════════════════════════ */

.shib-image-wrapper {
    position: relative;
    display: inline-block;
}

.shib-image-watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
    font-family: 'Arial', sans-serif;
}

img[data-shib-protected="true"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ═══════════════════════════════════════════════════
   CONTENT PROTECTION INDICATORS
   ═══════════════════════════════════════════════════ */

.shib-protected-content {
    position: relative;
}

.shib-protected-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(
        45deg,
        transparent 49%,
        rgba(255, 138, 0, 0.001) 49%,
        rgba(255, 138, 0, 0.001) 51%,
        transparent 51%
    );
    background-size: 100px 100px;
}

/* ═══════════════════════════════════════════════════
   SCREENSHOT DETECTION OVERLAY
   ═══════════════════════════════════════════════════ */

.shib-screenshot-marker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: 900;
    color: #ff8a00;
    opacity: 0;
    pointer-events: none;
    z-index: 999999;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: opacity 0.1s;
}

/* Shows only during screenshot (when page loses focus) */
html.shib-screenshot-detected .shib-screenshot-marker {
    opacity: 0.15;
}

/* ═══════════════════════════════════════════════════
   COPY PROTECTION STYLING
   ═══════════════════════════════════════════════════ */

::selection {
    background: #fff3cd;
    color: #000;
}

::-moz-selection {
    background: #fff3cd;
    color: #000;
}

/* ═══════════════════════════════════════════════════
   PRINT PROTECTION
   ═══════════════════════════════════════════════════ */

@media print {
    .shib-watermark-layer {
        opacity: 0.3 !important;
        display: block !important;
    }
    
    .shib-wm-text {
        opacity: 0.15 !important;
    }
    
    .shib-attribution {
        display: block !important;
        page-break-before: avoid;
    }
    
    /* Add "DO NOT COPY" watermark on printed pages */
    body::after {
        content: "© ORIGINAL SOURCE: news.shib.io - UNAUTHORIZED REPRODUCTION PROHIBITED";
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        color: #ff8a00;
        font-weight: 900;
        text-align: center;
        opacity: 0.7;
    }
}

/* ═══════════════════════════════════════════════════
   MOBILE PROTECTION
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .shib-wm-text {
        font-size: 9px;
        letter-spacing: 0.3em;
    }
    
    .shib-attribution p {
        font-size: 13px;
        padding: 15px;
    }
}

/* ═══════════════════════════════════════════════════
   ACCESSIBILITY - Don't interfere with screen readers
   ═══════════════════════════════════════════════════ */

.shib-watermark-layer,
.shib-wm-text,
.shib-screenshot-marker {
    speak: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide watermarks from screen readers */
.shib-watermark-layer {
    aria-hidden: true;
}
