/* Only opted-in galleries and their directly owned image captions are styled. */
.be-gallery:is([data-be-gallery-caption=label],[data-be-gallery-caption=outside]) > figure.wp-block-image:has(figcaption)::before,
.be-gallery:is([data-be-gallery-caption=label],[data-be-gallery-caption=outside]) > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:has(figcaption)::before {
 content:none!important;display:none!important;backdrop-filter:none!important;
}
.be-gallery:is([data-be-gallery-caption=label],[data-be-gallery-caption=outside]) > figure.wp-block-image > figcaption,
.be-gallery:is([data-be-gallery-caption=label],[data-be-gallery-caption=outside]) > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 scrollbar-gutter:auto!important;box-sizing:border-box!important;margin:0!important;color:var(--be-gallery-caption-color)!important;background:var(--be-gallery-caption-bg)!important;text-shadow:none!important;font-size:var(--be-gallery-caption-font-size,14px)!important;line-height:1.5!important;border-radius:var(--be-gallery-caption-radius)!important;padding:var(--be-gallery-caption-padding-top) var(--be-gallery-caption-padding-right) var(--be-gallery-caption-padding-bottom) var(--be-gallery-caption-padding-left)!important;flex-grow:0!important;flex-basis:auto!important;
}
.be-gallery[data-be-gallery-caption=label] > figure.wp-block-image,
.be-gallery[data-be-gallery-caption=label] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {
 position:relative;
}
.be-gallery[data-be-gallery-caption=label] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 position:absolute!important;inset:auto!important;display:block!important;text-align:center!important;height:auto!important;min-height:0!important;width:max-content!important;max-width:calc(100% - 2 * var(--be-gallery-caption-gap))!important;max-height:calc(100% - 2 * var(--be-gallery-caption-gap))!important;overflow:auto!important;z-index:2;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=top-left] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=top-left] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 top:var(--be-gallery-caption-gap)!important;left:var(--be-gallery-caption-gap)!important;transform:none!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=top] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=top] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 top:var(--be-gallery-caption-gap)!important;left:50%!important;transform:translateX(-50%)!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=top-right] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=top-right] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 top:var(--be-gallery-caption-gap)!important;right:var(--be-gallery-caption-gap)!important;transform:none!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=left] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=left] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 top:50%!important;left:var(--be-gallery-caption-gap)!important;transform:translateY(-50%)!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=right] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=right] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 top:50%!important;right:var(--be-gallery-caption-gap)!important;transform:translateY(-50%)!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=bottom-left] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=bottom-left] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 bottom:var(--be-gallery-caption-gap)!important;left:var(--be-gallery-caption-gap)!important;transform:none!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=bottom] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=bottom] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 bottom:var(--be-gallery-caption-gap)!important;left:50%!important;transform:translateX(-50%)!important;
}
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=bottom-right] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label][data-be-gallery-position=bottom-right] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 bottom:var(--be-gallery-caption-gap)!important;right:var(--be-gallery-caption-gap)!important;transform:none!important;
}
.be-gallery[data-be-gallery-caption=outside] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=outside] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 position:static!important;inset:auto!important;transform:none!important;display:block!important;width:100%!important;max-width:100%!important;max-height:none!important;overflow:visible!important;margin-top:var(--be-gallery-caption-gap)!important;text-align:var(--be-gallery-caption-align,center)!important;
}
.be-gallery[data-be-gallery-align=left] {--be-gallery-caption-align:left;}
.be-gallery[data-be-gallery-align=center] {--be-gallery-caption-align:center;}
.be-gallery[data-be-gallery-align=right] {--be-gallery-caption-align:right;}
@supports (corner-shape:squircle) {
.be-gallery:is([data-be-gallery-caption=label],[data-be-gallery-caption=outside])[data-be-gallery-squircle=yes] > figure.wp-block-image > figcaption,
.be-gallery:is([data-be-gallery-caption=label],[data-be-gallery-caption=outside])[data-be-gallery-squircle=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 corner-shape:squircle;
}
}
.be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]),
.be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]) > .block-editor-inner-blocks > .block-editor-block-list__layout {display:grid!important;grid-template-columns:repeat(var(--be-gallery-columns,3),minmax(0,1fr))!important;gap:var(--wp--style--unstable-gallery-gap,var(--wp--style--block-gap,16px));align-items:stretch;}
.be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]) > .block-editor-inner-blocks {grid-column:1 / -1;min-width:0;}
.be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]) > figure.wp-block-image,
.be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]) > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {
 width:100%!important;min-width:0!important;max-width:100%!important;flex-grow:0!important;margin:0!important;
}
.be-gallery[data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {
 grid-column:1 / -1;
}
.be-gallery[data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {
 grid-column:1 / -1;
}
@media(max-width:599px){.be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]), .be-gallery:is([data-be-gallery-layout=equal],[data-be-gallery-layout=first],[data-be-gallery-layout=last]) > .block-editor-inner-blocks > .block-editor-block-list__layout {grid-template-columns:repeat(var(--be-gallery-mobile-columns,2),minmax(0,1fr))!important;}}

