.tb-carousel {
    --tb-paper: var(--tu-site-bg, #f4efe6);
    --tb-border: var(--tu-border, #d7dcd5);
    --tb-accent: var(--tu-secondary, #e97524);
    --tb-arrow-width: 100px;
    --tb-control-bg: rgb(11 44 41 / 72%);
    min-width: 0;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--tb-border);
    border-radius: var(--tu-radius, 10px);
    background: var(--tu-surface, #fff);
    box-shadow: var(--tu-shadow-sm, 0 1px 2px rgb(0 0 0 / 4%));
}

.tb-carousel [hidden] {
    display: none;
}

.tb-carousel__stage {
    position: relative;
    isolation: isolate;
    aspect-ratio: var(--tb-ratio, 5 / 1);
    overflow: hidden;
    background: var(--tb-paper);
    touch-action: pan-y pinch-zoom;
}

.tb-carousel__slide,
.tb-carousel__link {
    position: absolute;
    inset: 0;
    display: block;
}

.tb-carousel__slide[data-entering] {
    z-index: 1;
}

.tb-carousel__slide picture,
.tb-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.tb-carousel__slide img {
    max-height: none;
    object-fit: contain;
    user-select: none;
}

.tb-carousel__link:focus-visible {
    outline: 2px solid var(--tu-primary, #125450);
    outline-offset: -3px;
}

.tb-carousel__controls {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.tb-carousel .tb-carousel__button {
    position: absolute;
    inset-block: 0;
    display: grid;
    align-items: center;
    width: var(--tb-arrow-width);
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
    cursor: pointer;
    pointer-events: auto;
}

.tb-carousel .tb-carousel__button--previous {
    left: 0;
    justify-items: start;
}

.tb-carousel .tb-carousel__button--next {
    right: 0;
    justify-items: end;
}

.tb-carousel__button svg {
    opacity: 0.6;
    filter: drop-shadow(0 1px 1px #142c29);
}

.tb-carousel__button:hover svg,
.tb-carousel__button:focus-visible svg {
    opacity: 0.9;
}

.tb-carousel .tb-carousel__button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.tb-carousel__markers {
    position: absolute;
    right: 10px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: calc(100% - 20px);
    padding: 5px 8px;
    border-radius: 12px;
    background: var(--tb-control-bg);
    pointer-events: none;
}

.tb-carousel__marker {
    position: relative;
    width: 6px;
    height: 6px;
    overflow: hidden;
    border-radius: 8px;
    background: rgb(255 255 255 / 62%);
}

.tb-carousel__marker[data-current] {
    width: 24px;
    background: #fff;
}

.tb-carousel__progress {
    position: absolute;
    inset: 0;
    background: var(--tb-accent);
    transform: scaleX(0);
    transform-origin: left;
}

.tb-carousel__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 860px) {
    .tb-carousel {
        --tb-arrow-width: 44px;
    }

    .tb-carousel__stage {
        aspect-ratio: 2 / 1;
    }

    .tb-carousel .tb-carousel__button {
        padding-inline: 8px;
    }

    .tb-carousel__button svg {
        width: 16px;
        height: 16px;
    }

    .tb-carousel__markers {
        right: 6px;
        bottom: 4px;
        padding: 3px 6px;
    }
}
