.sb-location-gallery {
  --sb-teal: #4f868e;
  --sb-thumb-count: 5;
  --sb-thumb-gap: 10px;
  width: 100%;
}

.sb-location-gallery__stage {
  position: relative;
  width: 100%;
  background: #ececec;
}

.sb-location-gallery__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.sb-location-gallery__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.sb-location-gallery__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.sb-location-gallery__image,
.et-db #et-boc .et-l .sb-location-gallery__image,
.et_pb_module .sb-location-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center;
}

.sb-location-gallery__nav,
.et_pb_button.sb-location-gallery__nav,
.et_pb_module .sb-location-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 0;
  background: none !important;
  background-image: none !important;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

.sb-location-gallery__nav:hover,
.sb-location-gallery__nav:focus,
.sb-location-gallery__nav:focus-visible {
  background: none !important;
  color: #fff;
  outline: none;
}

.sb-location-gallery__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.sb-location-gallery__nav--prev {
  left: 6px;
}

.sb-location-gallery__nav--next {
  right: 6px;
}

.sb-location-gallery__nav svg {
  display: block;
  width: 28px;
  height: 56px;
}

.sb-location-gallery__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sb-thumb-gap);
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sb-location-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.sb-location-gallery__thumb,
.et_pb_module .sb-location-gallery__thumb {
  display: block;
  flex: 0 0 calc((100% - (var(--sb-thumb-count) - 1) * var(--sb-thumb-gap)) / var(--sb-thumb-count));
  width: calc((100% - (var(--sb-thumb-count) - 1) * var(--sb-thumb-gap)) / var(--sb-thumb-count));
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  background: #ececec;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.sb-location-gallery__thumb img,
.et-db #et-boc .et-l .sb-location-gallery__thumb img,
.et_pb_module .sb-location-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

.sb-location-gallery__thumb.is-active {
  border-color: var(--sb-teal);
}

.sb-location-gallery__thumb:focus-visible {
  outline: 2px solid var(--sb-teal);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .sb-location-gallery {
    --sb-thumb-count: 4;
  }
}

@media (max-width: 767px) {
  .sb-location-gallery {
    --sb-thumb-count: 3;
    --sb-thumb-gap: 8px;
  }

  .sb-location-gallery__viewport {
    aspect-ratio: 4 / 3;
  }

  .sb-location-gallery__thumbs {
    margin-top: 8px;
  }

  .sb-location-gallery__nav svg {
    width: 22px;
    height: 44px;
  }
}
