.cp-popup-root {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 30px 30px 24px;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.6);
	overflow: hidden;
	font-family: system-ui, sans-serif;
	pointer-events: auto;
}

.cp-popup-root[hidden] {
	display: none;
}

.cp-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
	z-index: 0;
}

.cp-card {
	position: relative;
	z-index: 1;
	display: flex;
	min-height: 0;
	pointer-events: auto;
	animation: cp-card-in 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cp-card-in {
	from {
		opacity: 0;
		transform: translateY(22px) scale(0.94);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.cp-poster {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 128px);
	border-radius: 14px;
	box-shadow: 0 30px 70px -24px oklch(0.25 0.06 265 / 0.45);
}

/*
 * Reset properties a theme's global `button`/`svg` styles commonly set
 * (padding, min-width, line-height, box-sizing, appearance) are pinned with
 * !important here — otherwise the theme's reset wins the cascade and the
 * button renders as a squished oval with an off-center icon instead of a
 * clean circle.
 */
.cp-close {
	position: absolute;
	top: -16px;
	right: -16px;
	box-sizing: border-box !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 999px !important;
	line-height: 0 !important;
	font-size: 0 !important;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid oklch(1 0 0 / 0.5);
	background: oklch(0.35 0.11 265 / 0.78);
	color: oklch(0.99 0.005 90);
	backdrop-filter: blur(6px);
	box-shadow: 0 6px 18px -8px oklch(0.2 0.05 265 / 0.6);
	transition: background 140ms ease, transform 140ms ease;
}

.cp-close svg {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0;
	pointer-events: none;
}

.cp-close:hover {
	background: oklch(0.28 0.11 265 / 0.94);
}

.cp-close:active {
	transform: scale(0.94);
}

.cp-close:focus-visible {
	outline: 2px solid oklch(0.99 0.005 90);
	outline-offset: 2px;
}

