/*
 * Onboarding form, minimal styling that fits the dark ink theme.
 * Layered with the rest of the design via specificity, no !important.
 */

.topan-onb-page {
	max-width: 36rem;
	margin: 0 auto;
	padding: clamp(2rem, 6vw, 4rem) 1.25rem 5rem;
}

.topan-onb-page__head {
	margin-bottom: 2rem;
}

.topan-onb-page__title {
	font-family: var(--wp--preset--font-family--headings, inherit);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.1;
	margin: 0 0 0.5rem;
	letter-spacing: -0.01em;
}

.topan-onb-page__lede {
	margin: 0;
	color: color-mix(in srgb, currentColor 70%, transparent);
	max-width: 32rem;
}

.topan-onb {
	display: grid;
	gap: 1.25rem;
	padding: 1.75rem;
	border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	border-radius: 12px;
	background: color-mix(in srgb, currentColor 3%, transparent);
}

.topan-onb__row {
	display: grid;
	gap: 0.4rem;
}

.topan-onb__row label {
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.topan-onb__row input[type="text"],
.topan-onb__row input[type="email"],
.topan-onb__row input[type="password"] {
	font: inherit;
	width: 100%;
	padding: 0.75rem 0.85rem;
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 8px;
	background: transparent;
	color: inherit;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.topan-onb__row input:focus {
	outline: none;
	border-color: currentColor;
	box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}

.topan-onb__row--check label {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.875rem;
	line-height: 1.45;
	font-weight: 400;
}

.topan-onb__row--check input {
	margin-top: 0.2rem;
}

.topan-onb__hint {
	font-size: 0.78rem;
	color: color-mix(in srgb, currentColor 55%, transparent);
}

/* Honeypot, hidden from humans, present in DOM. */
.topan-onb__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.topan-onb__submit {
	font: inherit;
	font-weight: 500;
	padding: 0.85rem 1.25rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: currentColor;
	color: var(--wp--preset--color--background, #fff);
	cursor: pointer;
	transition: opacity 120ms ease, transform 120ms ease;
}

.topan-onb__submit:hover {
	opacity: 0.9;
}

.topan-onb__submit:active {
	transform: translateY(1px);
}

.topan-onb__msg {
	padding: 1rem 1.1rem;
	border-radius: 8px;
	margin-bottom: 1.25rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

.topan-onb__msg--success {
	background: color-mix(in srgb, #859900 14%, transparent);
	border: 1px solid color-mix(in srgb, #859900 40%, transparent);
}

.topan-onb__msg--error {
	background: color-mix(in srgb, #cb4b16 12%, transparent);
	border: 1px solid color-mix(in srgb, #cb4b16 40%, transparent);
}

.topan-onb__msg--info {
	background: color-mix(in srgb, #268bd2 10%, transparent);
	border: 1px solid color-mix(in srgb, #268bd2 40%, transparent);
}

/* Inline form-validation hints. */
.topan-onb__row.has-error input {
	border-color: #cb4b16;
	box-shadow: 0 0 0 3px color-mix(in srgb, #cb4b16 18%, transparent);
}

@media (prefers-reduced-motion: reduce) {
	.topan-onb__row input,
	.topan-onb__submit {
		transition: none;
	}
}
