.bsb-slider {
    --bsb-frame-max: 570px;
    --bsb-control-size: 44px;
    --bsb-control-gap: 12px;
    width: min(100%, calc(var(--bsb-frame-max) + (2 * var(--bsb-control-size)) + (2 * var(--bsb-control-gap))));
    margin-inline: auto;
    font-family: inherit;
}

.bsb-slider *,
.bsb-slider *::before,
.bsb-slider *::after {
    box-sizing: border-box;
}

.bsb-slider__stage {
    display: grid;
    grid-template-columns: var(--bsb-control-size) minmax(0, var(--bsb-frame-max)) var(--bsb-control-size);
    align-items: center;
    justify-content: center;
    gap: var(--bsb-control-gap);
    width: 100%;
}

.bsb-slider__viewport {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    touch-action: pan-y;
}

.bsb-slider__track {
    display: flex;
    transform: translate3d(0, 0, 0);
    transition: transform 420ms ease;
    will-change: transform;
}

.bsb-slider__slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    /* Preserve the supplied images' 1536 × 2048 (3:4) proportions. */
    aspect-ratio: 3 / 4;
    margin: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.bsb-slider__slide img,
.bsb-slider__slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.bsb-slider__slide--video,
.bsb-slider__slide--video video {
    background: #111;
}

.bsb-slider__video-placeholder {
    width: min(86%, 520px);
    min-height: 220px;
    padding: 28px;
    display: grid;
    gap: 10px;
    place-content: center;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    color: #fff;
}

.bsb-slider__video-placeholder strong {
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.bsb-slider__video-placeholder code {
    color: inherit;
}

.bsb-slider__arrow {
    position: static;
    width: var(--bsb-control-size);
    height: var(--bsb-control-size);
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.bsb-slider__arrow:hover {
    background: rgba(0, 0, 0, 0.88);
    transform: scale(1.05);
}

.bsb-slider__arrow:focus-visible,
.bsb-slider__dots button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.bsb-slider__dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 14px;
    margin-inline: calc(var(--bsb-control-size) + var(--bsb-control-gap));
}

.bsb-slider__dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #b9b9b9;
    cursor: pointer;
    transition: width 180ms ease, background-color 180ms ease;
}

.bsb-slider__dots button[aria-selected="true"] {
    width: 30px;
    background: #222;
}

.bsb-slider__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bsb-slider__video-error {
    width: min(86%, 540px);
    padding: 28px;
    display: grid;
    gap: 10px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    color: #fff;
}

.bsb-slider__video-error[hidden] {
    display: none;
}

.bsb-slider__video-error strong,
.bsb-slider__video-error span {
    display: block;
}

.bsb-slider__video-error code {
    color: inherit;
}

@media (max-width: 600px) {
    .bsb-slider {
        --bsb-control-size: 36px;
        --bsb-control-gap: 6px;
    }

    .bsb-slider__arrow {
        font-size: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bsb-slider__track,
    .bsb-slider__arrow,
    .bsb-slider__dots button {
        transition: none;
    }
}
