
#custom-product-image .preview-product-container {
    display: none;
}
#custom-product-image.preview-canvas-visibility .preview-container {
    display: none;
}

#custom-product-image.preview-canvas-visibility.other-product-visibility .preview-product-container {
    display: none;
}

#custom-product-image.preview-canvas-visibility .preview-product-container {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}
.action-switch-mode {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
}

.action-location-preview {
    position: absolute;
    top: 50px;
    right: 0;
    z-index: 2;
}
.img-preview-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.img-preview-canvas img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.img-preview-canvas .preview-loading {
    z-index: 1;
}

.action-location-preview .location-item {
    background: #f8f8f8;
    border-radius: 5px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #e1e1e1;
    cursor: pointer;
}
.action-location-preview .location-item.active {
    border-color: var(--pr-color-secondary);
}

.action-location-preview .location-item .title-location {
    font-size: 14px;
    font-weight: 500;
    color: var(--pr-color-primary);
}
.action-location-preview .location-item .img-location {
    border-bottom: 1px solid #e1e1e1;
}

.action-location-preview .location-item.active .title-location{
    color: var(--pr-color-secondary);
}

.action-location-preview .location-item.active .img-location {
    border-color: var(--pr-color-secondary);
}

.action-switch-mode {
    display: flex;
    align-items: center;
    border: 1px solid var(--pr-color-secondary);
    border-radius: 3px;
    background: #fff;
}
.action-switch-mode span {
    color: var(--pr-color-secondary);
    padding: 3px 8px;
    font-size: 14px;
    cursor: pointer;
    width: 65px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.action-switch-mode .active {
    background: var(--pr-color-secondary);
    color: #fff;
}

.img-location.preview-location-loading {
    position: relative;
    width: 80px;
    height: 80px;
}
.preview-location-loading .lds-dual-ring.white,
.preview-location-loading .lds-dual-ring.white:after {
    width: 40px;
    height: 40px;
}
.preview-location-loading .lds-dual-ring.white:after {
    border: 3px solid #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: #fff transparent #fff transparent;
}

@media (max-width: 767px) {
    .action-switch-mode {
        top: 0;
        right: 0;
    }
    .action-location-preview {
        right: 0;
    }
    .action-location-preview .location-item .title-location {
        display: none;
    }
    .action-location-preview .location-item .img-location {
        width: 40px;
        height: 40px;
    }
    .preview-location-loading .lds-dual-ring.white {
        top: 0;
        left: 0;
    }
    .preview-location-loading .lds-dual-ring.white:after {
        width: 20px;
        height: 20px;
        top: 10px;
        left: 10px;
    }
}

.preview-loading:after {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 999999;
    right: 0;
    width: 100%;
    /* content: ''; */
    border-radius: 5px;
    display: block;
    background: #eee;
    background: linear-gradient(110deg, #d0d0d0 8%, #f5f5f5 18%, #d0d0d0 33%);
    background-size: 300% 100%;
    -webkit-animation: 1.5s shine linear infinite;
    animation: 1.8s shine linear infinite;
}
.img-location.preview-location-loading {
    border-radius: 5px;
    display: block;
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 300% 100%;
    -webkit-animation: 1.5s shine linear infinite;
    animation: 1.5s shine linear infinite;
}

.other-product-visibility .action-switch-mode {
    display: none;
}
