/**
 * Escuela Micaélica: pantallas de acceso de WordPress (wp-login.php).
 *
 * Las carga inc/inicio-de-sesion.php solo en wp-login.php, con las variables de theme.json
 * impresas antes, así los colores, fuentes, radios y sombras son los mismos tokens del sitio.
 * Todo va acotado a body.login: no hay reglas globales.
 */

body.login {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	background: var(--wp--preset--gradient--vela), var(--wp--preset--color--night);
	color: var(--wp--preset--color--bone);
	font-family: var(--wp--preset--font-family--serif);
}

body.login #login {
	box-sizing: border-box;
	width: min(390px, 100% - 32px);
	padding: 40px 0;
}

/* Logo del sitio en lugar del de WordPress. */
body.login h1 a {
	width: 240px;
	height: 80px;
	margin: 0 auto 28px;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

/* Tarjetas de los formularios: cuero con filete de oro. */
body.login form {
	margin-top: 0;
	padding: 28px;
	border: 1px solid var(--wp--custom--alpha--gold--25);
	border-radius: var(--wp--custom--radius--card-sm);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--filete-oro), var(--wp--preset--shadow--tarjeta);
}

body.login label {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
	color: var(--wp--custom--alpha--bone--62);
}

body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
	margin: 8px 0 18px;
	padding: 10px 12px;
	border: 1px solid var(--wp--custom--alpha--bone--12);
	border-radius: var(--wp--custom--radius--input);
	background: var(--wp--preset--color--field);
	box-shadow: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--md);
	color: var(--wp--preset--color--bone);
}

body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
	border-color: var(--wp--preset--color--gold);
	box-shadow: 0 0 0 1px var(--wp--preset--color--gold);
	outline: none;
}

/* Botón "mostrar contraseña". */
body.login .button.wp-hide-pw {
	margin-top: 8px;
	color: var(--wp--preset--color--gold);
}

body.login .button.wp-hide-pw:focus {
	border-color: var(--wp--preset--color--gold);
	box-shadow: none;
}

body.login .forgetmenot {
	float: none;
	margin-bottom: 18px;
}

body.login .forgetmenot label {
	letter-spacing: 0;
	text-transform: none;
	font-size: var(--wp--preset--font-size--sm);
}

body.login input[type="checkbox"] {
	border-color: var(--wp--custom--alpha--bone--40);
	background: var(--wp--preset--color--field);
	accent-color: var(--wp--preset--color--gold);
}

body.login input[type="checkbox"]:checked::before {
	filter: sepia(1) saturate(3) hue-rotate(5deg);
}

/* Botón principal: píldora en oro, a lo ancho. */
body.login .submit {
	clear: both;
}

body.login .button-primary,
body.login .button.button-large {
	float: none;
	width: 100%;
	min-height: 46px;
	padding: 6px 20px;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--gold);
	box-shadow: none;
	text-shadow: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 500;
	color: var(--wp--preset--color--night);
}

body.login .button-primary:hover,
body.login .button-primary:focus {
	background: var(--wp--preset--color--bone);
	color: var(--wp--preset--color--night);
	box-shadow: none;
}

body.login .button-secondary {
	border-color: var(--wp--custom--alpha--gold--45);
	border-radius: var(--wp--custom--radius--pill);
	background: transparent;
	color: var(--wp--preset--color--bone);
}

/* Avisos y errores. */
body.login .message,
body.login .notice,
body.login #login_error {
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 0;
	border-left: 3px solid var(--wp--preset--color--gold);
	border-radius: var(--wp--custom--radius--input);
	background: var(--wp--preset--color--paper);
	box-shadow: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--bone);
}

body.login #login_error,
body.login .notice-error {
	border-left-color: var(--wp--preset--color--ember);
}

body.login .message a,
body.login .notice a,
body.login #login_error a {
	color: var(--wp--preset--color--gold);
}

/* Medidor de fortaleza de la contraseña (restablecer). */
body.login #pass-strength-result {
	border-radius: var(--wp--custom--radius--input);
	font-family: var(--wp--preset--font-family--sans);
	color: var(--wp--preset--color--night);
}

body.login .description,
body.login .indicator-hint {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--custom--alpha--bone--62);
}

/* Enlaces al pie: registro, recuperar contraseña y volver al sitio. */
body.login #nav,
body.login #backtoblog,
body.login .privacy-policy-page-link {
	margin: 20px 0 0;
	padding: 0;
	text-align: center;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--sm);
}

body.login #backtoblog {
	margin-top: 10px;
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
	color: var(--wp--custom--alpha--bone--62);
	text-decoration: underline;
	text-underline-offset: 4px;
}

body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover {
	color: var(--wp--preset--color--gold);
}

body.login a:focus {
	box-shadow: 0 0 0 1px var(--wp--preset--color--gold);
	color: var(--wp--preset--color--gold);
}
