.b-inf-carousel {
    --b-inf-carousel-size: var(--b-inf-carousel-size-desktop, 132px);
    --b-inf-carousel-gap: var(--b-inf-carousel-gap-desktop, 28px);
    --b-inf-carousel-border-color: var(--b-inf-carousel-border-color-desktop, #b0005a);
    --b-inf-carousel-border-width-safe: var(--b-inf-carousel-border-width, 5px);
    position: relative;
    width: 100%;
}

.b-inf-carousel__title {
    margin: 0 0 32px;
    color: inherit;
    font-size: var(--b-inf-carousel-title-size-desktop, 44px);
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
}

.b-inf-carousel--loading .b-inf-carousel__slider {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.b-inf-carousel:not(.b-inf-carousel--loading) .b-inf-carousel__skeleton {
    display: none;
}

.b-inf-carousel__skeleton {
    display: flex;
    justify-content: center;
    gap: var(--b-inf-carousel-gap);
    overflow: hidden;
}

.b-inf-carousel__skeleton-item {
    width: var(--b-inf-carousel-size);
    height: var(--b-inf-carousel-size);
    flex: 0 0 var(--b-inf-carousel-size);
    border-radius: 50%;
    background: linear-gradient(90deg, #e7e9ee 0%, #f4f5f7 45%, #e7e9ee 90%);
    background-size: 240% 100%;
    animation: b-inf-carousel-pulse 1.2s ease-in-out infinite;
}

.b-inf-carousel .splide {
    padding: 0 56px;
}

.b-inf-carousel .splide__track {
    overflow: hidden;
}

.b-inf-carousel .splide__list {
    align-items: flex-start;
}

.b-inf-carousel .splide__arrow {
    width: 44px;
    height: 44px;
    background: transparent;
    opacity: 1;
}

.b-inf-carousel .splide__arrow svg {
    width: 16px;
    height: 16px;
    fill: var(--b-inf-carousel-arrow-color, #222);
}

.b-inf-carousel .splide__arrow:disabled {
    opacity: .25;
}

.b-inf-carousel__slide {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.b-inf-carousel__thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: var(--b-inf-carousel-size);
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: center;
    box-shadow: none;
    appearance: none;
}

.b-inf-carousel__media {
    position: relative;
    display: block;
    width: var(--b-inf-carousel-size);
    height: var(--b-inf-carousel-size);
    flex: 0 0 var(--b-inf-carousel-size);
    overflow: hidden;
    border: var(--b-inf-carousel-border-width-safe) solid var(--b-inf-carousel-border-color);
    border-radius: 50%;
    background: #111827;
    box-sizing: border-box;
}

.b-inf-carousel__cover,
.b-inf-carousel__preview {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b-inf-carousel__preview {
    opacity: 0;
    transition: opacity .18s ease;
}

.b-inf-carousel__preview.is-active {
    opacity: 1;
}

.b-inf-carousel__name {
    display: block;
    width: var(--b-inf-carousel-size);
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b-inf-carousel--hide-names .b-inf-carousel__name {
    display: none;
}

.b-inf-carousel__modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: #05070b;
}

.b-inf-carousel__modal.is-open {
    display: flex;
}

.b-inf-carousel__player {
    width: min(100vw, 520px);
    height: 100vh;
    background: #000;
    object-fit: contain;
}

.b-inf-carousel__caption {
    position: absolute;
    left: 24px;
    bottom: 24px;
    max-width: min(80vw, 460px);
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
}

.b-inf-carousel__close,
.b-inf-carousel__nav {
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

.b-inf-carousel__close {
    top: 20px;
    right: 20px;
}

.b-inf-carousel__close::before,
.b-inf-carousel__close::after {
    position: absolute;
    top: 21px;
    left: 12px;
    width: 20px;
    height: 2px;
    background: #fff;
    content: "";
}

.b-inf-carousel__close::before {
    transform: rotate(45deg);
}

.b-inf-carousel__close::after {
    transform: rotate(-45deg);
}

.b-inf-carousel__nav {
    top: 50%;
    transform: translateY(-50%);
}

.b-inf-carousel__nav--prev {
    left: max(20px, calc(50vw - 340px));
}

.b-inf-carousel__nav--next {
    right: max(20px, calc(50vw - 340px));
}

.b-inf-carousel__nav::before {
    position: absolute;
    top: 14px;
    width: 14px;
    height: 14px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    content: "";
}

.b-inf-carousel__nav--prev::before {
    left: 17px;
    transform: rotate(-135deg);
}

.b-inf-carousel__nav--next::before {
    right: 17px;
    transform: rotate(45deg);
}

@keyframes b-inf-carousel-pulse {
    0% {
        background-position: 120% 0;
    }

    100% {
        background-position: -120% 0;
    }
}

@media (max-width: 767px) {
    .b-inf-carousel {
        --b-inf-carousel-size: var(--b-inf-carousel-size-mobile, 84px);
        --b-inf-carousel-gap: var(--b-inf-carousel-gap-mobile, 20px);
        --b-inf-carousel-border-color: var(--b-inf-carousel-border-color-mobile, #e6ded4);
    }

    .b-inf-carousel__title {
        margin-bottom: 24px;
        font-size: var(--b-inf-carousel-title-size-mobile, 32px);
    }

    .b-inf-carousel .splide {
        padding: 0;
    }

    .b-inf-carousel__nav {
        display: none;
    }

    .b-inf-carousel__caption {
        left: 16px;
        bottom: 16px;
        font-size: 14px;
    }
}
