/*
 * Carousel primitives for assets/js/features/carousel.js (the testimonials slider).
 * Ported from Anchor Tools' shared anchor-carousel.css; class names unchanged.
 *
 * - .anchor-carousel__track and the --anchor-carousel-* custom properties: layout.
 * - .anchor-carousel-drag / .anchor-carousel-is-dragging: grab cursor and no text
 *   selection while dragging; carousel.js adds these classes itself.
 */

.anchor-carousel__viewport {
  overflow: hidden;
}

.anchor-carousel__track {
  display: flex;
  gap: var(--anchor-carousel-gap, 16px);
  transition: transform 0.45s ease;
}

.anchor-carousel__track > * {
  flex: 0 0 calc((100% - (var(--anchor-carousel-cols, 3) - 1) * var(--anchor-carousel-gap, 16px)) / var(--anchor-carousel-cols, 3));
}

@media (prefers-reduced-motion: reduce) {
  .anchor-carousel__track {
    transition: none;
  }
}

/*
 * Drag affordance (owner feedback): a grab cursor at rest, grabbing while
 * the pointer is held down (carousel.js toggles
 * .anchor-carousel-is-dragging on the carousel root for exactly that
 * duration), and no accidental text selection while dragging across slide
 * content. Links and buttons inside a slide keep their own pointer cursor
 * rather than inheriting grab/grabbing from the track.
 *
 * Not exposed as themable custom properties: a grab/grabbing cursor is a
 * standard, semantic affordance, not a brand color or spacing value a site
 * would have a reason to override.
 */
.anchor-carousel-drag {
  cursor: grab;
}

.anchor-carousel-drag a,
.anchor-carousel-drag button {
  cursor: pointer;
}

.anchor-carousel-is-dragging .anchor-carousel-drag {
  cursor: grabbing;
}

.anchor-carousel-is-dragging {
  user-select: none;
}