/* Responsive gallery layout uses the same breakpoints as Columns. */
.be-gallery[data-be-gallery-responsive=yes],
.be-gallery[data-be-gallery-responsive=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout {gap:var(--wp--style--unstable-gallery-gap,var(--wp--style--block-gap,16px));align-items:stretch;}
.be-gallery[data-be-gallery-responsive=yes] > .block-editor-inner-blocks {width:100%;min-width:0;grid-column:1/-1;}
.be-gallery[data-be-gallery-responsive=yes] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {margin:0!important;min-width:0!important;max-width:none!important;scroll-snap-align:start;}
@media(min-width:992px) {
.be-gallery[data-be-gallery-responsive=yes] {--be-gallery-active-count:var(--be-gallery-count-pc);--be-gallery-active-visible:var(--be-gallery-visible-pc);--be-gallery-active-gap-factor:var(--be-gallery-gap-factor-pc);}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=true][data-be-gallery-width-mode=equal],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=true][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:grid!important;grid-template-columns:repeat(var(--be-gallery-active-count),minmax(0,1fr))!important;overflow:visible!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=true][data-be-gallery-width-mode=equal] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=true][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:100%!important;flex-grow:0!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=true][data-be-gallery-width-mode=individual],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=true][data-be-gallery-width-mode=individual] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;overflow:visible!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=false],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=false] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x proximity;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=false][data-be-gallery-width-mode=equal] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-pc=false][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:calc(100% / var(--be-gallery-active-visible) - var(--be-gallery-active-gap-factor) * var(--be-gallery-gap,16px))!important;flex:0 0 calc(100% / var(--be-gallery-active-visible) - var(--be-gallery-active-gap-factor) * var(--be-gallery-gap,16px))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=individual] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=individual] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:var(--be-gallery-image-basis,calc(100% / var(--be-gallery-active-count)))!important;flex:0 0 var(--be-gallery-image-basis,calc(100% / var(--be-gallery-active-count)))!important;}
}
@media(min-width:576px) and (max-width:991px) {
.be-gallery[data-be-gallery-responsive=yes] {--be-gallery-active-count:var(--be-gallery-count-tablet);--be-gallery-active-visible:var(--be-gallery-visible-tablet);--be-gallery-active-gap-factor:var(--be-gallery-gap-factor-tablet);}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=true][data-be-gallery-width-mode=equal],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=true][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:grid!important;grid-template-columns:repeat(var(--be-gallery-active-count),minmax(0,1fr))!important;overflow:visible!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=true][data-be-gallery-width-mode=equal] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=true][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:100%!important;flex-grow:0!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=true][data-be-gallery-width-mode=individual],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=true][data-be-gallery-width-mode=individual] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;overflow:visible!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=false],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=false] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x proximity;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=false][data-be-gallery-width-mode=equal] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-tablet=false][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:calc(100% / var(--be-gallery-active-visible) - var(--be-gallery-active-gap-factor) * var(--be-gallery-gap,16px))!important;flex:0 0 calc(100% / var(--be-gallery-active-visible) - var(--be-gallery-active-gap-factor) * var(--be-gallery-gap,16px))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=individual] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=individual] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:var(--be-gallery-image-basis,calc(100% / var(--be-gallery-active-count)))!important;flex:0 0 var(--be-gallery-image-basis,calc(100% / var(--be-gallery-active-count)))!important;}
}
@media(max-width:575px) {
.be-gallery[data-be-gallery-responsive=yes] {--be-gallery-active-count:var(--be-gallery-count-mobile);--be-gallery-active-visible:var(--be-gallery-visible-mobile);--be-gallery-active-gap-factor:var(--be-gallery-gap-factor-mobile);}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=true][data-be-gallery-width-mode=equal],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=true][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:grid!important;grid-template-columns:repeat(var(--be-gallery-active-count),minmax(0,1fr))!important;overflow:visible!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=true][data-be-gallery-width-mode=equal] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=true][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:100%!important;flex-grow:0!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=true][data-be-gallery-width-mode=individual],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=true][data-be-gallery-width-mode=individual] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;overflow:visible!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=false],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=false] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x proximity;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=false][data-be-gallery-width-mode=equal] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-wrap-mobile=false][data-be-gallery-width-mode=equal] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:calc(100% / var(--be-gallery-active-visible) - var(--be-gallery-active-gap-factor) * var(--be-gallery-gap,16px))!important;flex:0 0 calc(100% / var(--be-gallery-active-visible) - var(--be-gallery-active-gap-factor) * var(--be-gallery-gap,16px))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=individual] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=individual] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:var(--be-gallery-image-basis,calc(100% / var(--be-gallery-active-count)))!important;flex:0 0 var(--be-gallery-image-basis,calc(100% / var(--be-gallery-active-count)))!important;}
}

