.porto-image-comparison {
	overflow: hidden;
	position: relative;
	z-index: 0;
	user-select: none;

	img {
		position: absolute;
		top: 0;
		width: 100%;
		user-select: none;
		transition: none;
	}

	.porto-compare-icon {
		width: 1em;
		position: relative;
		&:before, &:after {
			content: '';
			border: 6px inset transparent;
			position: absolute;
			width: 0;
			height: 0;
			top: 50%;
			margin-top: -6px;
		}
		&:before {
			border-right: 6px solid;
			border-left: none;
			left: -.05em;
		}
		&:after {
			border-left: 6px solid;
			border-right: none;
			right: -.05em;
		}
	}
}

.porto-image-comparison-vertical .porto-compare-icon {
	transform: rotate(90deg);
}

.porto-image-comparison-before {
	z-index: 16
}

.porto-image-comparison-after {
	z-index: 8
}

.porto-image-comparison-handle {
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: calc( -0.5 * var(--porto-handle-sz) );
	margin-left: calc( -0.5 * var(--porto-handle-sz) );
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: move;
	width: var(--porto-handle-sz);
	height: var(--porto-handle-sz);
	z-index: 25;
	color: #fff;
	border: var(--porto-handle-bar) solid;
	border-radius: 50%;
	font-size: 1.25rem;
	--porto-handle-sz: 3rem;
	--porto-handle-bar: 3px;

	.elementor-editor-active & {
		pointer-events: none;
	}

	&, &:before, &:after {
		box-shadow: 0 0 5px rgba(0, 0, 0, .08);
	}

	&:before, &:after {
		content: '';
		position: absolute;
		height: 100vh;
		left: 50%;
		margin-left: calc( -0.5 * var(--porto-handle-bar) );
		border-left: var(--porto-handle-bar) solid;
		bottom: 50%;
		margin-bottom: calc( 0.5 * var(--porto-handle-sz) );

		.porto-image-comparison-vertical & {
			border-left: none;
			border-top: var(--porto-handle-bar) solid;
			width: 100vw;
			height: auto;
			right: 50%;
			top: 50%;
			left: auto;
			margin: calc( -0.5 * var(--porto-handle-bar) ) calc( 0.5 * var(--porto-handle-sz) ) 0 0;
		}
	}
	&:after {
		bottom: auto;
		top: 50%;
		margin: calc( 0.5 * var(--porto-handle-sz) ) 0 0 calc( -0.5 * var(--porto-handle-bar) );

		.porto-image-comparison-vertical & {
			left: 50%;
			margin: calc( -0.5 * var(--porto-handle-bar) ) 0 0 calc( 0.5 * var(--porto-handle-sz) );
		}
	}
}

.porto-image-comparison-overlay {
	position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
	transition-property: background;
    background: rgba(0, 0, 0, 0);
    z-index: 25;
	transition-duration: .5s;
	&:hover {
		background: rgba(0, 0, 0, 0.5);
	}
}