
#carousel-overlay {
  align-content: center;
  background-color: rgba(0, 0, 0, .8);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 2;
}

.carousel {
  align-items: center;
  display: flex;
  justify-items: end;
  max-width: 100svw;
  position: relative;
  z-index: 7;
}

.carousel-fig-prev,
.carousel-fig-next {
  display: none;
}

.carousel-fig-current {
  display: grid;
  transform: translateX(0);
}

.carousel-fig-prev,
.carousel-fig-current,
.carousel-fig-next {
  cursor: auto;
  img {
    max-height: 100vh;
    max-height: 100svh;
    /* max-width: 100%; */
    min-height: 18em;
    object-fit: contain;
    z-index: 8;
    }
}

#current-slide {
  width: unset;
  max-width: calc(100svw - 14em);
}

.carousel .carousel-actions {
  align-items: center;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  height: 30vh;
  max-height: 12em;
  min-height: 5em;
}

.prev-area {
  border-radius: 1em 0 0 1em;
  justify-items: end;
  position: relative;
  z-index: 6;
}

.next-area {
  border-radius: 0 1em 1em 0;
  justify-items: start;
  position: relative;
  z-index: 6;
}

button {
  border: none;
  color: #eee;
  cursor: pointer;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  height: 1.5em;
  outline: none;
  width: 1.5em;
  z-index: 9;
}

.close {
  background-color: rgba(0, 0, 0, .8);
  border-radius: 0 50% 50% 0;
  height: 2em;
  margin-left: .125em;
  position: absolute;
  right: 0;
  top: -.625em;
}

figure {
  cursor: pointer;
}

.carousel-fig-current figcaption {
  background-color: rgba(0, 0, 0, .9);
  border-radius: 0 0 0 .375em;
  color: #eee;
  cursor: default;
  line-height: 1.5;
  margin: 0;
  padding: 1em .5em .5em;
  position: relative;
  text-wrap: pretty;
  top: 0;
}

.carousel-fig-current figcaption:hover {
  border-radius: 0 0 .375em .375em;
  cursor: zoom-in;
  max-width: 100%;
  transform: scale(1.5);
  transform-origin: top left;
  transition-duration: .25s;
  z-index: 101;
}

#carousel-caption {
  visibility: hidden;
}


@media screen and (min-width: 800px) {

  .carousel-fig-current {
    align-items: start;
    grid-template: 'caption image .';
    grid-template-columns: 12em max-content 1fr;
  }

  .carousel-fig-current figcaption {
    grid-area: caption;
  }

  .carousel-fig-current img {
    grid-area: image;
    justify-items: start;
  }

  #carousel-button-prev {
    left: 12em;
    position: relative;
  }

  /* #carousel-button-close {

  }

  #carousel-button-next {

} */
}