/* PORT-28: float the existing carousel buttons beside the rendered image row. */
.gallery:not([data-gallery-controls-ready='true']) .gallery-controls {
  visibility: hidden;
}
.gallery[data-gallery-controls-ready='true'] .gallery-controls {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  top: var(--gallery-control-center-y);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin: 0;
  padding-inline: 8px;
  transform: translateY(-50%);
  pointer-events: none;
}

.gallery[data-gallery-controls-ready='true'] .gallery-controls[hidden] {
  display: none;
}

.gallery[data-gallery-controls-ready='true'] .gallery-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgb(94 234 212 / .45);
  border-radius: 50%;
  background: rgb(15 23 42 / .94);
  color: #5eead4;
  font-size: 1.125rem;
  line-height: 1;
  pointer-events: auto;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.gallery[data-gallery-controls-ready='true'] .gallery-controls button:hover:not(:disabled),
.gallery[data-gallery-controls-ready='true'] .gallery-controls button:focus-visible {
  border-color: var(--accent);
  background: #132137;
  color: #5eead4;
}

.gallery[data-gallery-controls-ready='true'] .gallery-controls button:disabled {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .gallery[data-gallery-controls-ready='true'] .gallery-controls button {
    transition: none;
  }
}
