/**
 * BMWP Lightbox styles.
 *
 * @package bmwp
 */

.bmwp-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
    z-index: 9999;
}

.bmwp-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.bmwp-lightbox__figure {
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bmwp-lightbox__image {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.bmwp-lightbox__caption {
    margin-top: 12px;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.bmwp-lightbox__button {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 0;
    width: 48px;
    height: 48px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 15px;
}

.bmwp-lightbox__button:hover,
.bmwp-lightbox__button:focus {
    background: rgba(0, 0, 0, 0.75);
    outline: none;
}

.bmwp-lightbox__button--close {
    top: 20px;
    right: 20px;
}

.bmwp-lightbox__button--prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.bmwp-lightbox__button--next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.bmwp-lightbox__button svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* The icon points left; flip it for the next control. */
.bmwp-lightbox__button--next svg {
    transform: scaleX(-1);
}

/* Make gallery images look clickable. */
.bmwp-lightbox-trigger {
    cursor: pointer;
}

@media (max-width: 600px) {
    .bmwp-lightbox__button {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .bmwp-lightbox__button--prev {
        left: 8px;
    }

    .bmwp-lightbox__button--next {
        right: 8px;
    }
}
