/* ---------------------------------------------------------------------------
   Age + research-use gate.
   Colours are the source's own: header and confirm #72069e, deny #d9534f.
   --------------------------------------------------------------------------- */

html.nx-agegate-open,
html.nx-agegate-open body { overflow: hidden; }

.nx-agegate {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.nx-agegate__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
	backdrop-filter: blur(3px);
}

.nx-agegate__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	background: var(--nx-white);
	border-radius: 6px;
	box-shadow: var(--nx-shadow-pop);
	overflow: hidden;
}

.nx-agegate__header {
	background: var(--nx-purple);
	color: var(--nx-white);
	padding: 18px 24px;
}

.nx-agegate__title {
	margin: 0;
	font-family: var(--nx-font-heading);
	font-size: 20px;
	font-weight: 500;
	color: var(--nx-white);
}

.nx-agegate__body {
	padding: 22px 24px;
	overflow-y: auto;
	font-size: 15px;
	line-height: 1.6;
	color: var(--nx-ink);
}

.nx-agegate__message { margin: 0 0 18px; }

.nx-agegate__check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	margin-bottom: 12px;
	border: 1px solid var(--nx-rule);
	border-radius: 4px;
	background: #fbfbfd;
	font-family: var(--nx-font-body);
	font-size: 14px;
	line-height: 1.55;
	cursor: pointer;
	transition: border-color var(--nx-transition), background var(--nx-transition);
}
.nx-agegate__check:hover { border-color: var(--nx-purple-20); }
.nx-agegate__check:has(input:checked) { border-color: var(--nx-purple); background: var(--nx-purple-05); }

.nx-agegate__check input,
.nx-agegate__remember input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--nx-purple);
	cursor: pointer;
}

.nx-agegate__remember {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	cursor: pointer;
}

.nx-agegate__footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid var(--nx-rule);
	background: var(--nx-white);
}

.nx-agegate__btn {
	font-family: var(--nx-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 12px 24px;
	border: 0;
	border-radius: 4px;
	color: var(--nx-white);
	cursor: pointer;
	transition: opacity var(--nx-transition), background var(--nx-transition);
}

.nx-agegate__btn--deny { background: var(--nx-danger); }
.nx-agegate__btn--deny:hover { background: #c9302c; }

.nx-agegate__btn--confirm { background: var(--nx-purple); }
.nx-agegate__btn--confirm:hover { background: var(--nx-purple-deep); }
.nx-agegate__btn--confirm:disabled { background: #c9c9c9; cursor: not-allowed; }

@media (max-width: 600px) {
	.nx-agegate__footer { flex-direction: column-reverse; }
	.nx-agegate__btn { width: 100%; }
}
