/* Overlay - dark + blurred background behind the popup */
.cepb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	overflow: auto;
}

.cepb-overlay.cepb-active {
	display: flex;
}

.cepb-stage {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Each popup's root Elementor Container decides its own look:
   background, border, border-radius, box-shadow, width, height, padding - all from Elementor's Style tab. */
.cepb-item {
	display: none;
	width: 100%;
}

.cepb-item.cepb-visible {
	display: block;
}

/* entrance animations - applied to whatever box the user has designed */
.cepb-item[data-anim="zoom"].cepb-visible {
	animation: cepbZoom 0.25s ease;
}
.cepb-item[data-anim="fade"].cepb-visible {
	animation: cepbFade 0.25s ease;
}
.cepb-item[data-anim="slide-up"].cepb-visible {
	animation: cepbSlideUp 0.3s ease;
}

@keyframes cepbZoom {
	from { transform: scale(0.85); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}
@keyframes cepbFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes cepbSlideUp {
	from { transform: translateY(40px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

body.cepb-open {
	overflow: hidden;
}

/* Custom scrollbar for popup content - thin, rounded, inset, hidden until you interact */
.cepb-item {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.cepb-item:hover,
.cepb-item:focus-within {
	scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
}

.cepb-item::-webkit-scrollbar {
	width: 7px;
}

.cepb-item::-webkit-scrollbar-track {
	background: transparent;
	margin-block: 10px;
}

.cepb-item::-webkit-scrollbar-thumb {
	background-color: transparent;
	border-radius: 10px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

.cepb-item:hover::-webkit-scrollbar-thumb,
.cepb-item:focus-within::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.28);
	background-clip: padding-box;
}

.cepb-item::-webkit-scrollbar-thumb:hover {
	background-color: rgba(0, 0, 0, 0.45);
}

/* On touch devices there's no hover, so keep the thumb faintly visible while scrolling */
@media (hover: none) {
	.cepb-item {
		scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
	}
	.cepb-item::-webkit-scrollbar-thumb {
		background-color: rgba(0, 0, 0, 0.22);
	}
}

/* Slightly tighter default height on small phones so the popup never feels oversized */
@media (max-width: 480px) {
	.cepb-item {
		max-height: 82vh !important;
	}
}

/* Base functional styling for the Popup Close/Back widget - colors/size come from Elementor controls */
.cepb-controls-widget {
	display: flex;
	align-items: center;
}

.cepb-ctrl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cepb-ctrl-btn i,
.cepb-ctrl-btn svg {
	pointer-events: none;
}