/* Match the Columns continuation shade without intercepting clicks or swipes. */
.be-gallery-scroll-shade {position:relative;}
.be-gallery-scroll-shade > .be-gallery-gradient-shade {
 display:block;position:sticky;right:0;top:0;align-self:stretch;width:min(80px,25%);flex:0 0 min(80px,25%);z-index:2;
 margin-inline-start:calc(-1 * min(80px,25%) - var(--be-gallery-gap,16px));pointer-events:none;
 background:linear-gradient(to right,transparent 0%,var(--be-gallery-gradient-color,#ffffff) 85%,var(--be-gallery-gradient-color,#ffffff) 100%);
}

/* Let incomplete rows grow like the native gallery; column count is an upper limit. */
@media(min-width:992px){
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:auto!important;flex:1 0 calc((100% - (var(--be-gallery-active-count) - 1) * var(--be-gallery-gap,16px)) / var(--be-gallery-active-count))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true][data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true][data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {width:100%!important;flex:0 0 100%!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true][data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-pc=true][data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {width:100%!important;flex:0 0 100%!important;}
}
@media(min-width:576px) and (max-width:991px){
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:auto!important;flex:1 0 calc((100% - (var(--be-gallery-active-count) - 1) * var(--be-gallery-gap,16px)) / var(--be-gallery-active-count))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true][data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true][data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {width:100%!important;flex:0 0 100%!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true][data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-tablet=true][data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {width:100%!important;flex:0 0 100%!important;}
}
@media(max-width:575px){
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true],
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true] > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:auto!important;flex:1 0 calc((100% - (var(--be-gallery-active-count) - 1) * var(--be-gallery-gap,16px)) / var(--be-gallery-active-count))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true][data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true][data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {width:100%!important;flex:0 0 100%!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true][data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-fill-row=true][data-be-gallery-wrap-mobile=true][data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {width:100%!important;flex:0 0 100%!important;}
}

/* Optional row plans (for example 2,3) override the automatic row grouping. */
@media(min-width:992px){
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes]),
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes]) > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes]) > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes]) > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:auto!important;flex:1 0 calc((100% - (var(--be-gallery-row-count,var(--be-gallery-active-count)) - 1) * var(--be-gallery-gap,16px)) / var(--be-gallery-row-count,var(--be-gallery-active-count)))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-fill-row=false] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-fill-row=false] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {flex-grow:0!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {width:100%!important;flex:0 0 100%!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-pc=true]:is([data-be-gallery-rows-pc],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {width:100%!important;flex:0 0 100%!important;}
}
@media(min-width:576px) and (max-width:991px){
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes]),
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes]) > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes]) > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes]) > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:auto!important;flex:1 0 calc((100% - (var(--be-gallery-row-count,var(--be-gallery-active-count)) - 1) * var(--be-gallery-gap,16px)) / var(--be-gallery-row-count,var(--be-gallery-active-count)))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-fill-row=false] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-fill-row=false] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {flex-grow:0!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {width:100%!important;flex:0 0 100%!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-tablet=true]:is([data-be-gallery-rows-tablet],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {width:100%!important;flex:0 0 100%!important;}
}
@media(max-width:575px){
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes]),
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes]) > .block-editor-inner-blocks > .block-editor-block-list__layout {display:flex!important;flex-wrap:wrap!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes]) > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes]) > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {width:auto!important;flex:1 0 calc((100% - (var(--be-gallery-row-count,var(--be-gallery-active-count)) - 1) * var(--be-gallery-gap,16px)) / var(--be-gallery-row-count,var(--be-gallery-active-count)))!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-fill-row=false] > figure.wp-block-image,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-fill-row=false] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image {flex-grow:0!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=first] > figure.wp-block-image:first-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=first] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:first-of-type {width:100%!important;flex:0 0 100%!important;}
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=last] > figure.wp-block-image:last-of-type,
.be-gallery[data-be-gallery-responsive=yes][data-be-gallery-width-mode=equal][data-be-gallery-wrap-mobile=true]:is([data-be-gallery-rows-mobile],[data-be-gallery-row-breaks-active=yes])[data-be-gallery-layout=last] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image:last-of-type {width:100%!important;flex:0 0 100%!important;}
}

