/* Shared rotator styles.
 *
 * The track is natively scrollable and snaps to each slide. JavaScript only
 * adds controls and auto-advance, so the slides remain usable without it.
 */

.nl-carousel {
    position: relative;
}

.nl-carousel__track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: manipulation;
}

.nl-carousel__track::-webkit-scrollbar {
    display: none;
}

.nl-carousel__slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: center;
}

.nl-carousel__slide > a,
.nl-carousel__slide > img {
    display: block;
    width: 100%;
}

.nl-carousel__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.nl-carousel__controls button,
.nl-carousel__markers button {
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
    touch-action: manipulation;
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nl-carousel__markers {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.nl-carousel__markers button {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
}

/* The current dot is identified by more than colour alone. */
.nl-carousel__markers button[aria-current='true'] {
    background: #ffffff;
    color: #050505;
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.nl-carousel__controls button:focus-visible,
.nl-carousel__markers button:focus-visible,
.nl-carousel__track:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.nl-carousel .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.nl-carousel[data-rotator-empty='true'] .nl-carousel__controls,
.nl-carousel[data-rotator-empty='true'] .nl-carousel__markers {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    .nl-carousel__track {
        scroll-behavior: smooth;
    }
}
