/* A shared playthrough's videos in one row (playthroughs/show, snap_carousel_controller.js): the whole
   width of the page, the current video at its own size in the middle, its neighbours peeking in. */
.share-carousel {
  --share-height: min(68vh, 680px);
  position: relative;
  margin-inline: -0.75rem; /* the page's own gutter: edge to edge */
}
.share-carousel-track {
  position: relative;
  display: flex;
  align-items: center; /* every video in the middle of the row, which is as tall as the tallest */
  overflow-y: hidden;
  transition: height 0.15s ease;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: 0.25rem;
}
.share-carousel-track::-webkit-scrollbar {
  display: none;
}
.share-slide {
  flex: none;
  scroll-snap-align: center;
  opacity: 0.4;
  transform: scale(0.94);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  cursor: pointer;
}
.share-slide.current {
  opacity: 1;
  transform: none;
  cursor: auto;
}
/* A neighbour's player takes no clicks: a click brings it to the middle. */
.share-slide:not(.current) .video-player {
  pointer-events: none;
}
.share-slide-full {
  width: min(84vw, calc(var(--share-height) * 16 / 9));
}
.share-slide-short {
  width: min(80vw, calc(var(--share-height) * 9 / 16));
}
.share-slide .video-player {
  margin-bottom: 0.5rem !important;
}
.share-slide .video-player-upright {
  max-width: none;
}
.share-slide-label {
  margin: 0;
  text-align: center;
  font-weight: 600;
}
.share-carousel-step {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 1.4rem;
}
.share-carousel-step:hover {
  background: rgb(0 0 0 / 0.8);
}
.share-carousel-step:disabled {
  opacity: 0.25;
  pointer-events: none;
}
/* On a phone: swipe or the dots (the arrows would sit on the picture), the shorts shorter so their
   neighbours peek in and the row isn't three times the full video's height, and a closer row. */
@media (max-width: 575.98px) {
  .share-carousel {
    --share-height: min(56svh, 520px);
  }
  .share-slide-full {
    width: 78vw;
  }
  .share-carousel-step {
    display: none;
  }
  .share-carousel-track {
    gap: 0.75rem;
  }
}
/* A dot per video under the row: where you are, and a tap to go to another. */
.share-carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.share-carousel-dot {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
}
.share-carousel-dot::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--bs-secondary-color);
  opacity: 0.5;
  transition:
    opacity 0.15s ease,
    width 0.15s ease;
}
.share-carousel-dot[aria-current="true"]::before {
  width: 1.25rem;
  border-radius: 0.25rem;
  background: var(--bs-body-color);
  opacity: 1;
}
.share-carousel-step.previous {
  left: 1rem;
}
.share-carousel-step.next {
  right: 1rem;
}
.share-chapters summary {
  cursor: pointer;
  font-weight: 600;
}
