/* TCG Image Comparison – Front-end Styles
   Version: 1.0.2  |  Author: Mike Bachraty
---------------------------------------------------------------- */

.tcg-ic-wrapper {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.tcg-ic-container {
	position: relative;
	width: 100%;
	cursor: col-resize;
	-webkit-user-select: none;
	user-select: none;
	touch-action: pan-y;
	border-radius: 4px;
	background-color: transparent;
}

/* ── Images ─────────────────────────────────────────────────── */

.tcg-ic-img {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
	-webkit-user-drag: none;
}

/* After image — base layer, sets the container height */
.tcg-ic-img-after {
	position: relative;
	z-index: 1;
}

/* Before image — on top, same size as after image.
   JS applies clip-path to reveal only the left portion.
   Must NOT change size — only clip-path changes. */
.tcg-ic-img-before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	z-index: 2;
}

/* ── Divider ─────────────────────────────────────────────────── */

.tcg-ic-divider {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	background-color: #ffffff;
	z-index: 4;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
	pointer-events: none;
}

/* ── Handle ──────────────────────────────────────────────────── */

.tcg-ic-handle {
	position: absolute;
	top: 50%;
	z-index: 5;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.tcg-ic-handle-circle {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background-color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tcg-ic-container:hover .tcg-ic-handle-circle {
	transform: scale(1.08);
	box-shadow:
		0 4px 24px rgba(0, 0, 0, 0.55),
		0 0 0 1px rgba(0, 0, 0, 0.1);
}

.tcg-ic-container.is-dragging .tcg-ic-handle-circle {
	transform: scale(0.96);
}

/* ── Labels ──────────────────────────────────────────────────── */

.tcg-ic-label {
	position: absolute;
	top: 14px;
	z-index: 6;
	background-color: rgba(0, 0, 0, 0.55);
	color: #f0ece4;
	font-size: 0.65rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 2px;
	font-family: 'Courier New', Courier, monospace;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.tcg-ic-label-before { left: 14px; }
.tcg-ic-label-after  { right: 14px; }

.tcg-ic-label-before.tcg-ic-label--hidden,
.tcg-ic-label-after.tcg-ic-label--hidden {
	opacity: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 767px) {
	.tcg-ic-handle-circle { width: 38px; height: 38px; }
	.tcg-ic-label { font-size: 0.6rem; padding: 4px 8px; }
}
