.image-comparator * {
    box-sizing: border-box;
}

.image-comparator {
    position: relative;
    background: #f6f6f6;
    height: 0;
    padding-bottom: 66.67%;
    overflow: hidden;
    user-select: none;
}

.image-comparator > img {
    position: absolute;
    width: 100%;
    -webkit-user-drag: none;
}

.image-comparator .left-image {
    clip-path: inset(0 50% 0 0);
}

.image-comparator .right-image {
    clip-path: inset(0 0 0 50%);
}

.image-comparator.maximized {
    position: fixed;
    z-index: 999;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, .7);
}

.image-comparator.maximized > img {
    height: 100%;
    object-fit: contain;
}

.image-comparator .maximized-icon {
    position: absolute;
    z-index: 998;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, .7);
    padding: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
}

.image-comparator .maximized-icon > svg {
    fill: #fff;
}

.image-comparator:hover .maximized-icon {
    opacity: 1 !important;
}

.image-comparator .slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 100%;
    background: #fff;
    cursor: ew-resize;
    opacity: .8;
}

.image-comparator .slider-handle:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 50px;
    background: #fff;
}