/* ===================================================================
 * Pretpot Pro Before and After Slider 1 - Styles
 * =================================================================== */

.pretpot-ba-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
}

.pretpot-ba-container {
	position: relative;
	width: 100%;
	height: 500px;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	touch-action: pan-y pinch-zoom;
}

/* Before & After Image Containers */
.pretpot-ba-before,
.pretpot-ba-after {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.pretpot-ba-before img,
.pretpot-ba-after img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	pointer-events: none;
	user-select: none;
}

/* After Image Clipping */
.pretpot-ba-after {
	clip-path: inset(0 0 0 50%);
}

/* Divider Line */
.pretpot-ba-divider {
	position: absolute;
	top: 0;
	left: 50%;
	width: 3px;
	height: 100%;
	background-color: #ffffff;
	transform: translateX(-50%);
	z-index: 10;
	cursor: ew-resize;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	transition: none;
}

/* Handle */
.pretpot-ba-handle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 50px;
	height: 50px;
	background-color: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: grab;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	z-index: 11;
}

.pretpot-ba-handle:hover {
	transform: translate(-50%, -50%) scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.pretpot-ba-handle:active {
	cursor: grabbing;
	transform: translate(-50%, -50%) scale(0.95);
}

.pretpot-ba-handle i,
.pretpot-ba-handle svg {
	font-size: 20px;
	color: #333333;
	pointer-events: none;
}

/* Labels */
.pretpot-ba-label {
	position: absolute;
	top: 20px;
	padding: 8px 16px;
	background-color: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	z-index: 5;
	pointer-events: none;
	user-select: none;
}

.pretpot-ba-label-before {
	left: 20px;
}

.pretpot-ba-label-after {
	right: 20px;
}

/* Smooth Animation Classes */
.pretpot-ba-divider.animating {
	transition: left 0.4s ease-out;
}

.pretpot-ba-after.animating {
	transition: clip-path 0.4s ease-out;
}

/* Loading State */
.pretpot-ba-container.loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: pretpot-ba-spin 1s linear infinite;
	z-index: 20;
}

@keyframes pretpot-ba-spin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.pretpot-ba-container {
		height: 400px;
	}
	
	.pretpot-ba-handle {
		width: 40px;
		height: 40px;
	}
	
	.pretpot-ba-handle i,
	.pretpot-ba-handle svg {
		font-size: 16px;
	}
	
	.pretpot-ba-label {
		font-size: 12px;
		padding: 6px 12px;
		top: 10px;
	}
	
	.pretpot-ba-label-before {
		left: 10px;
	}
	
	.pretpot-ba-label-after {
		right: 10px;
	}
}

@media (max-width: 480px) {
	.pretpot-ba-container {
		height: 300px;
	}
}

/* Accessibility */
.pretpot-ba-wrapper:focus-visible {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Disable text selection during drag */
.pretpot-ba-wrapper.dragging * {
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
}