/* Age Gate — overlay styles. Per-site colours/blur arrive as CSS variables on .itag-overlay. */

/* ---- atmospheres ---- */
.itag-atmo-dark,
.itag-atmo-auto {
	--itag-card: #000;
	--itag-border: #3e3746;
	--itag-title: #fff;
	--itag-text: #ccc;
	--itag-muted: #8492a6;
	--itag-backdrop: rgba(0, 0, 0, 0.65);
	--itag-shadow: 0 20px 150px rgba(0, 0, 0, 0.5);
}

.itag-atmo-light {
	--itag-card: #fff;
	--itag-border: #e5e5e5;
	--itag-title: #333;
	--itag-text: #333;
	--itag-muted: #666;
	--itag-backdrop: rgba(255, 255, 255, 0.8);
	--itag-shadow: 0 20px 150px rgba(51, 73, 90, 0.2);
}

@media (prefers-color-scheme: light) {
	.itag-atmo-auto {
		--itag-card: #fff;
		--itag-border: #e5e5e5;
		--itag-title: #333;
		--itag-text: #333;
		--itag-muted: #666;
		--itag-backdrop: rgba(255, 255, 255, 0.8);
		--itag-shadow: 0 20px 150px rgba(51, 73, 90, 0.2);
	}
}

/* ---- overlay ---- */
.itag-overlay {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background-color: var(--itag-backdrop);
	-webkit-backdrop-filter: blur(var(--itag-blur, 10px));
	backdrop-filter: blur(var(--itag-blur, 10px));
	z-index: 100000;
	font-family: inherit;
	opacity: 1;
	transition: opacity 0.25s ease;
}

html.itag-age-check .itag-overlay {
	display: block;
	animation: itag-fade-in 0.2s ease;
}

.itag-overlay.itag-leaving {
	opacity: 0;
}

html.itag-age-check {
	overflow: hidden;
}

/* Browsers without backdrop-filter: blur the page itself. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	html.itag-age-check body > :not(.itag-overlay) {
		filter: blur(var(--itag-blur, 10px));
	}
}

@keyframes itag-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ---- card ---- */
.itag-popup {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 40rem;
	max-width: 90vw;
	max-height: 92vh;
	overflow: auto;
	padding: 3rem;
	box-sizing: border-box;
	background: var(--itag-card);
	color: var(--itag-text);
	border: 1px solid var(--itag-border);
	border-radius: 8px;
	box-shadow: var(--itag-shadow);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1.5;
}

.itag-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.itag-panel[hidden] {
	display: none;
}

.itag-logo {
	margin: 0 0 45px;
}

.itag-logo a {
	display: inline-block;
	color: inherit;
	text-decoration: none;
}

.itag-logo-img {
	display: inline-block;
	height: auto;
	max-width: 100%;
	vertical-align: middle;
	opacity: var(--itag-logo-opacity, 1);
	filter: var(--itag-logo-filter, none);
}

.itag-logo-text {
	display: inline-block;
	font-size: 32px;
	line-height: 1.1;
	font-weight: 900;
	letter-spacing: 0.5px;
	color: var(--itag-accent, #9600ff);
	opacity: var(--itag-logo-opacity, 1);
}

.itag-title {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.23;
	font-weight: 300;
	color: var(--itag-title);
}

.itag-subtitle {
	margin: 0 0 45px;
	padding: 0;
	font-size: 32px;
	line-height: 42px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--itag-title);
}

.itag-panel--sorry .itag-subtitle {
	margin-bottom: 10px;
}

.itag-sorry-sub {
	margin: 0 0 25px;
	font-size: 16px;
	color: var(--itag-muted);
}

.itag-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	width: 100%;
}

.itag-btn {
	display: inline-block;
	box-sizing: border-box;
	margin: 0;
	border: 1px solid transparent;
	border-radius: 9px;
	padding: 0 35px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 40px;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.itag-btn:focus-visible {
	outline: 2px solid var(--itag-title);
	outline-offset: 3px;
}

.itag-btn.itag-autofocus:focus-visible {
	outline: none;
}

/* Outline style (default): exit = thin border, enter = filled accent; both invert on hover. */
.itag-btns-outline .itag-btn--exit {
	background: none;
	border-color: var(--itag-exit, var(--itag-title));
	color: var(--itag-exit, var(--itag-title));
}

.itag-btns-outline .itag-btn--exit:hover {
	background: var(--itag-exit, var(--itag-title));
	color: var(--itag-exit-text, var(--itag-card));
}

.itag-btns-outline .itag-btn--enter {
	background: var(--itag-accent, #9600ff);
	border-color: var(--itag-accent, #9600ff);
	color: var(--itag-accent-text, #000);
}

.itag-btns-outline .itag-btn--enter:hover {
	background: none;
	color: var(--itag-accent, #9600ff);
}

/* Filled style: both buttons solid, brighten on hover (WPS Disclaimer look). */
.itag-btns-filled .itag-btn--exit {
	background: var(--itag-exit, #999);
	border-color: var(--itag-exit, #999);
	color: var(--itag-exit-text, #fff);
}

.itag-btns-filled .itag-btn--enter {
	background: var(--itag-accent, #9600ff);
	border-color: var(--itag-accent, #9600ff);
	color: var(--itag-accent-text, #000);
}

.itag-btns-filled .itag-btn:hover {
	filter: brightness(1.1);
}

.itag-note {
	margin: 24px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--itag-muted);
}

.itag-note a {
	color: var(--itag-title);
}

@media (max-width: 660px) {
	.itag-popup {
		padding: 2rem 1.25rem;
	}

	.itag-logo {
		margin-bottom: 30px;
	}

	.itag-subtitle {
		font-size: 22px;
		line-height: 26.4px;
		margin-bottom: 14px;
	}

	.itag-actions {
		flex-direction: column;
	}

	.itag-btn {
		width: 100%;
	}
}
