/**
 * NeoYug branding for wp-login.php.
 *
 * A SEPARATE STYLESHEET ON PURPOSE. wp-login.php shares no markup with the
 * MasterStudy authorization block: different ids, different classes, its own
 * inline stylesheet and no theme. Widening auth.css to reach it would have
 * meant a selector list matching two unrelated documents, and every future
 * change would have to be made twice anyway.
 *
 * This screen matters more than it looks. It is where the set-a-password
 * link from the Google recovery flow lands, so a member who has been told
 * "we sent you a link" arrives here and needs to recognise where they are.
 *
 * The logo itself is set from PHP, because WordPress prints its own mark as
 * a background image and the URL is configurable.
 */

body.login {
	--ny-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	background: #faf9f6;
	color: #261a48;
}

/*
 * Named rather than inherited. There is no theme on this document, so
 * `inherit` here resolved to WordPress's own system stack and the screen
 * looked nothing like the rest of the flow. That matters more than it
 * sounds: this is where the set-a-password link from the Google recovery
 * flow lands, so it is the one screen a member reaches from an email.
 */
body.login,
body.login input,
body.login label,
body.login p,
body.login a,
body.login button,
body.login h1,
body.login .message,
body.login #login_error {
	font-family: var(--ny-font);
}

#login {
	width: 380px;
	padding: 56px 0 0;
}

#loginform,
#lostpasswordform,
#resetpasswordform,
#registerform {
	background: #fff;
	border: 1px solid #e3dbd4;
	border-radius: 16px;
	padding: 30px 28px;
	box-shadow: none;
}

.login label {
	font-size: 13px;
	font-weight: 500;
	color: #261a48;
}

.login input[type="text"],
.login input[type="email"],
.login input[type="password"] {
	/* 48px and 16px: under 16px iOS Safari zooms the page on focus, which is
	   what makes this screen jump on an iPhone. */
	height: 48px;
	padding: 0 14px;
	font-size: 16px;
	color: #261a48;
	background: #fff;
	/* 3.24:1 against white, so the border alone carries the field. */
	border: 1px solid #9c8c80;
	border-radius: 10px;
	box-shadow: none;
}

.login input[type="text"]:focus,
.login input[type="email"]:focus,
.login input[type="password"]:focus {
	border-color: #8d22c3;
	box-shadow: 0 0 0 3px rgba(141, 34, 195, 0.16);
	outline: none;
}

.login .button.wp-hide-pw {
	height: 48px;
	width: 46px;
	color: #7a6c72;
}

.login .button.wp-hide-pw:hover {
	color: #8d22c3;
}

.wp-core-ui .button-primary {
	height: 48px;
	padding: 0 20px;
	background: #8d22c3;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	text-shadow: none;
	box-shadow: none;
	transition: background 0.2s ease;
}

.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
	background: #261a48;
	box-shadow: none;
}

.login .message,
.login .success {
	border-left: 4px solid #8d22c3;
	border-radius: 0;
	background: #fff;
	color: #261a48;
}

.login #login_error {
	border-left: 4px solid #a32d2d;
	border-radius: 0;
	background: #fff;
}

.login #nav,
.login #backtoblog {
	padding: 12px 0 0;
	text-align: center;
}

.login #nav a,
.login #backtoblog a,
.login .privacy-policy-link {
	color: #6e6472;
	font-size: 13.5px;
}

.login #nav a:hover,
.login #backtoblog a:hover,
.login .privacy-policy-link:hover {
	color: #8d22c3;
}

.login form .forgetmenot label {
	font-size: 13px;
	color: #6e6472;
}

.login input[type="checkbox"]:checked::before {
	content: "";
}

.login input[type="checkbox"]:checked {
	background: #8d22c3;
	border-color: #8d22c3;
}

:focus-visible {
	outline: 2px solid #8d22c3;
	outline-offset: 2px;
}

@media (max-width: 460px) {
	#login {
		width: 100%;
		padding: 36px 16px 0;
	}

	#loginform,
	#lostpasswordform,
	#resetpasswordform,
	#registerform {
		padding: 24px 20px;
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.login * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------------
 * Google sign-in
 *
 * Printed through the login_message filter, so it sits above the form
 * rather than below the password field. WordPress wraps that filter's
 * output in nothing at all, which is why the block carries its own
 * spacing.
 *
 * WordPress also styles `.message` with a white card and a left border,
 * and our block is a sibling of it, not inside it, so nothing here has to
 * fight those rules.
 * ------------------------------------------------------------------- */

.nya-login-social {
	width: 100%;
	margin: 0 0 -8px;
	padding: 0;
}

.nya-login-google {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 48px;
	background: #fff;
	/* Same 3.24:1 border as the fields, so the two read as one system. */
	border: 1px solid #9c8c80;
	border-radius: 10px;
	color: #261a48;
	font-family: var(--ny-font);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.nya-login-google:hover,
.nya-login-google:focus {
	background: #fcfbf9;
	border-color: #261a48;
	color: #261a48;
}

.nya-login-google svg {
	flex: 0 0 auto;
}

.nya-login-or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0 10px;
}

.nya-login-or::before,
.nya-login-or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e3dbd4;
}

.nya-login-or span {
	font-family: var(--ny-font);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: #7a6c72;
}
