.medium-zoom-overlay {
  z-index: var(--medium-zoom-z-index);

  /* override element style set by medium-zoom script */
  background-color: var(--medium-zoom-bg-color) !important;
}

.medium-zoom-overlay ~ img {
  z-index: calc(var(--medium-zoom-z-index) + 1);
}

.medium-zoom--opened .medium-zoom-overlay {
  opacity: var(--medium-zoom-opacity);
}
