.product-media-modal {
  background-color: rgb(var(--color-background));
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  z-index: -1;
}

.product-media-modal[open] {
  visibility: visible;
  opacity: 1;
  z-index: 101;
}

.product-media-modal__dialog {
  display: flex;
  align-items: center;
  height: 100vh;
}

.product-media-modal__toggle {
  background-color: rgb(var(--color-background));
  border: 1px solid rgba(var(--color-foreground), .1);
  border-radius: 50%;
  color: rgba(var(--color-foreground), .55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  right: 20px;
  padding: 12px;
  position: fixed;
  z-index: 2;
  top: 20px;
  width: 40px;
  height: 40px;
}

.product-media-modal__content {
  max-height: 100vh;
  width: 100%;
  overflow: auto;
}

.product-media-modal__content>* {
  display: block;
  height: auto;
  margin: auto;
}

.product__media-icon {
  background-color: rgb(var(--color-background));
  border-radius: 50%;
  border: .1rem solid rgba(var(--color-foreground), .1);
  color: rgb(var(--color-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  z-index: 1;
  opacity: 1;
  transition: color var(--duration-short)ease, opacity var(--duration-short)ease;
  pointer-events: none;
}

.product__media-icon span.lightbox-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 7px;
}

.product__media-icon span.lightbox-icon svg {
  width: 12px;
  height: 12px;
}

.product-media-modal__content>* {
  width: 100%;
}

.product-media {
  position: relative;
  width: 100%;
  height: 100%;
}

media-gallery .swiper-slide .loading__spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
}

media-gallery .image-magnify-full-size {
  cursor: zoom-out;
  z-index: 1;
  margin: 0;
  border-radius: calc(var(--media-radius) - var(--media-border-width));
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
}

.image-magnify-hover {
  pointer-events: none;
}

.light-box-zoom-trigger {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

@media screen and (min-width: 750px) {
  .product-media-modal__toggle {
    right: 50px;
    top: 22px;
  }
  
  .product-media-modal__dialog .global-media-settings--no-shadow {
    overflow: visible !important;
  }

  .product__media-icon {
    opacity: 0;
  }
  
  media-gallery .swiper:hover .product__media-icon {
    opacity: 1;
  }
}

@media screen and (min-width: 990px) {
  .product-media-modal__toggle {
    right: 50px;
  }

  .product-media-modal__content {
    padding: 20px 110px;
  }

  .product-media-modal__content {
    padding-bottom: 15px;
  }

  .image-magnify-hover {
    cursor: zoom-in;
    pointer-events: auto;
  }

  .product__media-icon.hover-zoom-enabled {
    display: none;
  }
  
  .light-box-zoom-trigger.hover-zoom-enabled{
    pointer-events: none;
    cursor: zoom-in;
  }

  media-gallery .swiper-pagination {
    pointer-events: none;
  }
}

@media screen and (max-width: 750px) {
  .product-media-modal__content>*:not(.active){
    display: none;
  }

  .product-media-modal__content>*.active{
    display: block;
  }

  .product-media-modal__content>* {
    height: 100vh;
    object-fit: cover;
  }
}