/**
 * wp-login.php in the Praxis Yigit design.
 *
 * Loaded after the core "login" stylesheet, so every rule here is an override
 * of a shipped one. The tokens repeat the values of main.css: the login screen
 * has to look like the website without loading the full front-end bundle.
 */

body.login {
	--color-ink: #10253b;
	--color-ink-soft: #31475d;
	--color-muted: #607286;
	--color-brand: #08776f;
	--color-brand-dark: #055f59;
	--color-brand-light: #dff5f1;
	--color-navy: #0c2137;
	--color-line: #dce6eb;

	/* Recolours the focus rings and links core draws from its own palette. */
	--wp-admin-theme-color: #08776f;
	--wp-admin-theme-color-darker-10: #066a63;
	--wp-admin-theme-color-darker-20: #055f59;

	min-height: 100vh;
	margin: 0;
	padding: 40px 20px;
	display: flex;
	background:
		radial-gradient(circle at 100% 0, rgba(28, 177, 163, 0.22), transparent 42%),
		radial-gradient(circle at 0 100%, rgba(28, 177, 163, 0.12), transparent 46%),
		linear-gradient(145deg, #0c2137 0%, #102d45 100%);
	color: #ffffff;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* Auto margins centre the card and still let a form that is taller than the
   viewport scroll: centring through align-items would cut off its top. */
body.login #login {
	box-sizing: border-box;
	width: 100%;
	max-width: 420px;
	min-width: 0;
	padding: 0;
	margin: auto;
}

body.login #login,
body.login #login * {
	box-sizing: border-box;
}

/* Logo */
.login h1 {
	text-align: center;
}

.login h1 a,
.login .wp-login-logo a {
	display: block;
	width: 104px;
	height: 104px;
	margin: 0 auto 22px;
	border-radius: 28px;
	background-color: #ffffff;
	background-image: var(--yigit-login-logo, none);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 68px auto;
	box-shadow: 0 22px 48px rgba(4, 16, 28, 0.38);
	text-indent: -9999px;
	overflow: hidden;
}

/* Without a logo the site name replaces the image instead of an empty box. */
.login.yigit-login-no-logo h1 a,
.login.yigit-login-no-logo .wp-login-logo a {
	display: flex;
	width: auto;
	max-width: 320px;
	height: auto;
	min-height: 0;
	padding: 18px 24px;
	align-items: center;
	justify-content: center;
	color: var(--color-ink);
	font-size: 1.1rem;
	font-weight: 750;
	line-height: 1.25;
	text-align: center;
	text-indent: 0;
}

/* Intro above the form */
.yigit-login-intro {
	margin: 0 0 20px;
	text-align: center;
}

.yigit-login-intro__eyebrow {
	margin: 0 0 6px;
	color: #7ce2d9;
	font-size: 0.74rem;
	font-weight: 750;
	letter-spacing: 0.13em;
	line-height: 1.4;
	text-transform: uppercase;
}

.yigit-login-intro__title {
	margin: 0;
	color: #ffffff;
	font-size: 1.45rem;
	font-weight: 750;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

/* Card */
.login form {
	margin: 0;
	padding: 28px 26px 26px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 30px 70px rgba(4, 16, 28, 0.34);
	color: var(--color-ink-soft);
	overflow: visible;
}

.login label {
	margin-bottom: 7px;
	color: var(--color-ink);
	font-size: 0.86rem;
	font-weight: 700;
}

.login form .input,
.login input[type="text"],
.login input[type="email"],
.login input[type="password"] {
	width: 100%;
	min-height: 50px;
	margin: 0 0 18px;
	padding: 12px 16px;
	border: 1px solid var(--color-line);
	border-radius: 14px;
	background: #f9fcfd;
	box-shadow: none;
	color: var(--color-ink);
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="email"]:focus,
.login input[type="password"]:focus {
	border-color: var(--color-brand);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(8, 119, 111, 0.14);
	outline: 2px solid transparent;
}

.login .wp-pwd {
	position: relative;
}

.login .button.wp-hide-pw {
	top: 5px;
	right: 6px;
	border-radius: 10px;
	color: var(--color-muted);
}

.login .button.wp-hide-pw:focus {
	border-color: var(--color-brand);
	box-shadow: 0 0 0 1px var(--color-brand);
}

.login form .forgetmenot {
	float: none;
	display: block;
	margin: 0 0 18px;
}

.login .forgetmenot label {
	color: var(--color-muted);
	font-size: 0.88rem;
	font-weight: 500;
}

.login .forgetmenot input[type="checkbox"] {
	margin-right: 6px;
	border-radius: 5px;
}

#loginform p.submit,
.login-action-lostpassword p.submit,
.login form p.submit {
	margin: 0;
	padding: 0;
	border: none;
}

.login .button-primary,
.login .button.button-large {
	float: none;
	display: inline-flex;
	width: 100%;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	padding: 13px 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--color-brand);
	/* No glow: the card is not clipped, so a soft shadow would bleed onto the
	   dark background below it. */
	box-shadow: none;
	color: #ffffff;
	font-size: 0.98rem;
	font-weight: 720;
	line-height: 1.25;
	text-shadow: none;
	transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.login .button-primary:hover,
.login .button.button-large:hover {
	background: var(--color-brand-dark);
	box-shadow: none;
	transform: translateY(-2px);
}

.login .button-primary:active,
.login .button.button-large:active {
	transform: none;
}

.login .reset-pass-submit {
	gap: 10px;
}

.login .reset-pass-submit .button {
	margin-bottom: 0;
}

/* Notices */
.login .message,
.login .notice,
.login .success,
.login #login_error {
	margin: 0 0 18px;
	padding: 13px 16px;
	border: 1px solid var(--color-line);
	border-left-width: 4px;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 14px 32px rgba(4, 16, 28, 0.2);
	color: var(--color-ink-soft);
	font-size: 0.92rem;
}

.login .message,
.login .success {
	border-left-color: var(--color-brand);
}

.login .notice-error,
.login #login_error {
	border-left-color: #c0392b;
}

/* Footer links */
.login #nav,
.login #backtoblog {
	padding: 0;
	text-align: center;
	font-size: 0.88rem;
}

.login #nav {
	margin: 20px 0 0;
}

.login #backtoblog {
	margin: 10px 0 0;
}

.login #nav a,
.login #backtoblog a,
.login .privacy-policy-page-link a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	transition: color 160ms ease;
}

.login #nav a:hover,
.login #backtoblog a:hover,
.login .privacy-policy-page-link a:hover,
.login h1 a:hover {
	color: #7ce2d9;
}

.login .privacy-policy-page-link {
	margin: 26px 0 0;
	font-size: 0.82rem;
}

.login :focus-visible {
	outline: 3px solid #45cfc1;
	outline-offset: 3px;
}

/* The interim login modal is rendered inside wp-admin, not on the branded page. */
body.login.interim-login {
	min-height: 0;
	padding: 0;
	background: #ffffff;
}

body.login.interim-login #login {
	width: auto;
}

@media (max-width: 480px) {
	body.login {
		padding: 28px 16px;
	}

	.login form {
		padding: 24px 20px;
		border-radius: 20px;
	}

	.login h1 a,
	.login .wp-login-logo a {
		width: 88px;
		height: 88px;
		background-size: 58px auto;
	}
}
