/* =========================================================
   ICR REUSABLE IMAGE LIGHTBOX
   File global khusus untuk tampilan perbesaran gambar.

   Trigger yang didukung:
   - data-icr-lightbox="URL_GAMBAR"
   - atau href="URL_GAMBAR" data-icr-lightbox

   Script pendamping: assets/js/lightbox.js
========================================================= */

body.icr-lightbox-open {
    overflow: hidden !important;
    touch-action: none;
}

.icr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 11000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px;

    background: rgba(0, 0, 0, .90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .18s ease,
        visibility .18s ease;
}

.icr-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.icr-lightbox-dialog {
    position: relative;
    width: min(1180px, 100%);
    max-height: calc(100dvh - 56px);

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(8px) scale(.985);
    transition: transform .18s ease;
}

.icr-lightbox.is-open .icr-lightbox-dialog {
    transform: translateY(0) scale(1);
}

.icr-lightbox-image {
    display: block;

    max-width: 100%;
    max-height: calc(100dvh - 72px);
    width: auto;
    height: auto;

    object-fit: contain;
    object-position: center;

    border-radius: 14px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, .16);

    box-shadow:
        0 28px 80px rgba(0, 0, 0, .62),
        0 0 0 1px rgba(255, 255, 255, .03);
}

.icr-lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2;

    width: 44px;
    height: 44px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .20);

    background: rgba(20, 20, 20, .88);
    color: #ffffff;

    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;

    box-shadow: 0 10px 24px rgba(0, 0, 0, .38);

    transition:
        transform .15s ease,
        color .15s ease,
        background .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.icr-lightbox-close:hover,
.icr-lightbox-close:focus-visible {
    transform: translateY(-1px);
    color: var(--icr-gold, #d4af37);
    background: rgba(28, 28, 28, .96);
    border-color: rgba(212, 175, 55, .50);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .46),
        0 0 0 3px rgba(212, 175, 55, .12);
    outline: none;
}

.icr-lightbox-close:active {
    transform: translateY(0);
}

@media (max-width: 575.98px) {
    .icr-lightbox {
        padding: 14px;
    }

    .icr-lightbox-dialog {
        max-height: calc(100dvh - 28px);
    }

    .icr-lightbox-image {
        max-height: calc(100dvh - 40px);
        border-radius: 10px;
    }

    .icr-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .icr-lightbox,
    .icr-lightbox-dialog,
    .icr-lightbox-close {
        transition: none !important;
    }
}

/* Certificate Back */
body.theme-icr img.canine {
    cursor: zoom-in;
}
