/* AgeWall front-end gate styles. Premium, neutral, accessible, theme-agnostic. */

.agewall-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: radial-gradient( 120% 120% at 50% 0%, rgba( 23, 33, 48, 0.82 ), rgba( 8, 12, 20, 0.94 ) );
	backdrop-filter: blur( 6px );
	-webkit-backdrop-filter: blur( 6px );
	overflow-y: auto;
	animation: agewall-fade 0.2s ease;
}

.agewall-gate {
	width: 100%;
	max-width: 27rem;
	margin: auto;
	color: #0f172a;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Theme-independent typography: the gate must render consistently on ANY host
	theme (some set unusual body fonts), so force a clean system sans on the gate
	and all its descendants. */
.agewall-gate,
.agewall-gate * {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif !important;
}

.agewall-overlay .agewall-gate__inner,
.agewall-gate__inner {
	position: relative;
	background: #ffffff;
	border: 1px solid #eceef2;
	border-radius: 18px;
	padding: 2.4rem 2.1rem 2.1rem;
	box-shadow:
		0 1px 0 rgba( 255, 255, 255, 0.6 ) inset,
		0 28px 70px -24px rgba( 15, 23, 42, 0.45 ),
		0 10px 24px -14px rgba( 15, 23, 42, 0.25 );
	text-align: center;
	animation: agewall-rise 0.24s cubic-bezier( 0.2, 0.7, 0.3, 1 );
}

/* Trust mark (default shield icon or author logo) */
.agewall-gate__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.4rem;
	height: 3.4rem;
	margin: 0 auto 1.15rem;
	border-radius: 50%;
	background: #f1f5f9;
	box-shadow: 0 0 0 1px #e2e8f0, 0 0 0 6px rgba( 241, 245, 249, 0.6 );
	color: #0f172a;
}
.agewall-gate__badge svg {
	width: 1.7rem;
	height: 1.7rem;
	display: block;
}
.agewall-gate__logo {
	max-width: 160px;
	max-height: 56px;
	height: auto;
	margin: 0 auto 1.2rem;
	display: block;
}

.agewall-gate__title {
	margin: 0 0 0.55rem;
	font-size: 1.4rem;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #0f172a;
}

.agewall-gate__message {
	margin: 0 auto 1.4rem;
	max-width: 22rem;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #64748b;
}

/* Step form (generic) */
.agewall-gate__step form,
.agewall-gate__step .agewall-step {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	align-items: stretch;
	margin: 0;
}

.agewall-gate__step label {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #475569;
	text-align: left;
}

.agewall-gate__step input[type="date"],
.agewall-gate__step input[type="text"],
.agewall-gate__step input[type="file"],
.agewall-gate__step select {
	width: 100%;
	padding: 0.8rem 0.9rem;
	font-size: 1rem;
	font-family: inherit;
	color: #0f172a;
	border: 1px solid #d5dae1;
	border-radius: 11px;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.agewall-gate__step input::placeholder {
	color: #94a3b8;
}

.agewall-gate__step input:focus,
.agewall-gate__step select:focus {
	outline: none;
	border-color: #0f172a;
	box-shadow: 0 0 0 3px rgba( 15, 23, 42, 0.12 );
}
.agewall-gate__step button:focus-visible,
.agewall-btn:focus-visible {
	outline: 3px solid #0f172a;
	outline-offset: 2px;
}

/* Buttons */
.agewall-gate__step button,
.agewall-btn {
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	padding: 0.85rem 1.15rem;
	font-size: 1rem;
	font-family: inherit;
	font-weight: 600;
	line-height: 1;
	border-radius: 11px;
	border: 1px solid transparent;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 8px 18px -10px rgba( 15, 23, 42, 0.7 );
	transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.agewall-gate__step button[type="submit"]:hover,
.agewall-btn:hover {
	background: #1e293b;
}
.agewall-gate__step button:active,
.agewall-btn:active {
	transform: translateY( 1px );
}

/* Secondary / decline */
.agewall-gate__step .agewall-decline,
.agewall-gate__step button[type="button"].agewall-decline {
	background: transparent;
	color: #64748b;
	border-color: #e2e8f0;
	box-shadow: none;
}
.agewall-gate__step .agewall-decline:hover {
	background: #f8fafc;
	color: #334155;
}

/* Confirm variant: prompt on its own row, Enter + Leave side by side */
.agewall-step--confirm {
	flex-direction: row;
	flex-wrap: wrap;
}
.agewall-step--confirm .agewall-prompt {
	flex: 1 0 100%;
	margin: 0 0 0.35rem;
	font-size: 1.02rem;
	font-weight: 500;
	color: #0f172a;
}
.agewall-step--confirm button {
	flex: 1 1 8rem;
}

.agewall-prompt,
.agewall-step__intro {
	margin: 0 0 0.25rem;
	font-size: 1rem;
}

.agewall-hint {
	font-size: 0.78rem;
	color: #94a3b8;
	margin: 0;
	text-align: left;
}

.agewall-gate__error {
	margin: 0.9rem 0 0;
	color: #b91c1c;
	font-size: 0.9rem;
	font-weight: 600;
}

.agewall-gate__footnote {
	margin: 1.25rem 0 0;
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	color: #cbd5e1;
}

.agewall-notice--admin {
	color: #92400e;
	background: #fef3c7;
	border-radius: 10px;
	padding: 0.75rem;
	font-size: 0.9rem;
}

@keyframes agewall-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes agewall-rise {
	from { opacity: 0; transform: translateY( 10px ) scale( 0.985 ); }
	to { opacity: 1; transform: none; }
}

@media ( prefers-color-scheme: dark ) {
	.agewall-gate__inner {
		background: #0f1720;
		border-color: #1e293b;
		box-shadow: 0 28px 70px -24px rgba( 0, 0, 0, 0.8 );
	}
	.agewall-gate,
	.agewall-gate__title { color: #f1f5f9; }
	.agewall-gate__message { color: #94a3b8; }
	.agewall-gate__badge {
		background: #1e293b;
		box-shadow: 0 0 0 1px #334155, 0 0 0 6px rgba( 30, 41, 59, 0.5 );
		color: #f1f5f9;
	}
	.agewall-gate__step label { color: #cbd5e1; }
	.agewall-gate__step input,
	.agewall-gate__step select {
		background: #0b1118;
		border-color: #334155;
		color: #f1f5f9;
	}
	.agewall-gate__step input:focus,
	.agewall-gate__step select:focus {
		border-color: #e2e8f0;
		box-shadow: 0 0 0 3px rgba( 226, 232, 240, 0.16 );
	}
	.agewall-gate__step button,
	.agewall-btn { background: #f8fafc; color: #0f172a; box-shadow: none; }
	.agewall-gate__step button[type="submit"]:hover,
	.agewall-btn:hover { background: #e2e8f0; }
	.agewall-gate__step .agewall-decline {
		background: transparent;
		color: #94a3b8;
		border-color: #334155;
	}
	.agewall-step--confirm .agewall-prompt { color: #f1f5f9; }
}

@media ( prefers-reduced-motion: reduce ) {
	.agewall-overlay,
	.agewall-gate__inner { animation: none; }
	.agewall-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
	.agewall-gate__step button,
	.agewall-btn { transition: none; }
}
