.glozin-shoppable-video-carousel {
    ~ .shoppable-video--modal {
        --gz-modal-content-width: 760px;
        --gz-modal-content-padding-y: 0px;
        --gz-modal-content-padding-x: 0px;
    }
}

.glozin-shoppable-video-carousel__item {
    cursor: pointer;
}

.glozin-shoppable-video-carousel__product-thumbnail {
    --gz-image-rounded: 100%;
    width: 50px;
    flex-shrink: 0;
}

.glozin-shoppable-video-carousel__product-price {
    color: var(--gz-color-light);
}

.glozin-shoppable-video-carousel__product {
    .woocommerce-loop-product__title {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 8px;
    }
}

.glozin-shoppable-video-carousel--gradient {
    &:after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        border-radius: var(--gz-image-rounded);
        background: linear-gradient(var(--gz-gradient-angle, 180deg), var(--gz-gradient-color-primary, #0000) 50%, var(--gz-gradient-color-secondary, #0009));
        opacity: .75;
        pointer-events: none;
        z-index: 2;
        border-radius: var(--gz-image-rounded, 0);
    }
}

.glozin-shoppable-video-carousel--filter-color {
    --gz-shoppable-video-filter-color: rgba(255, 255, 255, 0.3);
    --gz-shoppable-video-filter-blur: 5px;

    &::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        background: var(--gz-shoppable-video-filter-color);
        -webkit-backdrop-filter: blur(var(--gz-shoppable-video-filter-blur));
        backdrop-filter: blur(var(--gz-shoppable-video-filter-blur));
        z-index: -1;
    }
}

.shoppable-video--modal {
    .modal__button-close {
        --gz-button-color: #666;
        --gz-button-color-hover: var(--gz-color-dark);
        --gz-button-bg-color: var(--gz-color-light);
        --gz-button-bg-color-hover: var(--gz-color-light);
        --gz-button-border-color: transparent;
        --gz-button-border-color-hover: transparent;
        --gz-button-font-size: 11px;

        position: absolute;
        opacity: 1;
        color: #666;
        top: 10px;
        inset-inline-end: 10px;
        z-index: 5;

        &:hover {
            color: var(--gz-color-dark);
        }
    }

    .e-con-inner {
        --gz-container-spacing: 0px;
    }

    .modal__container {
        height: 100%;
    }

    .modal__wrapper-shopable {
        pointer-events: auto;
        height: 100%;
        box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.16);
        border-radius: var(--gz-modal-content-border-radius);
        overflow: auto;
    }

    .modal__shoppable-video {
        height: 100%;
    }

    .glozin-shoppable-video-carousel__product {
        background: #ffffff4d;
        backdrop-filter: blur(5px);
        overflow: hidden;
        padding-inline-end: 10px;
    }

    .glozin-shoppable-video-carousel__product-thumbnail {
        --gz-image-rounded: 0px;
    }

    .glozin-button {
        padding: 13px 20px;
        margin-left: auto;
        flex-shrink: 0;
    }

    div.product {
        height: 100%;

        .product-gallery-summary {
            overflow: hidden;
            height: 100%;
            margin: 0;
            border-radius: var(--gz-modal-content-border-radius);
        }

        .custom-scrollbar {
            width: 100%;
            height: 100%;
            background-color: #fff;
            overflow-x: hidden;
            overflow-y: auto;

            scroll-behavior: smooth;
            scrollbar-width: auto;
            scrollbar-color: #c8c8c8;

            --gz-image-rounded: 0px;

            &::-webkit-scrollbar {
                width: 4px;
                border-radius: 30px;
            }

            &::-webkit-scrollbar-track {
                background: #fff;
            }

            &::-webkit-scrollbar-thumb {
                background-color: #c8c8c8;
                border-radius: 30px;
            }

            &::-webkit-scrollbar-thumb:hover {
                background-color: var(--gz-color-grey);
            }
        }

        .woocommerce-product-gallery__video {
            display: flex;
            flex-direction: column;
            top: 0;

            .glozin-shoppable-video-carousel__video {
                flex-shrink: 0;
            }
        }

        .entry-summary {
            padding: 30px 20px 30px;
            position: absolute;
            top: 0;
            inset-inline-end: 0;
            width: 100%;
            height: 100%;
            background-color: #fff;
            overflow-x: hidden;
            overflow-y: auto;

            scroll-behavior: smooth;
            scrollbar-width: auto;
            scrollbar-color: #c8c8c8;
            border-radius: var(--gz-modal-content-border-radius);

            z-index: 4;

            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateY(100%);

            &::-webkit-scrollbar {
                width: 4px;
                border-radius: 30px;
            }

            &::-webkit-scrollbar-track {
                background: #fff;
            }

            &::-webkit-scrollbar-thumb {
                background-color: #c8c8c8;
                border-radius: 30px;
            }

            &::-webkit-scrollbar-thumb:hover {
                background-color: var(--gz-color-grey);
            }

            &.open {
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
                transform: translateY(0);
                transition: transform 0.4s cubic-bezier(.3, 1, .3, 1), opacity 0.4s cubic-bezier(.3, 1, .3, 1);
            }

            .woocommerce-product-gallery {
                width: 100%;
                border-radius: var(--gz-image-rounded);
                margin-bottom: 30px;
                position: unset;
                top: 0;
            }
        }

        .view-full-details-button {
            display: none;
        }

        form.cart {
            ~ .view-full-details-button {
                display: inline-flex;
            }
        }

        &.product-type-simple {
            .entry-summary {
                padding-bottom: 0;
            }

            .short-description {
                margin-bottom: 10px;
            }

            form.cart {
                border-top: 1px solid var(--gz-border-color);
                padding-top: 15px;
                padding-bottom: 15px;
                position: sticky;
                left: 0;
                right: 0;
                bottom: 0;
                z-index: 2;
                background-color: #fff;
                margin-top: 13px;

                ~ .view-full-details-button {
                    display: none;
                }

                &::before {
                    content: "";
                    position: absolute;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    top: -11px;
                    background-color: #fff;
                    width: 100%;
                    height: 10px;
                }
            }

            .glozin-product-atc-group {
                margin-bottom: 0;
                row-gap: 10px;
            }

            .view-full-details-button {
                display: inline-flex;
            }
        }
    }
}

@media (min-width: 768px) {
    .shoppable-video--modal {
        .modal__button-close {
            --gz-button-bg-color: transparent;
            --gz-button-bg-color-hover: transparent;
            --gz-button-border-color: transparent;
            --gz-button-border-color-hover: transparent;
            --gz-button-padding: 0px;
            --gz-button-rounded: 0px;
            --gz-button-font-size: 13px;

            top: 0px;
            inset-inline-end: 0px;
        }

        .modal__wrapper {
            --gz-modal-content-padding-y: 0px;
        }

        .modal__container,
        .modal__wrapper-shopable {
            height: auto;
        }

        div.product {
            .product-gallery-summary {
                border-radius: 0;
            }

            .woocommerce-product-gallery__video {
                --gz-image-rounded: 0;
            }

            .entry-summary {
                padding: 30px;
                width: 50%;

                opacity: 1;
                visibility: visible;
                pointer-events: auto;
                transform: translateY(0);
            }

            &.product-type-simple {
                .entry-summary {
                    padding-bottom: 0;
                }

                form.cart {
                    padding-left: 20px;
                    padding-right: 20px;
                    margin-left: -30px;
                    margin-right: -30px;
                }
            }
        }
    }
}
