/*
 * Member signup and login modal — design: MemberSignupModal in
 * src-v2/signup-modal.jsx. Markup in includes/member-modal.php.
 *
 * The <dialog> itself is a transparent, viewport-sized scroll container and the
 * visible box sits inside it with margin:auto. That keeps the box centred while
 * it fits and lets it scroll, top edge first, once it does not — flex centring
 * would cut off the top of a box taller than the screen. It also makes a click
 * on the dialog element itself a click on the backdrop, which the script uses
 * to close.
 */

.fmt-signup {
	background: transparent;
	border: 0;
	color: var(--ink);
	height: 100%;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 24px;
	width: 100%;
}

.fmt-signup[open] {
	display: flex;
}

.fmt-signup::backdrop {
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	background: rgba(18, 16, 12, .55);
}

.fmt-signup[open]::backdrop {
	animation: fmt-signup-fade .2s ease;
}

.fmt-signup-locked {
	overflow: hidden;
}

/* ------------------------------------------------------------- Box ---- */

.fmt-signup__box {
	animation: fmt-signup-pop .24s cubic-bezier(.2, .7, .3, 1);
	background: var(--bg);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-pop);
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: auto;
	max-width: 880px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.fmt-signup__close {
	position: absolute;
	right: 14px;
	top: 14px;
	z-index: 2;
}

@keyframes fmt-signup-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes fmt-signup-pop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.fmt-signup__box,
	.fmt-signup[open]::backdrop {
		animation: none;
	}
}

/* ---------------------------------------------------- Benefits (left) -- */

.fmt-signup__aside {
	background: var(--ink);
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 40px 36px;
}

.fmt-signup__eyebrow {
	color: rgba(255, 255, 255, .55);
	margin-bottom: 18px;
}

.fmt-signup__headline {
	font-size: 30px;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0 0 14px;
}

.fmt-signup__intro {
	color: rgba(255, 255, 255, .7);
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 28px;
}

.fmt-signup__benefits {
	display: flex;
	flex-direction: column;
	gap: 16px;
	list-style: none;
	margin: auto 0 0;
	padding: 0;
}

.fmt-signup__benefit {
	align-items: flex-start;
	display: flex;
	gap: 12px;
}

.fmt-signup__check {
	align-items: center;
	background: rgba(227, 0, 15, .18);
	border-radius: 50%;
	color: #fff;
	display: flex;
	flex-shrink: 0;
	height: 22px;
	justify-content: center;
	margin-top: 1px;
	width: 22px;
}

.fmt-signup__check .icon {
	vertical-align: 0;
}

.fmt-signup__benefit-title {
	display: block;
	font-size: 14px;
	font-weight: 500;
}

.fmt-signup__benefit-text {
	color: rgba(255, 255, 255, .6);
	display: block;
	font-size: 12.5px;
	line-height: 1.45;
}

/* -------------------------------------------------------- Form (right) -- */

.fmt-signup__main {
	padding: 40px 36px;
}

.fmt-signup__title {
	color: var(--ink);
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.3;
	margin: 0 0 4px;
}

.fmt-signup__sub {
	color: var(--ink-soft);
	font-size: 13px;
	margin: 0 0 22px;
}

.fmt-signup__submit {
	justify-content: center;
	margin-top: 6px;
}

.fmt-signup__note {
	color: var(--ink-mute);
	font-size: 11.5px;
	line-height: 1.5;
	margin: 2px 0 0;
}

.fmt-signup__lost {
	align-self: flex-end;
	color: var(--ink-soft);
	font-size: 12px;
	margin-top: -4px;
}

.fmt-signup__lost:hover {
	color: var(--red);
}

.fmt-signup__switch {
	color: var(--ink-soft);
	font-size: 13px;
	margin: 20px 0 0;
}

.fmt-signup__switch .link-arrow {
	margin-left: 4px;
}

/* ------------------------------------------------------------- Phone ---- */

/*
 * The design only draws the desktop box (its collapse class is never applied).
 * On a phone the two columns stack, and the benefit list gives way so that the
 * form starts on the first screen; headline and intro still say what it is for.
 */
@media (max-width: 720px) {
	.fmt-signup {
		padding: 12px;
	}

	.fmt-signup__box {
		grid-template-columns: 1fr;
	}

	.fmt-signup__close {
		color: #fff;
	}

	.fmt-signup__close:hover {
		background: rgba(255, 255, 255, .12);
	}

	.fmt-signup__aside {
		padding: 28px 24px 24px;
	}

	.fmt-signup__headline {
		font-size: 24px;
		padding-right: 36px;
	}

	.fmt-signup__intro {
		margin: 0;
	}

	.fmt-signup__benefits {
		display: none;
	}

	.fmt-signup__main {
		padding: 28px 24px;
	}
}
