.swish-vcarousel {
    --svc-card-width: 19.5vw;
    --svc-mobile-card-width: 46vw;
    --svc-gap: 1.2vw;
    --svc-mobile-gap: 3vw;
    --svc-radius: 16px;
    width: 100%;
    min-width: 0;
    display: block;
    position: relative;
}

.swish-vcarousel,
.swish-vcarousel * {
    box-sizing: border-box;
}

.swish-vcarousel-window {
    width: 100vw;
    max-width: none;
    height: calc(var(--svc-card-width) * 16 / 9);
    position: relative;
    left: 50%;
    margin-left: -50vw;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.swish-vcarousel-window.is-dragging {
    cursor: grabbing;
}

.swish-vcarousel-track {
    display: flex !important;
    align-items: center;
    gap: var(--svc-gap);
    width: max-content !important;
    max-width: none !important;
    height: 100%;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.swish-vcarousel-card {
    position: relative;
    width: var(--svc-card-width);
    min-width: var(--svc-card-width);
    max-width: var(--svc-card-width);
    height: calc(var(--svc-card-width) * 16 / 9);
    flex: 0 0 var(--svc-card-width);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #000;
    border-radius: var(--svc-radius);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.swish-vcarousel-poster,
.swish-vcarousel-player,
.swish-vcarousel-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.swish-vcarousel-poster {
    display: block;
    object-fit: cover;
    background: #000;
    opacity: 1;
    transition: opacity .18s ease;
    pointer-events: none;
}

.swish-vcarousel-player {
    overflow: hidden;
    background: #000;
    pointer-events: none;
}

.swish-vcarousel-player iframe {
    border: 0;
    display: block;
    background: #000;
    pointer-events: none;
}

.swish-vcarousel-card.is-player-ready .swish-vcarousel-poster {
    opacity: 0;
}

/*
 * Theme-proof invisible click layer.
 * Some WordPress themes add global button ::before / ::after overlays.
 * Reset the button completely so those effects cannot cover carousel cards.
 */
.swish-vcarousel-card-click,
.swish-vcarousel-card-click:hover,
.swish-vcarousel-card-click:focus,
.swish-vcarousel-card-click:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    cursor: pointer !important;
    z-index: 5 !important;
}

.swish-vcarousel-card-click::before,
.swish-vcarousel-card-click::after {
    content: none !important;
    display: none !important;
    position: static !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0 !important;
}

.swish-vcarousel-popup {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 2147483647;
}

.swish-vcarousel-popup.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.swish-vcarousel-popup-inner {
    position: relative;
    width: min(90vw, 430px);
    height: min(88vh, 760px);
    aspect-ratio: 9 / 16;
}

.swish-vcarousel-popup-video {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
}

.swish-vcarousel-popup-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.swish-vcarousel-popup-close {
    position: absolute;
    top: 0;
    right: -52px;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 30px;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
}

.swish-vcarousel-popup-close:hover,
.swish-vcarousel-popup-close:focus {
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.swish-vcarousel-popup-close::before,
.swish-vcarousel-popup-close::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 767px) {
    .swish-vcarousel-window {
        height: calc(var(--svc-mobile-card-width) * 16 / 9);
    }

    .swish-vcarousel-track {
        gap: var(--svc-mobile-gap);
    }

    .swish-vcarousel-card {
        width: var(--svc-mobile-card-width);
        min-width: var(--svc-mobile-card-width);
        max-width: var(--svc-mobile-card-width);
        height: calc(var(--svc-mobile-card-width) * 16 / 9);
        flex-basis: var(--svc-mobile-card-width);
    }

    .swish-vcarousel-popup {
        padding: 50px 20px 20px;
    }

    .swish-vcarousel-popup-inner {
        width: 88vw;
        height: 82vh;
    }

    .swish-vcarousel-popup-close {
        top: -46px;
        right: 0;
        width: 38px;
        height: 38px;
        font-size: 26px;
        line-height: 38px;
    }
}
