.wp-block-bmp-gallery {
    --bmp-gallery-gap: 20px;
    --bmp-gallery-mobile: 1;
    --bmp-gallery-tablet: 2;
    --bmp-gallery-desktop: 3;
    --bmp-gallery-radius: 0px;
    --bmp-gallery-control-size: 46px;
    box-sizing: border-box;
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    clear: both;
}

.wp-block-bmp-gallery *,
.wp-block-bmp-gallery *::before,
.wp-block-bmp-gallery *::after {
    box-sizing: border-box;
}

.wp-block-bmp-gallery::after {
    content: "";
    display: table;
    clear: both;
}

.wp-block-bmp-gallery .bmp-gallery__title {
    margin-top: 0;
    margin-bottom: 1rem;
}

.wp-block-bmp-gallery .bmp-gallery__figure {
    margin: 0;
    min-width: 0;
}

.wp-block-bmp-gallery .bmp-gallery__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.wp-block-bmp-gallery.layout-grid .bmp-gallery__link,
.wp-block-bmp-gallery.layout-masonry .bmp-gallery__link {
    cursor: pointer;
}

.wp-block-bmp-gallery.layout-carousel .bmp-gallery__swiper,
.wp-block-bmp-gallery.layout-carousel .bmp-gallery__link {
    cursor: grab;
}

.wp-block-bmp-gallery.layout-carousel .bmp-gallery__swiper:active,
.wp-block-bmp-gallery.layout-carousel .bmp-gallery__swiper:active .bmp-gallery__link {
    cursor: grabbing;
}

.wp-block-bmp-gallery .bmp-gallery__media {
    display: block;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--bmp-gallery-radius);
    background: rgba(0, 0, 0, .025);
}

.wp-block-bmp-gallery .bmp-gallery__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.wp-block-bmp-gallery.layout-grid .bmp-gallery__image,
.wp-block-bmp-gallery.layout-masonry .bmp-gallery__image {
    transition: transform .25s ease, opacity .25s ease, filter .25s ease;
}

.wp-block-bmp-gallery.is-ratio-1-1 .bmp-gallery__media,
.wp-block-bmp-gallery.is-ratio-4-5 .bmp-gallery__media,
.wp-block-bmp-gallery.is-ratio-4-3 .bmp-gallery__media,
.wp-block-bmp-gallery.is-ratio-3-2 .bmp-gallery__media,
.wp-block-bmp-gallery.is-ratio-16-9 .bmp-gallery__media {
    width: 100%;
}

.wp-block-bmp-gallery.is-ratio-1-1 .bmp-gallery__image,
.wp-block-bmp-gallery.is-ratio-4-5 .bmp-gallery__image,
.wp-block-bmp-gallery.is-ratio-4-3 .bmp-gallery__image,
.wp-block-bmp-gallery.is-ratio-3-2 .bmp-gallery__image,
.wp-block-bmp-gallery.is-ratio-16-9 .bmp-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-block-bmp-gallery.is-ratio-1-1 .bmp-gallery__media { aspect-ratio: 1 / 1; }
.wp-block-bmp-gallery.is-ratio-4-5 .bmp-gallery__media { aspect-ratio: 4 / 5; }
.wp-block-bmp-gallery.is-ratio-4-3 .bmp-gallery__media { aspect-ratio: 4 / 3; }
.wp-block-bmp-gallery.is-ratio-3-2 .bmp-gallery__media { aspect-ratio: 3 / 2; }
.wp-block-bmp-gallery.is-ratio-16-9 .bmp-gallery__media { aspect-ratio: 16 / 9; }

.wp-block-bmp-gallery .bmp-gallery__meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin-top: .5rem;
    font-size: .875em;
    line-height: 1.45;
}

.wp-block-bmp-gallery .bmp-gallery__credit {
    opacity: .72;
    font-size: .92em;
}

/* Grid */
.wp-block-bmp-gallery.layout-grid .bmp-gallery__grid {
    display: grid;
    grid-template-columns: repeat(var(--bmp-gallery-mobile), minmax(0, 1fr));
    gap: var(--bmp-gallery-gap);
    min-width: 0;
}

/* True masonry layout is calculated by masonry.js. */
.wp-block-bmp-gallery.layout-masonry .bmp-gallery__masonry {
    position: relative;
    width: 100%;
    min-width: 0;
}

.wp-block-bmp-gallery.layout-masonry .bmp-gallery__masonry-item {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    will-change: transform;
}

.wp-block-bmp-gallery.layout-masonry .bmp-gallery__masonry.is-laid-out .bmp-gallery__masonry-item {
    transition: transform .2s ease;
}

