.actionvideo-wrapper.gallery {
  max-width: 720px;
  margin: 1em auto;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 12px;
}

@media (min-width: 900px) {
  .actionvideo-wrapper.gallery {
    max-width: 1100px;
    padding: 0 18px;
  }
}

@media (min-width: 1400px) {
  .actionvideo-wrapper.gallery {
    max-width: 1400px;
    padding: 0 24px;
  }
}
.gallery-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main video {
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 954 / 493;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  opacity: 1;
  transition: opacity 360ms ease-in-out;
}
.gallery-main img {
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 954 / 493;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  opacity: 1;
  transition: opacity 360ms ease-in-out;
}
.gallery-video--hidden {
  opacity: 0;
}
.gallery-img--hidden {
  opacity: 0;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 0;
  width: clamp(28px, 1.6vw, 32px);
  height: clamp(28px, 1.6vw, 32px);
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 180ms ease, height 180ms ease, background 160ms ease,
    transform 160ms ease;
}
.gallery-btn svg {
  display: block;
  width: 36%;
  height: 36%;
  fill: #fff;
  margin: auto;
  line-height: 0;
}
.gallery-btn.prev {
  left: 8px;
  border-radius: 8px;
}
.gallery-btn.next {
  right: 8px;
  border-radius: 8px;
}
/* center bottom overlay */
.center-controls {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  display: flex;
  gap: 0.4em;
  z-index: 3;
  align-items: center;
  justify-content: center;
}
.gallery-btn.center {
  position: static;
  top: auto;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(32px, 2vw, 36px);
  height: clamp(32px, 2vw, 36px);
  padding: 0;
  font-size: clamp(1rem, 1.6vw, 1.6rem);
  background: rgba(0, 0, 0, 0.65);
  line-height: 1;
  border-radius: 50%;
}
.gallery-btn.center svg {
  width: 40%;
  height: 40%;
  display: block;
  margin: auto;
}
.gallery-btn.center:hover {
  background: rgba(0, 0, 0, 0.75);
}

.gallery-btn:focus-visible {
  outline: 3px solid rgba(102, 159, 178, 0.9);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(102, 159, 178, 0.15);
}
.gallery-thumbs {
  display: block;
  overflow-x: auto;
  padding: 0.5em 0;
  margin-top: 0.5em;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.gallery-thumbs > .thumb-row,
.gallery-thumbs > .thumbs {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.5em;
  justify-content: center;
  align-items: center;
}
.gallery-thumbs img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  scroll-snap-align: center;
}
.gallery-thumbs img[aria-current="true"],
.gallery-thumbs img.active {
  border-color: #66a;
}
.gallery-caption {
  margin-top: 0.4em;
  color: #333;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .gallery-thumbs img {
    width: 72px;
    height: 40px;
  }
  .gallery-btn.prev,
  .gallery-btn.next {
    width: 40px;
    height: 40px;
  }
  .gallery-btn.center {
    width: 44px;
    height: 44px;
  }
}
