/* Shared media lightbox; contained media never creates a scrolling dialog. */
.bwp-media-dialog{box-sizing:border-box;position:fixed;inset:0;width:min(1200px,96vw);max-width:96vw;height:min(850px,94dvh);max-height:94dvh;margin:auto;padding:48px 64px 44px;border:0;background:transparent;color:#fffdf7;overflow:hidden}
.bwp-media-dialog::backdrop{background:rgba(15,42,31,.94);backdrop-filter:blur(5px)}
.bwp-lightbox-shell{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0}
.bwp-lightbox-stage{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;min-width:0}
.bwp-lightbox-stage .bwp-lightbox-photo{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 12px 25px #0005)}
.bwp-lightbox-stage :is(figure,.wp-block-embed__wrapper){width:100%;margin:0;max-height:100%}
.bwp-lightbox-stage :is(video,iframe){display:block;width:100%;height:auto;max-height:100%;aspect-ratio:16/9;object-fit:contain;background:#10231a;border:6px solid #fffdf7;border-radius:5px;box-sizing:border-box;box-shadow:0 12px 30px #0004}
.bwp-lightbox-stage figcaption{display:none}
.bwp-media-dialog button{position:absolute;display:grid;place-items:center;padding:0;width:44px;height:44px;min-width:44px;border:1px solid #e5d5aa;border-radius:4px;color:#254a38;background:#fffdf7;cursor:pointer;font:36px/1 system-ui;transition:background .2s,color .2s}
.bwp-media-dialog button:hover{background:#e7b543;color:#173426}
.bwp-media-dialog button:focus-visible{outline:3px solid #e7b543;outline-offset:4px}
.bwp-media-dialog button[hidden]{display:none}
.bwp-media-dialog .bwp-lightbox-close{right:-48px;top:-42px;background:transparent;color:#fffdf7;border:0}
.bwp-media-dialog .bwp-lightbox-prev{left:-54px;top:calc(50% - 22px)}
.bwp-media-dialog .bwp-lightbox-next{right:-54px;top:calc(50% - 22px)}
.bwp-lightbox-count{position:absolute;bottom:-38px;left:0;right:0;margin:0;text-align:center;color:#edbd51;font:600 22px/1.3 'Wisekal Caveat',cursive}
.bwp-gallery-open{display:block;position:relative;width:100%;height:100%;padding:0;border:0;border-radius:inherit;overflow:hidden;background:#e8e2d3;cursor:zoom-in}
body .bwp-gallery-open img{display:block;width:100%!important;height:100%!important;object-fit:cover;max-height:none;border-radius:inherit}
.bwp-gallery-open:focus-visible{outline:3px solid #d99b21;outline-offset:-5px}
.bwp-gallery-story-link{display:inline-block;margin:18px 0;font-weight:750;text-decoration:underline;text-decoration-color:#d99b21;text-underline-offset:6px;text-decoration-thickness:2px;color:#254a38}
/* Gallery-only story bubbles retain the shared stagger, without empty copy panels. */
body.wisekal-loop-layout-bubbles :is(.wisekal-gallery-story,.is-style-bwp-timeline>.wp-block-post-template>li:has([data-bwp-gallery])){padding-bottom:16px!important}
body.wisekal-loop-layout-bubbles :is(.wisekal-gallery-story,.is-style-bwp-timeline>.wp-block-post-template>li:has([data-bwp-gallery])) .bwp-format-gallery{height:306px!important}
body .is-style-bwp-timeline li:has([data-bwp-gallery]) .bwp-story-copy:not(:has(h2,p,a)){display:none!important}
.wisekal-gallery-actions{padding:0 8px}
body .wisekal-story-feature.wisekal-gallery-story{display:block;min-height:0}
body .wisekal-story-feature.wisekal-gallery-story .bwp-format-gallery{height:350px}
@media(max-width:700px){.bwp-media-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;padding:60px 12px 78px}.bwp-media-dialog .bwp-lightbox-close{top:-49px;right:0}.bwp-media-dialog .bwp-lightbox-prev{top:auto;bottom:-62px;left:calc(50% - 94px)}.bwp-media-dialog .bwp-lightbox-next{top:auto;bottom:-62px;right:calc(50% - 94px)}.bwp-lightbox-count{bottom:-51px}.bwp-lightbox-stage :is(video,iframe){border-width:3px}body.wisekal-loop-layout-bubbles :is(.wisekal-gallery-story,.is-style-bwp-timeline>.wp-block-post-template>li:has([data-bwp-gallery])){min-height:0!important}body.wisekal-loop-layout-bubbles :is(.wisekal-gallery-story,.is-style-bwp-timeline>.wp-block-post-template>li:has([data-bwp-gallery])) .bwp-format-gallery{height:240px!important}}
@media(prefers-reduced-motion:reduce){.bwp-media-dialog button{transition:none}}
/* Square previews by default; the viewer always contains the original image. */
body .bwp-format-gallery,body.wisekal-loop-layout-bubbles :is(.wisekal-gallery-story,.is-style-bwp-timeline>.wp-block-post-template>li:has([data-bwp-gallery])) .bwp-format-gallery{height:auto!important;aspect-ratio:1/1;min-height:0}
body .wisekal-story-feature.wisekal-gallery-story{width:min(100%,560px);margin-inline:auto}
.bwp-lightbox-stage .bwp-lightbox-photo{box-sizing:border-box;width:auto;height:auto;max-width:100%;max-height:100%;border:6px solid #fffdf7;border-radius:5px}
@media(max-width:700px){.bwp-lightbox-stage .bwp-lightbox-photo{border-width:3px}}
/* Native homepage timelines set every media image to 220px. Gallery slides must
   fill their square viewport, independently of ordinary story thumbnails. */
body .bwp-format-gallery .bwp-gallery-open img,
body.wisekal-loop-layout-bubbles .is-style-bwp-timeline .bwp-story-media .bwp-format-gallery .bwp-gallery-open img{height:100%!important;aspect-ratio:auto!important;object-fit:cover}
