.cp-age-gate {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
	box-sizing: border-box;
}

.cp-age-gate.is-open {
	opacity: 1;
	pointer-events: auto;
}

.cp-age-gate__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.cp-age-gate__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	text-align: center;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	padding: 40px 36px;
	box-sizing: border-box;
	transform: scale(0.94) translateY(14px);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cp-age-gate.is-open .cp-age-gate__dialog {
	transform: scale(1) translateY(0);
}

/* A quick shake for emphasis when "No" is clicked — CSS animations take
   priority over the transform transition above, so this plays cleanly on
   top of it without fighting the open/close scale effect. */
.cp-age-gate__dialog.is-shaking {
	animation: cp-age-gate-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes cp-age-gate-shake {
	10%,
	90% {
		transform: translateX(-1px);
	}

	20%,
	80% {
		transform: translateX(2px);
	}

	30%,
	50%,
	70% {
		transform: translateX(-4px);
	}

	40%,
	60% {
		transform: translateX(4px);
	}
}

.cp-age-gate__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(88, 211, 107, 0.08);
	border: 1px solid var(--cp-accent-border);
	color: var(--cp-accent);
	box-shadow: 0 0 32px rgba(88, 211, 107, 0.22);
	margin: 0 auto 20px;
}

.cp-age-gate__title {
	font-family: var(--cp-font-heading);
	font-weight: 600;
	font-size: clamp(20px, 2.6vw, 24px);
	color: var(--cp-text);
	margin: 0 0 14px;
	letter-spacing: -0.01em;
}

.cp-age-gate__body {
	color: var(--cp-text-muted);
	font-size: 14px;
	line-height: 1.7;
	margin: 0 0 28px;
}

.cp-age-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cp-age-gate__confirm,
.cp-age-gate__decline,
.cp-age-gate__goback,
.cp-age-gate__leave {
	width: 100%;
	justify-content: center;
}

/* ---------- Error view (shown after clicking "No") ---------- */

.cp-age-gate__icon--error {
	background: rgba(229, 72, 77, 0.08);
	border-color: rgba(229, 72, 77, 0.35);
	color: #e5484d;
	box-shadow: 0 0 32px rgba(229, 72, 77, 0.2);
}

.cp-age-gate__body--error {
	padding: 14px 16px;
	background: rgba(229, 72, 77, 0.06);
	border: 1px solid rgba(229, 72, 77, 0.25);
	border-radius: var(--cp-radius-md);
	color: var(--cp-text-muted);
	text-align: left;
}

body.cp-age-gate-open {
	overflow: hidden;
}

@media (max-width: 560px) {
	.cp-age-gate__dialog {
		padding: 32px 24px;
	}

	.cp-age-gate__icon {
		width: 56px;
		height: 56px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-age-gate,
	.cp-age-gate__dialog {
		transition-duration: 0.001ms;
	}

	.cp-age-gate__dialog.is-shaking {
		animation: none;
	}
}
