.zp-video-gallery,
.zp-video-gallery *,
.zp-video-gallery *::before,
.zp-video-gallery *::after {
    box-sizing: border-box;
}

.zp-video-gallery {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}

.zp-vg-layout {
    --zp-vg-stage-width: 520px;
    --zp-vg-stage-height: 640px;
    --zp-vg-thumb-width: 79px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    max-width: 615px;
}

.zp-vg-stage {
    position: relative;
    flex: 0 1 var(--zp-vg-stage-width);
    width: var(--zp-vg-stage-width);
    height: var(--zp-vg-stage-height);
    min-width: 0;
    overflow: hidden;
    border: 3px solid #ff7a1a;
    border-radius: 12px;
    background: #ffffff;
}

.zp-vg-stage-media,
.zp-vg-stage-backdrop,
.zp-vg-stage-image,
.zp-vg-player,
.zp-vg-player iframe,
.zp-vg-player video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.zp-vg-stage-media {
    overflow: hidden;
    border-radius: 9px;
    background: #f1f1f1;
}

.zp-vg-stage-backdrop {
    z-index: 0;
    object-fit: cover !important;
    object-position: center;
    filter: blur(8px);
    opacity: 0.6;
    transform: scale(1.03);
    pointer-events: none;
}

.zp-video-gallery .zp-vg-stage-backdrop {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
}

.zp-video-gallery .zp-vg-stage-image {
    z-index: 1;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
}

.zp-vg-player {
    display: none;
    z-index: 2;
    background: #000000;
}

.zp-vg-stage.is-vertical .zp-vg-player {
    left: 50%;
    right: auto;
    width: auto;
    height: 100%;
    aspect-ratio: 9 / 16;
    transform: translateX(-50%);
}

.zp-vg-player iframe,
.zp-vg-player video {
    border: 0;
    object-fit: contain;
}

.zp-vg-stage.is-playing .zp-vg-player {
    display: block;
}

.zp-vg-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 180ms ease, opacity 180ms ease;
}

.zp-vg-play[hidden] {
    display: none;
}

.zp-vg-play img {
    display: block;
    width: 66px;
    height: 66px;
}

.zp-vg-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.zp-vg-play:focus-visible,
.zp-vg-thumb:focus-visible {
    outline: 3px solid #ff7a1a;
    outline-offset: 3px;
}

.zp-vg-stage.is-playing .zp-vg-play {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.zp-vg-track {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 11px;
    width: var(--zp-vg-thumb-width);
    max-height: var(--zp-vg-stage-height);
    padding: 0;
}

.zp-vg-track.is-scrollable {
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #ff7a1a transparent;
}

.zp-vg-track.is-scrollable::-webkit-scrollbar {
    width: 5px;
}

.zp-vg-track.is-scrollable::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: #ff7a1a;
}

.zp-vg-thumb {
    position: relative;
    flex: 0 0 auto;
    width: var(--zp-vg-thumb-width);
    height: 80px;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #ececec;
    cursor: pointer;
    isolation: isolate;
}

.zp-vg-thumb::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: inherit;
    background: rgba(13, 14, 52, 0.12);
    content: "";
    opacity: 0;
    transition: opacity 160ms ease;
    pointer-events: none;
}

.zp-vg-thumb:hover::after {
    opacity: 1;
}

.zp-vg-thumb img {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover !important;
    object-position: center;
}

@media (max-width: 767px) {
    .zp-vg-layout {
        flex-direction: column;
        max-width: 100%;
    }

    .zp-vg-stage {
        flex-basis: auto;
        width: 100%;
        height: var(--zp-vg-stage-height);
    }

    .zp-vg-track,
    .zp-vg-track.is-scrollable {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        scroll-snap-type: x proximity;
    }

    .zp-vg-track::-webkit-scrollbar {
        width: auto;
        height: 5px;
    }

    .zp-vg-thumb {
        scroll-snap-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zp-vg-play,
    .zp-vg-thumb::after {
        transition: none;
    }
}
