/**
 * Researcher Verification Gate (.atx-rgate-*).
 *
 * Full-screen first-visit confirmation popup: logo, heading, intro, two
 * checkbox statements and an "Enter" button that stays disabled until both
 * boxes are ticked. Atomix dark navy + teal palette. Mobile-friendly.
 *
 * @package Atomix
 */

.atx-rgate {
	--bg: #071a2e;
	--bg-2: #0a2138;
	--teal: #2bb6cf;
	--teal-2: #5fd6e8;
	--txt-d: #cfe0ee;
	--txt-dim: #8fa9c2;
	--line-d: rgba(255, 255, 255, .1);
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	color: var(--txt-d);
	opacity: 1;
	transition: opacity .35s ease;
}

.atx-rgate.is-leaving {
	opacity: 0;
	pointer-events: none;
}

/* Lock page scroll while the gate is open. */
body.atx-rgate-active {
	overflow: hidden;
}

.atx-rgate-backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 90% at 50% -10%, rgba(43, 182, 207, .14), rgba(43, 182, 207, 0) 55%),
		linear-gradient(180deg, #061626, #03101d);
}

.atx-rgate-backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(3, 12, 22, .55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.atx-rgate-shell {
	position: relative;
	width: 100%;
	max-width: 480px;
}

.atx-rgate-card {
	position: relative;
	background:
		radial-gradient(120% 80% at 50% -10%, rgba(43, 182, 207, .10), rgba(43, 182, 207, 0) 60%),
		linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 22px;
	padding: 38px 34px 30px;
	box-shadow:
		0 40px 90px rgba(0, 0, 0, .55),
		inset 0 1px 0 rgba(255, 255, 255, .08);
	animation: atx-rgate-in .4s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes atx-rgate-in {
	from { transform: translateY(14px) scale(.98); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

/* Hairline teal accent across the top. */
.atx-rgate-card::before {
	content: "";
	position: absolute;
	left: 28px;
	right: 28px;
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, rgba(95, 214, 232, 0), rgba(95, 214, 232, .55), rgba(95, 214, 232, 0));
}

/* ---------- Logo ---------- */
.atx-rgate-logo {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 0 24px;
}

.atx-rgate-logo img {
	display: block;
	max-width: 340px;
	width: auto;
	height: auto;
	max-height: 120px;
	object-fit: contain;
}

/* ---------- Heading / intro ---------- */
.atx-rgate-title {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
	text-align: left;
}

.atx-rgate-intro {
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--txt-dim);
	text-align: left;
}

/* ---------- Form ---------- */
.atx-rgate-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Checkbox rows as bordered cards. */
.atx-rgate-check {
	display: flex;
	align-items: flex-start;
	gap: 13px;
	padding: 15px 16px;
	border: 1px solid var(--line-d);
	border-radius: 13px;
	background: rgba(7, 26, 46, .5);
	cursor: pointer;
	transition: border-color .18s ease, background .18s ease;
}

.atx-rgate-check:hover {
	border-color: rgba(95, 214, 232, .4);
	background: rgba(7, 26, 46, .7);
}

/* Hide the native checkbox; use a custom box. */
.atx-rgate-check input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.atx-rgate-box {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 7px;
	border: 1.5px solid rgba(255, 255, 255, .28);
	background: rgba(255, 255, 255, .04);
	position: relative;
	transition: border-color .18s ease, background .18s ease;
}

.atx-rgate-box::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 6px;
	height: 11px;
	border: solid #042033;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .18s ease;
}

.atx-rgate-check input:checked ~ .atx-rgate-box {
	border-color: var(--teal-2);
	background: linear-gradient(135deg, var(--teal), var(--teal-2));
}

.atx-rgate-check input:checked ~ .atx-rgate-box::after {
	transform: rotate(45deg) scale(1);
}

.atx-rgate-check input:focus-visible ~ .atx-rgate-box {
	box-shadow: 0 0 0 3px rgba(43, 182, 207, .35);
}

.atx-rgate-check input:checked ~ .atx-rgate-check-text {
	color: var(--txt-d);
}

.atx-rgate-check-text {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--txt-dim);
}

.atx-rgate-check-text strong {
	color: #fff;
	font-weight: 700;
}

/* ---------- Enter button ---------- */
.atx-rgate-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	height: 54px;
	margin-top: 6px;
	border: 0;
	border-radius: 13px;
	font-family: inherit;
	font-size: 15.5px;
	font-weight: 800;
	color: #042033;
	background: linear-gradient(90deg, var(--teal), var(--teal-2));
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, opacity .18s ease;
}

.atx-rgate-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(43, 182, 207, .35);
	filter: brightness(1.03);
}

.atx-rgate-btn:active:not(:disabled) {
	transform: translateY(0);
}

.atx-rgate-btn:disabled {
	cursor: not-allowed;
	opacity: .4;
	background: rgba(255, 255, 255, .12);
	color: var(--txt-dim);
}

.atx-rgate-btn svg {
	flex: 0 0 auto;
}

/* ---------- Disclaimer / exit ---------- */
.atx-rgate-disclaimer {
	margin: 20px 0 0;
	font-size: 11.5px;
	line-height: 1.6;
	color: var(--txt-dim);
	text-align: left;
}

.atx-rgate-disclaimer a,
.atx-rgate-disclaimer strong {
	color: var(--txt-d);
}

.atx-rgate-exit {
	margin: 16px 0 0;
	text-align: center;
	font-size: 13px;
	color: var(--txt-dim);
}

.atx-rgate-exit a {
	color: var(--txt-dim);
	text-decoration: none;
	font-weight: 600;
}

.atx-rgate-exit a:hover {
	color: var(--teal-2);
	text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
	.atx-rgate-card {
		padding: 30px 22px 26px;
		border-radius: 18px;
	}

	.atx-rgate-title {
		font-size: 21px;
	}
}