/* Keep blur and tint on a separate layer behind the text. */
.be-gallery[data-be-gallery-caption=label] > figure.wp-block-image > figcaption,
.be-gallery[data-be-gallery-caption=label] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption {
 background:transparent!important;opacity:1!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
.be-gallery[data-be-gallery-caption=label] > figure.wp-block-image > figcaption::before,
.be-gallery[data-be-gallery-caption=label] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > figcaption::before {
 content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;opacity:1;
 background:var(--be-gallery-caption-bg)!important;
 -webkit-backdrop-filter:var(--be-gallery-caption-backdrop,none)!important;
 backdrop-filter:var(--be-gallery-caption-backdrop,none)!important;
}


/* Round the actual image, leaving captions and lightbox controls unclipped. */
.be-gallery[data-be-gallery-image-radius=yes] > figure.wp-block-image > img,
.be-gallery[data-be-gallery-image-radius=yes] > figure.wp-block-image > a > img,
.be-gallery[data-be-gallery-image-radius=yes] > figure.wp-block-image > picture > img,
.be-gallery[data-be-gallery-image-radius=yes] > figure.wp-block-image > .components-resizable-box__container img,
.be-gallery[data-be-gallery-image-radius=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > img,
.be-gallery[data-be-gallery-image-radius=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > a > img,
.be-gallery[data-be-gallery-image-radius=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > picture > img,
.be-gallery[data-be-gallery-image-radius=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > .components-resizable-box__container img {border-radius:var(--be-gallery-image-radius)!important;}
@supports (corner-shape:squircle){
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > figure.wp-block-image > img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > figure.wp-block-image > a > img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > figure.wp-block-image > picture > img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > figure.wp-block-image > .components-resizable-box__container img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > a > img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > picture > img,
.be-gallery[data-be-gallery-image-radius=yes][data-be-gallery-image-squircle=yes] > .block-editor-inner-blocks > .block-editor-block-list__layout > figure.wp-block-image > .components-resizable-box__container img {corner-shape:squircle;}
}