/* Carousel */
.wp-block-bmp-gallery.layout-carousel .bmp-gallery__swiper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.wp-block-bmp-gallery.layout-carousel .swiper-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    transition-property: transform;
    box-sizing: content-box;
}

.wp-block-bmp-gallery.layout-carousel .swiper-slide {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 100%;
    height: auto;
    min-width: 0;
    transition-property: transform;
}

.wp-block-bmp-gallery.layout-carousel .swiper-button-prev,
.wp-block-bmp-gallery.layout-carousel .swiper-button-next {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--bmp-gallery-control-size);
    height: var(--bmp-gallery-control-size);
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(20, 20, 20, .58);
    color: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background-color .18s ease, opacity .18s ease, transform .18s ease;
}

.wp-block-bmp-gallery.layout-carousel .swiper-button-prev { left: 12px; }
.wp-block-bmp-gallery.layout-carousel .swiper-button-next { right: 12px; }

.wp-block-bmp-gallery.layout-carousel .swiper-button-prev::before,
.wp-block-bmp-gallery.layout-carousel .swiper-button-prev::after,
.wp-block-bmp-gallery.layout-carousel .swiper-button-next::before,
.wp-block-bmp-gallery.layout-carousel .swiper-button-next::after {
    content: none !important;
    display: none !important;
}

.wp-block-bmp-gallery.layout-carousel .bmp-gallery__carousel-nav svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (hover: hover) {
    .wp-block-bmp-gallery.layout-carousel .swiper-button-prev:hover,
    .wp-block-bmp-gallery.layout-carousel .swiper-button-next:hover {
        background: rgba(20, 20, 20, .78);
    }
}

.wp-block-bmp-gallery.layout-carousel .swiper-button-prev:focus-visible,
.wp-block-bmp-gallery.layout-carousel .swiper-button-next:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.wp-block-bmp-gallery.layout-carousel .swiper-button-disabled {
    opacity: .25;
    cursor: default;
}

.wp-block-bmp-gallery.layout-carousel .swiper-pagination {
    position: relative;
    bottom: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: .85rem;
}

.wp-block-bmp-gallery.layout-carousel .swiper-pagination-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 !important;
    border: 0;
    border-radius: 999px;
    background: currentColor;
    opacity: .25;
    cursor: pointer;
    transition: width .18s ease, opacity .18s ease;
}

.wp-block-bmp-gallery.layout-carousel .swiper-pagination-bullet-active {
    width: 22px;
    opacity: .8;
}

.wp-block-bmp-gallery.layout-carousel .swiper-button-lock,
.wp-block-bmp-gallery.layout-carousel .swiper-pagination-lock {
    display: none;
}

html.bmp-gallery-lightbox-open,
body.bmp-gallery-lightbox-open {
    overscroll-behavior: none;
}

/* Shared lightbox. It is appended to document.body so theme containers cannot clip it. */
.bmp-gallery-lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 10, 10, .98);
    color: #fff;
    overflow: hidden;
    overscroll-behavior: none;
}

.bmp-gallery-lightbox::backdrop {
    background: rgba(0, 0, 0, .96);
}

