/*
 * BG Custom Lightbox CSS v5.0.1
 * A professional, clean lightbox.
 */

/* 1. Keyframes for animations */
@keyframes bg-clb-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bg-clb-fadeOut { to { opacity: 0; } }
@keyframes bg-clb-zoomInUp {
    from {
        transform: scale(.97) translate3d(0, 16px, 0);
        opacity: 0;
    }
    to {
        transform: scale(1) translate3d(0, 0, 0);
        opacity: 1;
    }
}
@keyframes bg-clb-zoomOutDown {
    to {
        transform: scale(.97) translate3d(0, 16px, 0);
        opacity: 0;
    }
}

/* 2. Style for target images in content */
.entry-content img.bg-clb-img {
    cursor: zoom-in;
    transition: opacity 0.3s ease-in-out;
}

/* 3. The main lightbox overlay */
.bg-clb-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.96);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 16px 16px;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    backdrop-filter: blur(3px);
}
.bg-clb-overlay.is-open {
    visibility: visible;
    opacity: 1;
    animation: bg-clb-fadeIn 0.3s ease;
}
.bg-clb-overlay.is-closing {
    animation: bg-clb-fadeOut 0.3s ease forwards;
}

/* 4. Content wrapper and animations */
.bg-clb-overlay .bg-clb-content {
    position: relative;
    max-width: 90vw;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.bg-clb-overlay.is-open .bg-clb-content {
    animation: bg-clb-zoomInUp 0.3s ease;
}
.bg-clb-overlay.is-closing .bg-clb-content {
    animation: bg-clb-zoomOutDown 0.3s ease forwards;
}

/* 5. The image itself */
.bg-clb-content img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow:
        0 1px 4px 0 rgba(0, 0, 0, .1),
        0 0 6px 0 rgba(0, 0, 0, .1),
        0 2px 2px -2px rgba(0, 0, 0, .15);
    cursor: zoom-out;
}

/* 6. The "View full size" link */
.bg-clb-view-full {
    margin: 16px 0 0;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: #6f7672;
    text-decoration: none;
    border-bottom: 1px dotted rgb(111 118 114 / 50%);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.bg-clb-view-full:hover, .bg-clb-view-full:focus, .bg-clb-view-full:active {
    color: #001107;
    border-bottom: 1px solid rgb(68 75 72 / 50%);
}

/* 7. The close button */
.bg-clb-close {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    cursor: pointer;
    background-color: transparent !important;
    background: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.16736 1.16736L26.8327 26.8327' stroke='%23b3b3b3' stroke-width='3'/%3E%3Cpath d='M26.8328 1.16736L1.16741 26.8327' stroke='%23b3b3b3' stroke-width='3'/%3E%3C/svg%3E") center no-repeat;
    background-size: 28px 28px;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}
.bg-clb-close:hover {
    opacity: 1;
    background-color: transparent !important;
}

/* 8. Prevent body scrolling when the lightbox is open */
body.bg-clb-noscroll {
    overflow: hidden;
}