.cpxlb {
    cursor: pointer;
    user-select: none;
}

.cpx-lightbox {
    height: 100dvh;
    width: 100dvw;
    position: fixed;
    background-color: rgba(0,0,0,.6);
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;

    opacity: 0;
    transform: scale(1.1);
    transition: opacity .3s, transform .3s;
}

.cpx-lightbox.open {
    opacity: 1;
    transform: none;
}

.cpx-lightbox__modal {
    height: 100%;
    width: 100%;
    display: block;
    user-select: none;
}

.cpx-lightbox__modal img {
    max-width: calc(100% - 50px);
    max-height: calc(100% - 50px);
    width: auto;
    height: auto;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    z-index: 5;
}

@media screen and (min-width: 1024px) {
    .cpx-lightbox__modal img {
        max-width: calc(100% - 100px);
        max-height: calc(100% - 100px);
    }
}

.cpx-lightbox__modal__close {
    position: absolute;
    top: 30px;
    right: 30px;
    cursor: pointer;
    color: #000;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: color .3s;
    border: none;
    border-radius: 100px;
    outline: none;
    height: 2rem;
    width: 2rem;

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

    z-index: 10;
}

.cpx-lightbox__modal__close svg {
    display: block;
    width: 70%;
    height: 70%;
}

.cpx-lightbox__modal__close-backdrop {
    z-index: 1;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%; 
}