/* ==================================================
   BASIC JUDO - MEDIA VIEWER
================================================== */

/* 01 - Clickable Images
-------------------------------------------------- */

.bj-media-img {
    cursor: zoom-in;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(8, 22, 40, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.bj-media-img:hover {
    transform: translateY(-3px);

    box-shadow: 0 30px 90px rgba(8, 22, 40, 0.26);
}

/* 02 - Viewer Overlay
-------------------------------------------------- */

.bj-media-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 32px;

    background: rgba(2, 10, 22, 0.82);
    backdrop-filter: blur(16px);
}

.bj-media-viewer.is-open {
    display: flex;
}

/* 03 - Viewer Image
-------------------------------------------------- */

.bj-media-viewer__image {
    max-width: min(92vw, 1400px);
    max-height: 88vh;

    object-fit: contain;

    border-radius: 18px;

    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);

    transform: scale(0.92);
    opacity: 0;

    animation: bjMediaZoom 0.22s ease forwards;
}

/* 04 - Close Button
-------------------------------------------------- */

.bj-media-viewer__close {
    position: fixed;
    top: 24px;
    right: 28px;

    width: 46px;
    height: 46px;

    color: #fff;

    background: rgba(255, 255, 255, 0.10);

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    backdrop-filter: blur(10px);

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.bj-media-viewer__close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
}

/* 05 - Caption
-------------------------------------------------- */

.bj-media-viewer__caption {
    position: fixed;

    left: 50%;
    bottom: 24px;

    transform: translateX(-50%);

    max-width: 90vw;

    color: rgba(255, 255, 255, 0.86);

    font-size: 14px;
    text-align: center;
}

/* 06 - Animation
-------------------------------------------------- */

@keyframes bjMediaZoom {

    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }

}

/* 07 - Mobile
-------------------------------------------------- */

@media (max-width: 768px) {

    .bj-media-viewer {
        padding: 18px;
    }

    .bj-media-viewer__image {
        max-width: 94vw;
        max-height: 82vh;
        border-radius: 12px;
    }

    .bj-media-viewer__close {
        top: 16px;
        right: 16px;
    }

}