
#mdg-ivp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483000; /* on top of pretty much everything */
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
#mdg-ivp-stage {
  position: relative;
  max-width: 96vw;
  max-height: 88vh;
}
#mdg-ivp-img {
  display: block;
  max-width: 96vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
#mdg-ivp-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: none;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 22px;
  line-height: 36px;
  cursor: pointer;
  z-index: 2147483647;
}
#mdg-ivp-prev, #mdg-ivp-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 22px;
  line-height: 44px;
  cursor: pointer;
}
#mdg-ivp-prev { left: -56px; }
#mdg-ivp-next { right: -56px; }

@media (max-width: 480px) {
  #mdg-ivp-prev, #mdg-ivp-next { display: none; } /* keep UI simple on very small screens; swipe works */
}
