/* ============================================================
   Takedown proof thumbnails + lightbox
   ============================================================ */

/*
 * Reusable shimmer thumbnail. Add `.bs-proof-thumb` to the tight wrapper of a
 * proof <img>; the wrapper shimmers (global `bs-shimmer` keyframe) and the image
 * fades in once `.bs-loaded` is added on load. The `.bs-redesign` prefix gives
 * (0,2,0) specificity so it wins over page-inline single-class thumb rules.
 */
.bs-redesign .bs-proof-thumb {
    /* No `position` here — surfaces that need it for overlay tags (timeline,
       link-details) set their own, and Latest Actions keeps its absolute pin. */
    overflow: hidden;
    background: linear-gradient(90deg, rgba(7, 16, 12, 0.05) 25%, rgba(7, 16, 12, 0.10) 50%, rgba(7, 16, 12, 0.05) 75%);
    background-size: 200% 100%;
    animation: bs-shimmer 1.5s ease-in-out infinite;
}

.bs-redesign .bs-proof-thumb > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bs-redesign .bs-proof-thumb.bs-loaded {
    animation: none;
    background: none;
}

.bs-redesign .bs-proof-thumb.bs-loaded > img {
    opacity: 1;
}

/*
 * Inline blur driven by the SAME `data-bs-proof-blur="1"` flag the lightbox
 * reads, so a thumbnail and its full-screen view can never disagree: NSFW
 * source-page shots blur inline + in the lightbox; cyberlocker/file-host shots
 * (flag 0) stay clear in both. Covers the flag on the thumb itself or on an
 * ancestor trigger. Matches the showcase blur treatment for consistency.
 */
.bs-redesign .bs-proof-thumb[data-bs-proof-blur="1"] > img,
.bs-redesign [data-bs-proof-blur="1"] .bs-proof-thumb > img {
    filter: blur(11px) saturate(0.9);
    transform: scale(1.12);
}

/* ---- Lightbox ---- */
.bs-proof-lb {
    position: fixed;
    inset: 0;
    z-index: 21000;
    display: none;
}

.bs-proof-lb.bs-active {
    display: block;
}

.bs-proof-lb__overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 14, 10, 0.62);
    backdrop-filter: blur(2px);
}

.bs-proof-lb__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, calc(100vw - 40px));
    max-height: calc(100vh - 80px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(7, 14, 10, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bs-proof-lb__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.bs-proof-lb__close:hover {
    background: rgba(15, 23, 42, 0.82);
}

.bs-proof-lb__figure {
    position: relative;
    background: #0b1020;
    min-height: 220px;
    /* Full-page SERP captures are tall — show them at full width and scroll
       vertically (top results → bottom DMCA notice) rather than shrinking the
       whole page to fit the viewport. */
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bs-proof-lb__shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: bs-shimmer 1.5s ease-in-out infinite;
}

.bs-proof-lb__figure.bs-loaded .bs-proof-lb__shimmer {
    display: none;
}

.bs-proof-lb__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.bs-proof-lb__img.bs-loaded {
    opacity: 1;
}

.bs-proof-lb__img.bs-blur {
    filter: blur(26px);
}

.bs-proof-lb.bs-revealed .bs-proof-lb__img.bs-blur {
    filter: none;
}

.bs-proof-lb__veil {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    color: #e5e7eb;
    background: rgba(7, 14, 10, 0.45);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.bs-proof-lb__veil i {
    font-size: 22px;
}

.bs-proof-lb.bs-revealed .bs-proof-lb__veil {
    display: none;
}

.bs-proof-lb__meta {
    padding: 14px 18px;
    border-top: 1px solid #eef0ef;
}

.bs-proof-lb__caption {
    font-size: 14px;
    font-weight: 800;
    color: #0b1220;
}

.bs-proof-lb__date {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}
