/* BM Photo Tools: photos inside an article (also used for the live preview in the editor). */
.bmpt-g{position:relative;margin:1.8em 0;max-width:100%;box-sizing:border-box}
.bmpt-g *{box-sizing:border-box}
.bmpt-it{margin:0;position:relative;min-width:0}
.bmpt-it img{display:block;width:100%;height:auto;border-radius:10px;object-fit:cover;max-width:100%}
.bmpt-cap{font-size:.78em;line-height:1.4;opacity:.85;font-style:italic;margin:.4em 0 0}
.bmpt-cap a{color:inherit;text-decoration:underline}
.bmpt-g[data-zoom="1"] .bmpt-it img,.bmpt-g[data-zoom="1"] .bmpt-stage img{cursor:zoom-in}

/* one picture / stacked */
.bmpt-g--single .bmpt-track{display:block}
.bmpt-g--stacked .bmpt-track{display:grid;gap:22px}

/* grids */
.bmpt-g--pair .bmpt-track,.bmpt-g--grid4 .bmpt-track,.bmpt-g--row3 .bmpt-track{display:grid;gap:10px;align-items:start}
.bmpt-g--pair .bmpt-track{grid-template-columns:repeat(2,1fr)}
.bmpt-g--grid4 .bmpt-track{grid-template-columns:repeat(2,1fr)}
.bmpt-g--row3 .bmpt-track{grid-template-columns:repeat(3,1fr)}
.bmpt-g--pair .bmpt-it img,.bmpt-g--grid4 .bmpt-it img,.bmpt-g--row3 .bmpt-it img{aspect-ratio:4/3}

/* mosaic: first picture large; credits sit on the picture so the rows stay even */
.bmpt-g--mosaic .bmpt-track{display:grid;gap:8px;grid-template-columns:repeat(4,1fr);grid-auto-rows:clamp(90px,13vw,160px)}
.bmpt-g--mosaic .bmpt-it{overflow:hidden;border-radius:10px}
.bmpt-g--mosaic .bmpt-it:first-child{grid-column:span 2;grid-row:span 2}
.bmpt-g--mosaic .bmpt-it img{height:100%;border-radius:0}
.bmpt-g--mosaic .bmpt-cap{position:absolute;left:0;right:0;bottom:0;margin:0;padding:18px 8px 5px;color:#fff;background:linear-gradient(to top,rgba(0,0,0,.65),rgba(0,0,0,0));font-size:.7em;opacity:1}

/* carousel */
.bmpt-g--carousel .bmpt-track{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.bmpt-g--carousel .bmpt-track::-webkit-scrollbar{display:none}
.bmpt-g--carousel .bmpt-it{flex:0 0 100%;scroll-snap-align:center}
.bmpt-g--carousel .bmpt-it img{aspect-ratio:3/2}
.bmpt-nav{position:absolute;top:calc(50% - 30px);width:42px;height:42px;margin-top:-21px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:#3a1d55;box-shadow:0 2px 8px rgba(0,0,0,.35);font-size:22px;line-height:42px;padding:0;cursor:pointer;z-index:2}
.bmpt-nav:hover,.bmpt-nav:focus-visible{background:#fff;outline:3px solid #F5B82E}
.bmpt-nav[disabled]{opacity:.35;cursor:default}
.bmpt-prev{left:10px}.bmpt-next{right:10px}
.bmpt-dots{display:flex;justify-content:center;gap:8px;margin-top:10px}
.bmpt-dot{width:9px;height:9px;border-radius:50%;border:0;padding:0;background:#cdbfe0;cursor:pointer}
.bmpt-dot[aria-current="true"]{background:#5B2C83;transform:scale(1.25)}

/* gallery: big picture and a strip of small ones */
.bmpt-g--gallery .bmpt-track{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.bmpt-g--gallery .bmpt-it img{aspect-ratio:4/3}
.bmpt-g--gallery.bmpt-js .bmpt-track{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}
.bmpt-g--gallery.bmpt-js .bmpt-it{flex:0 0 92px;cursor:pointer}
.bmpt-g--gallery.bmpt-js .bmpt-it img{aspect-ratio:1/1;opacity:.6;border-radius:8px;cursor:pointer}
.bmpt-g--gallery.bmpt-js .bmpt-it.is-on img{opacity:1;outline:3px solid #F5B82E;outline-offset:-3px}
.bmpt-g--gallery.bmpt-js .bmpt-it .bmpt-cap{display:none}
.bmpt-stage{margin:0 0 10px}
.bmpt-stage img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:10px}

@media (max-width:600px){
	.bmpt-g--pair .bmpt-track,.bmpt-g--grid4 .bmpt-track,.bmpt-g--row3 .bmpt-track{grid-template-columns:1fr}
	.bmpt-g--mosaic .bmpt-track{grid-template-columns:1fr;grid-auto-rows:auto}
	.bmpt-g--mosaic .bmpt-it:first-child{grid-column:auto;grid-row:auto}
	.bmpt-g--mosaic .bmpt-it img{height:auto;aspect-ratio:4/3}
	.bmpt-nav{width:38px;height:38px;margin-top:-19px;line-height:38px}
}

/* tap to enlarge */
.bmpt-lb{position:fixed;inset:0;z-index:999999;background:rgba(15,8,22,.92);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px;color:#fff}
.bmpt-lb img{max-width:100%;max-height:78vh;object-fit:contain;border-radius:6px;background:#111}
.bmpt-lb-cap{margin-top:12px;font-size:.9em;max-width:760px;text-align:center;opacity:.92}
.bmpt-lb-cap a{color:#F5B82E}
.bmpt-lb button{position:absolute;border:0;background:rgba(255,255,255,.16);color:#fff;width:46px;height:46px;border-radius:50%;font-size:26px;line-height:46px;padding:0;cursor:pointer}
.bmpt-lb button:hover,.bmpt-lb button:focus-visible{background:rgba(255,255,255,.3);outline:3px solid #F5B82E}
.bmpt-lb-x{top:14px;right:14px}.bmpt-lb-p{left:12px;top:50%;margin-top:-23px}.bmpt-lb-n{right:12px;top:50%;margin-top:-23px}
.bmpt-lb-count{position:absolute;top:22px;left:18px;font-size:.85em;opacity:.8}
body.bmpt-lock{overflow:hidden}
@media (prefers-reduced-motion:reduce){.bmpt-g--carousel .bmpt-track{scroll-behavior:auto}}
