/* Shared gallery presentation. Page and modal consumers own surrounding columns and height budgets. */
.gallery .carousel-container {
  position: relative;
  width: 100%;
  min-height: 0;
}
.gallery .carousel-track {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-height: 0;
}
.gallery .carousel-slide {
  width: 100%;
  min-height: 0;
}
.gallery .carousel-slide picture {
  display: block;
  width: 100%;
}
.gallery .gallery-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
}
.gallery .carousel-controls {
  display: none;
  padding: 0.5rem 0;
}
.gallery-enhanced .carousel-container {
  overflow: hidden;
}
.gallery-enhanced .carousel-track {
  display: flex;
  gap: 0;
}
.gallery-enhanced .carousel-slide {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.gallery-enhanced .carousel-controls {
  display: flex;
  justify-content: center;
}
.gallery .carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  width: min(
    100%,
    calc(
      var(--project-dots-max-small, 10) * var(--project-dot-slot-width, 1.5rem)
    )
  );
  margin-inline: auto;
}
.gallery .dot {
  flex: 0 0 var(--project-dot-slot-width, 1.5rem);
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  color: var(--carousel-dot-color, currentColor);
  cursor: pointer;
}
.gallery .dot::before {
  content: var(--carousel-dot, "○");
}
.gallery .dot.active {
  color: var(--carousel-dot-color-active, currentColor);
}
.gallery .dot.active::before {
  content: var(--carousel-dot-active, "●");
}
.gallery .dot:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media (min-width: 769px) {
  .gallery .carousel-dots {
    width: min(
      100%,
      calc(
        var(--project-dots-max-large, 20) *
          var(--project-dot-slot-width, 1.5rem)
      )
    );
  }
}
