/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(6px);
    z-index: 9999;
}

    .lightbox.open {
        display: grid;
        animation: fadeIn .18s ease-out
    }

.frame {
    position: relative;
    max-width: min(92vw, 1200px);
    max-height: 84vh;
    display: grid;
    place-items: center;
}

.full {
    max-width: 100%;
    max-height: 84vh;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
    background: #0b0f18;
    object-fit: contain;
    animation: zoomIn .2s ease-out;
}

.closing .full {
    animation: zoomOut .18s ease-in forwards
}

.closing {
    animation: fadeOut .18s ease-in forwards
}

/* Controls */
.ctrl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(0,0,0,.35);
    cursor: pointer;
}

    .ctrl svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: #fff;
        stroke-width: 2
    }

.prev {
    left: -54px
}

.next {
    right: -54px
}

.close {
    top: -52px;
    right: 0;
    transform: none;
    width: 36px;
    height: 36px
}

@media(max-width:700px) {
    .prev {
        left: 6px
    }

    .next {
        right: 6px
    }

    .close {
        right: 6px;
        top: -46px
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeOut {
    from {
        opacity: 1
    }

    to {
        opacity: 0
    }
}

@keyframes zoomIn {
    from {
        transform: scale(.92);
        opacity: .0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1
    }

    to {
        transform: scale(.92);
        opacity: 0
    }
}
