/* Lightbox zdjec. Nie modyfikuje ukladow Divi 5. */

img.bo-lightbox-target {
    cursor: zoom-in;
}

img.bo-lightbox-target:focus-visible {
    outline: 3px solid #a65b45;
    outline-offset: 4px;
}

.bo-article-lightbox {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: calc(100vw - 24px);
    max-width: 1500px;
    height: calc(100dvh - 24px);
    max-height: none;
    margin: auto;
    padding: 50px 55px 22px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: #111;
    color: #fff;
    box-shadow: 0 20px 80px rgba(0,0,0,.35);
    overflow: hidden;
}

.bo-article-lightbox::backdrop {
    background: rgba(0,0,0,.9);
}

.bo-lb-center {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    gap: 10px;
}

.bo-lb-photo {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 170px) !important;
    object-fit: contain;
    box-shadow: none !important;
    border: 0 !important;
    margin: auto !important;
}

.bo-lb-caption {
    color: #efefef;
    text-align: center;
    font: 400 14px/1.5 system-ui,sans-serif;
    max-height: 54px;
    overflow: auto;
}

.bo-lb-counter {
    color: #aaa;
    text-align: center;
    font: 500 12px/1.4 system-ui,sans-serif;
}

.bo-article-lightbox button {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: #fff;
    font: 400 30px/1 system-ui,sans-serif;
    cursor: pointer;
}

.bo-article-lightbox button:hover,
.bo-article-lightbox button:focus-visible {
    background: rgba(255,255,255,.25);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.bo-lb-close {
    top: 8px;
    right: 8px;
}

.bo-lb-prev {
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
}

.bo-lb-next {
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
}

.bo-article-lightbox button[hidden],
.bo-article-lightbox [hidden] {
    display: none !important;
}

@media (max-width: 700px) {

    .bo-article-lightbox {
        width: 100vw;
        height: 100dvh;
        padding: 58px 12px 45px;
        border: 0;
        border-radius: 0;
    }

    .bo-lb-photo {
        max-height: calc(100dvh - 190px) !important;
    }

    .bo-lb-prev,
    .bo-lb-next {
        top: auto;
        bottom: 8px;
        transform: none;
    }

    .bo-lb-prev {
        left: 14px;
    }

    .bo-lb-next {
        right: 14px;
    }

    .bo-lb-close {
        top: 8px;
        right: 10px;
    }
}