.bmp-gallery-lightbox__inner {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.bmp-gallery-lightbox__toolbar {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(56px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.bmp-gallery-lightbox__counter {
    padding-left: 4px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    opacity: .82;
}

.bmp-gallery-lightbox__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
}

.bmp-gallery-lightbox__tool,
.bmp-gallery-lightbox__close,
.bmp-gallery-lightbox__prev,
.bmp-gallery-lightbox__next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bmp-gallery-lightbox__tool,
.bmp-gallery-lightbox__close {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: transparent;
    transition: background-color .16s ease, opacity .16s ease;
}

.bmp-gallery-lightbox__tool:hover,
.bmp-gallery-lightbox__close:hover {
    background: rgba(255, 255, 255, .12);
}

.bmp-gallery-lightbox__tool:focus-visible,
.bmp-gallery-lightbox__close:focus-visible,
.bmp-gallery-lightbox__prev:focus-visible,
.bmp-gallery-lightbox__next:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.bmp-gallery-lightbox__tool svg,
.bmp-gallery-lightbox__close svg,
.bmp-gallery-lightbox__prev svg,
.bmp-gallery-lightbox__next svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bmp-gallery-lightbox__stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px clamp(58px, 6vw, 94px);
    touch-action: none;
    overscroll-behavior: none;
    cursor: grab;
}

.bmp-gallery-lightbox__stage:active {
    cursor: grabbing;
}

.bmp-gallery-lightbox__image {
    display: block;
    max-width: min(94vw, 2048px);
    max-height: calc(100vh - 155px);
    max-height: calc(100dvh - 155px);
    width: auto;
    height: auto;
    border-radius: 0 !important;
    object-fit: contain;
    transform-origin: center center;
    transition: transform .16s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.bmp-gallery-lightbox__image.is-zoomed {
    cursor: grab;
}

.bmp-gallery-lightbox__image.is-dragging,
.bmp-gallery-lightbox__image.is-swiping {
    cursor: grabbing;
    transition: none;
}

.bmp-gallery-lightbox__prev,
.bmp-gallery-lightbox__next {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 58px;
    transform: translateY(-50%);
    border-radius: 10px;
    background: rgba(0, 0, 0, .28);
    opacity: .84;
    transition: background-color .16s ease, opacity .16s ease;
}

.bmp-gallery-lightbox__prev { left: 12px; }
.bmp-gallery-lightbox__next { right: 12px; }

.bmp-gallery-lightbox__prev:hover,
.bmp-gallery-lightbox__next:hover {
    background: rgba(0, 0, 0, .6);
    opacity: 1;
}

.bmp-gallery-lightbox__prev svg,
.bmp-gallery-lightbox__next svg {
    width: 28px;
    height: 28px;
}

.bmp-gallery-lightbox__meta {
    z-index: 3;
    width: min(900px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 10px 0 16px;
    text-align: center;
    line-height: 1.45;
}

.bmp-gallery-lightbox__credit {
    display: block;
    margin-top: .25rem;
    opacity: .68;
    font-size: .9em;
}

.bmp-gallery-lightbox__status {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 13px;
    pointer-events: none;
}

.bmp-gallery-lightbox__status:empty {
    display: none;
}

.bmp-gallery-lightbox [hidden] {
    display: none !important;
}

@media (min-width: 768px) {
    .wp-block-bmp-gallery.layout-grid .bmp-gallery__grid {
        grid-template-columns: repeat(var(--bmp-gallery-tablet), minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .wp-block-bmp-gallery.layout-grid .bmp-gallery__grid {
        grid-template-columns: repeat(var(--bmp-gallery-desktop), minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .wp-block-bmp-gallery {
        --bmp-gallery-control-size: 40px;
    }

    .wp-block-bmp-gallery.layout-carousel .swiper-button-prev { left: 8px; }
    .wp-block-bmp-gallery.layout-carousel .swiper-button-next { right: 8px; }

    .bmp-gallery-lightbox__toolbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 54px;
        padding: 6px 8px;
    }

    .bmp-gallery-lightbox__counter {
        font-size: 12px;
    }

    .bmp-gallery-lightbox__actions {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .bmp-gallery-lightbox__actions::-webkit-scrollbar {
        display: none;
    }

    .bmp-gallery-lightbox__tool,
    .bmp-gallery-lightbox__close {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
    }

    .bmp-gallery-lightbox__stage {
        padding: 4px 0;
    }

    .bmp-gallery-lightbox__image {
        max-width: 100vw;
        max-width: 100dvw;
        max-height: calc(100vh - 125px);
        max-height: calc(100dvh - 125px);
    }

    .bmp-gallery-lightbox__prev,
    .bmp-gallery-lightbox__next {
        width: 36px;
        height: 48px;
        border-radius: 8px;
        background: rgba(0, 0, 0, .38);
        opacity: .72;
    }

    .bmp-gallery-lightbox__prev { left: 3px; }
    .bmp-gallery-lightbox__next { right: 3px; }

    .bmp-gallery-lightbox__meta {
        width: calc(100vw - 24px);
        padding-bottom: 12px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-block-bmp-gallery .swiper-wrapper,
    .wp-block-bmp-gallery .bmp-gallery__image,
    .wp-block-bmp-gallery .bmp-gallery__masonry-item,
    .bmp-gallery-lightbox__image,
    .bmp-gallery-lightbox__tool,
    .bmp-gallery-lightbox__prev,
    .bmp-gallery-lightbox__next {
        transition-duration: 0ms !important;
    }
}

/* ==========================================================
   BMP Gallery 1.4.0: captions, hover effects and lightbox UX
   ========================================================== */

.wp-block-bmp-gallery .bmp-gallery__media {
    position: relative;
    isolation: isolate;
}

.wp-block-bmp-gallery .bmp-gallery__image,
.wp-block-bmp-gallery .bmp-gallery__figure,
.wp-block-bmp-gallery .bmp-gallery__media {
    transition: transform .28s ease, opacity .28s ease, filter .28s ease, box-shadow .28s ease;
}

.wp-block-bmp-gallery.hover-none .bmp-gallery__image,
.wp-block-bmp-gallery.hover-none .bmp-gallery__figure {
    transition: none;
}

@media (hover: hover) {
    .wp-block-bmp-gallery.hover-zoom .bmp-gallery__link:hover .bmp-gallery__image,
    .wp-block-bmp-gallery.hover-zoom .bmp-gallery__link:focus-visible .bmp-gallery__image {
        transform: scale(1.035);
    }

    .wp-block-bmp-gallery.hover-zoom-strong .bmp-gallery__link:hover .bmp-gallery__image,
    .wp-block-bmp-gallery.hover-zoom-strong .bmp-gallery__link:focus-visible .bmp-gallery__image {
        transform: scale(1.08);
    }

    .wp-block-bmp-gallery.hover-lift .bmp-gallery__figure:hover,
    .wp-block-bmp-gallery.hover-lift .bmp-gallery__figure:focus-within {
        transform: translateY(-4px);
    }

    .wp-block-bmp-gallery.hover-lift .bmp-gallery__figure:hover .bmp-gallery__media,
    .wp-block-bmp-gallery.hover-lift .bmp-gallery__figure:focus-within .bmp-gallery__media {
        box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
    }

    .wp-block-bmp-gallery.hover-fade .bmp-gallery__link:hover .bmp-gallery__image,
    .wp-block-bmp-gallery.hover-fade .bmp-gallery__link:focus-visible .bmp-gallery__image {
        opacity: .72;
    }

    .wp-block-bmp-gallery.hover-grayscale .bmp-gallery__image {
        filter: grayscale(1);
    }

    .wp-block-bmp-gallery.hover-grayscale .bmp-gallery__link:hover .bmp-gallery__image,
    .wp-block-bmp-gallery.hover-grayscale .bmp-gallery__link:focus-visible .bmp-gallery__image {
        filter: grayscale(0);
    }
}

.wp-block-bmp-gallery .bmp-gallery__overlay-meta {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: .18rem;
    padding: .75rem .9rem;
    color: var(--bmp-gallery-caption-color, #fff);
    font-size: .875em;
    line-height: 1.4;
    overflow: hidden;
    pointer-events: none;
}

.wp-block-bmp-gallery .bmp-gallery__overlay-meta::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--bmp-gallery-caption-bg, #000);
    opacity: var(--bmp-gallery-caption-opacity, .7);
}

.wp-block-bmp-gallery.caption-gradient .bmp-gallery__overlay-meta {
    padding-top: clamp(2.6rem, 12%, 5rem);
}

.wp-block-bmp-gallery.caption-gradient .bmp-gallery__overlay-meta::before {
    background: linear-gradient(to top, var(--bmp-gallery-caption-bg, #000) 0%, var(--bmp-gallery-caption-bg, #000) 42%, transparent 100%);
}

.wp-block-bmp-gallery .bmp-gallery__overlay-meta .bmp-gallery__credit {
    opacity: .82;
}

@media (hover: hover) {
    .wp-block-bmp-gallery.caption-bar.caption-animation-fade .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-fade .bmp-gallery__overlay-meta {
        opacity: 0;
        transition: opacity .24s ease;
    }

    .wp-block-bmp-gallery.caption-bar.caption-animation-slide-up .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-slide-up .bmp-gallery__overlay-meta {
        opacity: 0;
        transform: translateY(100%);
        transition: transform .26s ease, opacity .2s ease;
    }

    .wp-block-bmp-gallery.caption-bar.caption-animation-slide-down .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-slide-down .bmp-gallery__overlay-meta {
        opacity: 0;
        transform: translateY(-28%);
        transition: transform .26s ease, opacity .2s ease;
    }

    .wp-block-bmp-gallery.caption-bar.caption-animation-fade .bmp-gallery__figure:hover .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-fade .bmp-gallery__figure:hover .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-bar.caption-animation-fade .bmp-gallery__figure:focus-within .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-fade .bmp-gallery__figure:focus-within .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-bar.caption-animation-slide-up .bmp-gallery__figure:hover .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-slide-up .bmp-gallery__figure:hover .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-bar.caption-animation-slide-up .bmp-gallery__figure:focus-within .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-slide-up .bmp-gallery__figure:focus-within .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-bar.caption-animation-slide-down .bmp-gallery__figure:hover .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-slide-down .bmp-gallery__figure:hover .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-bar.caption-animation-slide-down .bmp-gallery__figure:focus-within .bmp-gallery__overlay-meta,
    .wp-block-bmp-gallery.caption-gradient.caption-animation-slide-down .bmp-gallery__figure:focus-within .bmp-gallery__overlay-meta {
        opacity: 1;
        transform: translateY(0);
    }
}

.bmp-gallery-lightbox__inner {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.bmp-gallery-lightbox__stage {
    isolation: isolate;
}

.bmp-gallery-lightbox__preview {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    display: block;
    max-width: min(94vw, 2048px);
    max-height: calc(100dvh - 175px);
    width: auto;
    height: auto;
    object-fit: contain;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform, opacity;
}

.bmp-gallery-lightbox__image {
    position: relative;
    z-index: 1;
    will-change: transform, opacity;
}

.bmp-gallery-lightbox__image.is-swipe-animating,
.bmp-gallery-lightbox__preview.is-swipe-animating {
    transition: transform .2s cubic-bezier(.2,.8,.2,1), opacity .2s ease !important;
}

.bmp-gallery-lightbox__more {
    position: relative;
    display: none;
}

.bmp-gallery-lightbox__more-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    grid-template-columns: repeat(3, 42px);
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(24,24,24,.96);
    box-shadow: 0 12px 36px rgba(0,0,0,.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bmp-gallery-lightbox__more-menu[hidden] {
    display: none !important;
}

.bmp-gallery-lightbox__more-menu .bmp-gallery-lightbox__tool {
    width: 42px;
    height: 42px;
}

.bmp-gallery-lightbox__thumbs {
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: min(980px, calc(100vw - 28px));
    margin: 0 auto;
    padding: 4px 0 max(10px, env(safe-area-inset-bottom));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.bmp-gallery-lightbox__thumb {
    position: relative;
    flex: 0 0 58px;
    width: 58px;
    height: 44px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 5px;
    background: rgba(255,255,255,.08);
    opacity: .62;
    cursor: pointer;
    scroll-snap-align: center;
    transition: opacity .16s ease, border-color .16s ease, transform .16s ease;
}

.bmp-gallery-lightbox__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bmp-gallery-lightbox__thumb:hover,
.bmp-gallery-lightbox__thumb.is-active {
    opacity: 1;
}

.bmp-gallery-lightbox__thumb.is-active {
    border-color: #fff;
    transform: translateY(-1px);
}

.bmp-gallery-lightbox__thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.bmp-gallery-lightbox__prev[disabled],
.bmp-gallery-lightbox__next[disabled] {
    opacity: .18;
    cursor: default;
}

@media (max-width: 760px) {
    .bmp-gallery-lightbox.is-compact-toolbar .bmp-gallery-lightbox__actions .is-secondary-tool {
        display: none !important;
    }

    .bmp-gallery-lightbox.is-compact-toolbar .bmp-gallery-lightbox__more {
        display: inline-flex;
    }

    .bmp-gallery-lightbox.is-compact-toolbar .bmp-gallery-lightbox__actions {
        overflow: visible;
    }

    .bmp-gallery-lightbox__preview {
        max-width: 100dvw;
        max-height: calc(100dvh - 150px);
    }

    .bmp-gallery-lightbox__thumbs {
        width: calc(100vw - 16px);
        gap: 5px;
        padding-bottom: max(7px, env(safe-area-inset-bottom));
    }

    .bmp-gallery-lightbox__thumb {
        flex-basis: 52px;
        width: 52px;
        height: 39px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-block-bmp-gallery .bmp-gallery__figure,
    .wp-block-bmp-gallery .bmp-gallery__media,
    .wp-block-bmp-gallery .bmp-gallery__overlay-meta,
    .bmp-gallery-lightbox__preview,
    .bmp-gallery-lightbox__thumb {
        transition-duration: 0ms !important;
    }
}

.bmp-gallery-lightbox__current-wrap {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px clamp(58px, 6vw, 94px);
    pointer-events: none;
    will-change: transform, opacity;
}

.bmp-gallery-lightbox__current-wrap .bmp-gallery-lightbox__image {
    pointer-events: auto;
}

.bmp-gallery-lightbox__preview {
    transform: translate(calc(-50% + var(--bmp-gallery-swipe-offset, 0px)), -50%);
}

.bmp-gallery-lightbox__current-wrap.is-swipe-animating {
    transition: transform .2s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
}

@media (max-width: 760px) {
    .bmp-gallery-lightbox__current-wrap {
        padding: 4px 0;
    }
}

/* Stage sizing after the 1.4 lightbox track was introduced. */
.bmp-gallery-lightbox__stage {
    padding: 0;
}

.bmp-gallery-lightbox__current-wrap .bmp-gallery-lightbox__image {
    max-width: 100%;
    max-height: 100%;
}
