/**
 * Carousel styles. Only loaded on nodes listed in
 * $conf['janetlanier_local_carousel_nids'].
 */

.janetlanier-carousel {
  margin: 0 0 1.5em 0;
}

/* The theme styles list items generally; undo that inside the track only. */
.janetlanier-carousel .splide__list,
.janetlanier-carousel .splide__slide {
  list-style: none;
  background: none;
}

.janetlanier-carousel .splide__slide {
  text-align: center;
}

.janetlanier-carousel .splide__slide img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border: 0;
}

/* Keep the arrows off the images on narrow screens. */
.janetlanier-carousel .splide__arrow {
  background: #fff;
  opacity: 0.8;
}

.janetlanier-carousel .splide__arrow:hover {
  opacity: 1;
}

/* Thumbnail strip. */
.janetlanier-carousel-wrapper {
  margin: 0 0 1.5em 0;
}

.janetlanier-carousel-wrapper .janetlanier-carousel {
  margin-bottom: 0.5em;
}

/* A wrapping grid, not a carousel: the row must never be wider than the
   column. The theme's #content is a float with no width, so anything with a
   min-content width larger than the column stretches the whole page instead
   of overflowing. Wrapping keeps min-content at one thumbnail. */
.janetlanier-carousel-thumbs {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Absorbs the margins on the items below. */
  margin-right: -8px;
}

.janetlanier-carousel-thumbs li {
  list-style: none;
  background: none;
  display: inline-block;
  vertical-align: top;
  margin: 0 8px 8px 0;
  padding: 0;
}

.janetlanier-carousel-thumb {
  display: block;
  width: 100px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  background: none;
}

.janetlanier-carousel-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  /* Fills the fixed thumbnail box without distorting. Older browsers ignore
     this and letterbox instead, which is an acceptable fallback. */
  object-fit: cover;
}

.janetlanier-carousel-thumb:hover {
  opacity: 0.85;
}

.janetlanier-carousel-thumb.is-active {
  opacity: 1;
  border-color: #333;
}

/* Buttons are focusable for free - keep that visible. */
.janetlanier-carousel-thumb:focus {
  outline: 2px solid #333;
}

/* Full-page modal. */
.janetlanier-carousel-clickable .splide__slide img {
  cursor: zoom-in;
}

.janetlanier-carousel-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  /* Centers the carousel without needing flexbox, which this theme's era of
     CSS does not otherwise use. */
  text-align: center;
  overflow: auto;
}

.janetlanier-carousel-modal-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 20px 20px;
  text-align: left;
}

.janetlanier-carousel-modal .splide__slide img {
  max-width: 100%;
  /* Leave room for the thumbnail strip and the close button. */
  max-height: 75vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  cursor: default;
}

.janetlanier-carousel-modal .janetlanier-carousel-thumbs {
  margin-top: 12px;
  text-align: center;
}

.janetlanier-carousel-modal .janetlanier-carousel-thumb.is-active {
  border-color: #fff;
}

.janetlanier-carousel-modal .janetlanier-carousel-thumb:focus {
  outline-color: #fff;
}

.janetlanier-carousel-modal .splide__arrow {
  background: #fff;
  opacity: 0.9;
}

.janetlanier-carousel-modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 1001;
  background: none;
  border: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  padding: 4px 12px;
  cursor: pointer;
}

.janetlanier-carousel-modal-close:hover,
.janetlanier-carousel-modal-close:focus {
  color: #ccc;
  outline: 1px solid #fff;
}
