.ecom-modal * {
  box-sizing: border-box;
}

.ecom-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  background: rgba(0,0,0,.7);
  opacity: 0;
}

/* modal
-------------------------------------------------------------- */

.ecom-modal--noOverlayClose {
  cursor: default;
}

.ecom-modal--noClose .ecom-modal__close {
  display: none;
}

.ecom-modal__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  background-color: transparent;
  color: #fff;
  cursor: pointer;
}

.ecom-modal__close svg * {
  fill: currentColor;
}

.ecom-modal__closeLabel {
  display: none;
}

.ecom-modal__close:hover {
  color: #fff;
  background-color: transparent;
}

.ecom-modal-box {
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: auto;
  max-height: 90vh;
  opacity: 1;
  cursor: auto;
  overflow-y: hidden;
  overflow-x: hidden;
  will-change: transform, opacity;
}
.ecom-modal-box__content {
  max-width: 90vw;
  display: inline-flex;
  justify-content: center;
  height: 100%;
  max-height: 90vh;
  overflow: hidden;
}
.ecom-modal__closeIcon svg {
  width: 20px;
  height: 20px;
}

.ecom-modal-box__footer {
  padding: 1.5rem 2rem;
  width: auto;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  background-color: #f5f5f5;
  cursor: auto;
}

.ecom-modal-box__footer::after {
  display: table;
  clear: both;
  content: "";
}

.ecom-modal-box__footer--sticky {
  position: fixed;
  bottom: -200px; /* TODO : find a better way */
  z-index: 10001;
  opacity: 1;
  transition: bottom .3s ease-in-out .3s;
}
.ecom-modal-box__content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* state
-------------------------------------------------------------- */

.ecom-enabled {
  position: fixed;
  right: 0;
  left: 0;
  overflow: hidden;
}

.ecom-modal--visible .ecom-modal-box__footer {
  bottom: 0;
}

.ecom-modal--visible {
  visibility: visible;
  opacity: 1;
}

.ecom-modal--visible .ecom-modal-box {
  animation: scale .2s cubic-bezier(.68, -.55, .265, 1.55) forwards;
}

.ecom-modal--overflow {
  overflow-y: scroll;
}
.ecom-modal-gallery {
  width: 100%;
  position: relative;
}
.ecom-modal-gallery .ecom-swiper-button {
  color: #fff;
  position: absolute !important;
}
.ecom-modal-gallery div:empty {
  display: block;
}
.ecom-modal-gallery .ecom-swiper-button::after {
  font-size: 30px;
}
.ecom-modal-gallery .ecom-swiper-wrapper .ecom-modal-gallery-item {
  width: 100%;
  height: 100%;
  text-align: center;
  display: flex;
  align-items: center;
}
/* animations
-------------------------------------------------------------- */

@keyframes scale {
  0% {
    opacity: 0;
    transform: scale(.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}