body.zoomed,
body.image-gallery-open{
  overflow:hidden!important;
  height:100vh!important;
}
.img-gallery-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.92);
}
.img-gallery-overlay.open{display:flex}
.img-gallery-stage{
  width:100%;
  max-width:100vw;
  max-height:100vh;
  overflow:auto;
  overscroll-behavior:contain;
}
.img-gallery-stage.zoomed{width:100%!important;overflow:auto}
.img-gallery-image{
  display:block;
  margin:auto;
  max-width:100vw;
  max-height:100vh;
  width:auto;
  height:auto;
  cursor:zoom-in;
  transition:transform 280ms ease;
  transform-origin:50% 50%;
  user-select:none;
  -webkit-user-drag:none;
}
.img-gallery-stage.zoomed .img-gallery-image{cursor:zoom-out;max-width:none;max-height:none}
.img-gallery-prev,.img-gallery-next,.img-gallery-close{
  position:absolute;
  z-index:10001;
  width:40px;
  height:40px;
  border:0;
  border-radius:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#343434;
  color:#fff;
  cursor:pointer;
  user-select:none;
  transition:background-color .2s ease,opacity .2s ease;
}
.img-gallery-prev:hover,.img-gallery-next:hover,.img-gallery-close:hover{background:#696969}
.img-gallery-prev{left:20px}.img-gallery-next{right:20px}.img-gallery-close{top:20px;right:25px}
.img-gallery-prev svg,.img-gallery-next svg{fill:#fff;height:13px!important;width:15px!important}
.img-gallery-next svg{margin-left:1px;transform:rotate(180deg)}
.img-gallery-close svg{fill:#fff;width:10px;height:10px}
.img-gallery-counter{
  position:absolute;
  z-index:10000;
  left:24px;
  top:24px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(52,52,52,.78);
  color:#fff;
  font:500 11px/1 Inter,system-ui,sans-serif;
  letter-spacing:.04em;
}
.img-gallery-overlay.zoomed .img-gallery-close,
.img-gallery-overlay.zoomed .img-gallery-next,
.img-gallery-overlay.zoomed .img-gallery-prev,
.img-gallery-overlay.zoomed .img-gallery-counter{opacity:0;pointer-events:none}
img[data-full-src]{cursor:zoom-in}
@media(max-width:720px){
  .img-gallery-prev{left:10px}.img-gallery-next{right:10px}.img-gallery-close{top:10px;right:10px}.img-gallery-counter{top:14px;left:14px}
}
.img-gallery-prev[hidden],.img-gallery-next[hidden],.img-gallery-counter[hidden]{display:none!important}
/* Modal-dialog gallery stays in the browser top layer, including above an
   already open HEALTH / RECORD dialog. */
.img-gallery-overlay{
  width:100vw;
  height:100dvh;
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  color:#fff;
}
.img-gallery-overlay::backdrop{background:rgba(0,0,0,.92)}
