/* Popup/Modal */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .97);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup.active {
    opacity: 1;
    visibility: visible;
}

/* Navigation arrows */
.arrows {
  width: 100%;
  max-width: 600px;
  margin: auto;
  padding: var(--half-spacing);
  pointer-events: none;
  display: flex;
  justify-content: space-around;
}

.arrows span {
  text-align: center;
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid var(--background-color);
  background: none;
  width: 30px;
  height: 30px;
  font-size: 20px;
  filter: invert(1);
  pointer-events: all;
}

.arrows span.prev {
  transform: rotate(90deg);
}

.arrows span.close {
  font-weight: 600;
  width: 29px;
  height: 29px;
  font-size: 25px;
  line-height: 22px;
  color: var(--background-color);
}

.arrows span.next {
  transform: rotate(-90deg);
}

.arrows span img {
  width: 15px;
}


.first .arrows span:first-child,
.last .arrows span:last-child {
  pointer-events: none;
  opacity: 0;
}

/* Carousel container */
.popup .carousel {
    list-style: none;
    position: relative;
    width: 100vw;
    height: 100vh;
}

.popup .carousel li {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0;
    padding-left: calc(calc(100vw - var(--site-width)) / 2);
    padding-right: calc(calc(100vw - var(--site-width)) / 2);
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s ease;
}

.popup .carousel li.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.popup .carousel li.prev {
  transform: translateX(-100%);
}

.popup .carousel li.next {
  transform: translateX(100%);
}

/* Layout */
.popup .carousel li figcaption {
  padding: var(--half-spacing);
  text-align: center;
}
/* Image */
.popup .carousel li img {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: contain;
}

/* Caption */
.popup .carousel li .slide-caption h4 {
  font-size: 18px;
  line-height: 110%;
  font-weight: 600;
}

.popup .carousel li .slide-caption h5 {
  font-size: 14px;
  line-height: 110%;
  font-weight: 600;
}

.popup .carousel li .slide-caption em {
  font-style: italic;
}

@media (min-height: 600px) {
  .arrows {
    padding: var(--default-spacing);
  }
  .popup .carousel li figcaption {
    padding: var(--default-spacing);
  }
}

@media (max-height: 400px) {
  .popup .carousel li {
    display: flex;
    align-items: center;
  }
}

@media (min-width: 600px) {
  .popup .carousel li img {
    max-height: 70vh;
  }
}

/* /\* Responsive *\/ */
/* @media (max-width: 768px) { */
/*     .popup .carousel li { */
/*         padding: 60px 20px 20px; */
/*     } */

/*     .popup .carousel li .slide-nav { */
/*         right: 20px; */
/*         top: 20px; */
/*     } */

/*     .counter { */
/*         left: 20px; */
/*         top: 20px; */
/*         font-size: 13px; */
/*     } */

/*     .popup .carousel li figure { */
/*         max-height: 50vh; */
/*     } */

/*     .popup .carousel li figure img, */
/*     .popup .carousel li figure iframe { */
/*         max-height: 50vh; */
/*     } */

/*     .popup .carousel li .slide-caption { */
/*         font-size: 12px; */
/*         max-width: 100%; */
/*         padding: 0 20px 20px; */
/*     } */
/* } */
