/* VSC Compare Slider - vsctimes.com */

.vsc-cs {
	--vsc-pos: 50%;
	--vsc-handle-size: 46px;
	--vsc-line: 2px;
	position: relative;
	display: block;
	width: 100%;
	margin: 0 0 1.6em;
	line-height: 0;
	border-radius: 5px;
	overflow: hidden;
	background: #0e0f13;
	box-shadow: 0 1px 2px rgba(10, 12, 18, .1), 0 8px 26px -12px rgba(10, 12, 18, .35);
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	isolation: isolate;
}

.vsc-cs * {
	box-sizing: border-box;
}

.vsc-cs img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	max-width: none;
	pointer-events: none;
	-webkit-user-drag: none;
}

.vsc-cs-frame {
	position: relative;
	display: block;
	width: 100%;
	cursor: ew-resize;
}

.vsc-cs-a,
.vsc-cs-b {
	display: block;
}

.vsc-cs-b {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	clip-path: inset(0 0 0 var(--vsc-pos));
	will-change: clip-path;
}

.vsc-cs-b img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* divider line */
.vsc-cs-divider {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--vsc-pos);
	width: var(--vsc-line);
	margin-left: calc(var(--vsc-line) / -2);
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 0 0 1px rgba(8, 10, 16, .28), 0 0 14px rgba(8, 10, 16, .3);
	pointer-events: none;
	z-index: 3;
}

/* grip */
.vsc-cs-handle {
	position: absolute;
	top: 50%;
	left: var(--vsc-pos);
	width: var(--vsc-handle-size);
	height: var(--vsc-handle-size);
	margin: calc(var(--vsc-handle-size) / -2) 0 0 calc(var(--vsc-handle-size) / -2);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, .92);
	border-radius: 50%;
	background: rgba(16, 18, 26, .48);
	-webkit-backdrop-filter: blur(9px) saturate(140%);
	backdrop-filter: blur(9px) saturate(140%);
	box-shadow: 0 2px 10px rgba(8, 10, 16, .38);
	cursor: ew-resize;
	z-index: 4;
	appearance: none;
	-webkit-appearance: none;
	transition: transform .18s ease, background-color .18s ease;
}

.vsc-cs-handle:hover {
	background: rgba(16, 18, 26, .66);
	transform: scale(1.06);
}

.vsc-cs-handle:focus-visible {
	outline: none;
	box-shadow: 0 2px 10px rgba(8, 10, 16, .38), 0 0 0 3px rgba(255, 255, 255, .55), 0 0 0 6px rgba(16, 18, 26, .5);
}

.vsc-cs.is-dragging .vsc-cs-handle {
	transform: scale(1.1);
	background: rgba(16, 18, 26, .72);
}

.vsc-cs.is-dragging .vsc-cs-b {
	will-change: clip-path;
}

.vsc-cs-handle svg {
	display: block;
	width: 11px;
	height: 11px;
	fill: none;
	stroke: #fff;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: 0 0 auto;
}

/* labels */
.vsc-cs-label {
	position: absolute;
	top: 14px;
	z-index: 2;
	max-width: 42%;
	padding: 6px 13px;
	border-radius: 999px;
	background: rgba(14, 16, 24, .58);
	-webkit-backdrop-filter: blur(7px) saturate(140%);
	backdrop-filter: blur(7px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, .16);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	opacity: 1;
	transition: opacity .2s ease;
}

.vsc-cs-label-a {
	left: 14px;
}

.vsc-cs-label-b {
	right: 14px;
}

.vsc-cs.is-edge-left .vsc-cs-label-a,
.vsc-cs.is-edge-right .vsc-cs-label-b {
	opacity: 0;
}

/* hint pill */
.vsc-cs-hint {
	position: absolute;
	left: 50%;
	bottom: 14px;
	z-index: 2;
	transform: translateX(-50%);
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(14, 16, 24, .58);
	-webkit-backdrop-filter: blur(7px);
	backdrop-filter: blur(7px);
	border: 1px solid rgba(255, 255, 255, .16);
	color: rgba(255, 255, 255, .92);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: .03em;
	white-space: nowrap;
	pointer-events: none;
	opacity: 1;
	transition: opacity .3s ease;
}

.vsc-cs.is-touched .vsc-cs-hint {
	opacity: 0;
}

/* caption */
.vsc-cs-wrap {
	margin: 0 0 1.8em;
}

.vsc-cs-wrap .vsc-cs {
	margin-bottom: 0;
}

.vsc-cs-caption {
	margin: 10px 2px 0;
	color: #6b6f76;
	font-size: 13px;
	line-height: 1.55;
	text-align: center;
}

/* skeleton until images decode */
.vsc-cs:not(.is-ready) .vsc-cs-handle,
.vsc-cs:not(.is-ready) .vsc-cs-divider,
.vsc-cs:not(.is-ready) .vsc-cs-hint {
	opacity: 0;
}

.vsc-cs.is-ready .vsc-cs-handle,
.vsc-cs.is-ready .vsc-cs-divider {
	opacity: 1;
}

@media (max-width: 600px) {
	.vsc-cs {
		--vsc-handle-size: 40px;
	}

	.vsc-cs-label {
		top: 10px;
		padding: 5px 10px;
		font-size: 10.5px;
		letter-spacing: .05em;
	}

	.vsc-cs-label-a {
		left: 10px;
	}

	.vsc-cs-label-b {
		right: 10px;
	}

	.vsc-cs-hint {
		bottom: 10px;
		font-size: 10.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vsc-cs-handle,
	.vsc-cs-label,
	.vsc-cs-hint {
		transition: none;
	}
}

/* editor preview inside Gutenberg */
.vsc-cs-editor-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	padding: 24px;
	border: 1px dashed #c3c4c7;
	border-radius: 5px;
	color: #646970;
	font-size: 13px;
	text-align: center;
}
