/*
 * Anarchapulco TV sign-in page (wp-login.php).
 * Palette and type match the Subscribe page (anarchapulco-vms/assets/css/pricing.css):
 * dusk hero art, deep purple panels, Merriweather headings, yellow primary action.
 * Loaded after WordPress's own `login` stylesheet, so plain selectors win where
 * specificity is equal; a few core rules are more specific and are matched here.
 */

body.login {
	--l-purple:  #231941;
	--l-panel:   rgba(26, 19, 48, .78);
	--l-fuchsia: #B14B83;
	--l-teal:    #3BA1A5;
	--l-yellow:  #FEE170;
	--l-ink:     #f3f1f7;
	--l-muted:   #a89fbd;
	--l-hair:    rgba(255, 255, 255, .12);
	--l-field:   rgba(255, 255, 255, .06);

	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0;
	color: var(--l-ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background-color: #0b0d10;
	background-image:
		radial-gradient(ellipse 520px 420px at 50% 50%, rgba(23, 16, 42, .45), rgba(23, 16, 42, 0) 70%),
		linear-gradient(180deg, rgba(11, 13, 16, .05) 0%, rgba(23, 16, 42, .18) 50%, rgba(11, 13, 16, .75) 100%),
		var(--avms-login-bg, none);
	background-size: cover;
	background-position: center 60%;
	background-repeat: no-repeat;
	background-attachment: fixed;
}
/* iOS ignores fixed backgrounds and repaints badly; scroll is fine there. */
@supports (-webkit-touch-callout: none) {
	body.login { background-attachment: scroll; }
}

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

/* ------------------------------------------------------------------- card */

#login {
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: 40px 36px 26px;
	background: var(--l-panel);
	border: 1px solid var(--l-hair);
	border-radius: 16px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
}

/* ------------------------------------------------------------------- logo */

body.login h1.wp-login-logo { margin: 0 0 22px; }
body.login h1.wp-login-logo a {
	width: 100%;
	height: 64px;
	margin: 0;
	background-image: var(--avms-login-logo, none);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	/* The logo is dark artwork for a light header; knock it out to white, same as the site bar. */
	filter: brightness(0) invert(1);
	outline: none;
}
body.login h1.wp-login-logo a:focus-visible { box-shadow: 0 0 0 2px var(--l-yellow); border-radius: 4px; filter: none; }

/* ---------------------------------------------------------------- heading */

.avms-login__head { text-align: center; margin: 0 0 24px; }
.avms-login__head h2 {
	margin: 0;
	font-family: Merriweather, Georgia, serif;
	font-weight: 900;
	font-size: 1.7rem;
	line-height: 1.2;
	color: var(--l-ink);
}
.avms-login__head p { margin: 8px 0 0; color: var(--l-muted); font-size: .95rem; }

/* ------------------------------------------------------- notices / errors */

body.login .message,
body.login .notice,
body.login #login_error {
	margin: 0 0 18px;
	padding: 12px 14px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--l-hair);
	border-left: 4px solid var(--l-teal);
	border-radius: 8px;
	box-shadow: none;
	color: var(--l-ink);
	font-size: .88rem;
	line-height: 1.5;
}
body.login #login_error,
body.login .notice-error { border-left-color: var(--l-fuchsia); }
body.login .message p, body.login .notice p, body.login #login_error p { margin: 0; }
body.login .message a, body.login .notice a, body.login #login_error a { color: var(--l-yellow); }

/* ------------------------------------------------------------------- form */

body.login form {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	overflow: visible;
}

body.login label {
	display: block;
	margin-bottom: 6px;
	color: var(--l-muted);
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .02em;
}

body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
	width: 100%;
	min-height: 48px;
	margin: 0 0 18px;
	padding: 10px 14px;
	font-size: 1rem;
	font-family: inherit;
	color: var(--l-ink);
	background: var(--l-field);
	border: 1px solid var(--l-hair);
	border-radius: 10px;
	box-shadow: none;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
	outline: none;
	background: rgba(255, 255, 255, .1);
	border-color: rgba(254, 225, 112, .6);
	box-shadow: 0 0 0 3px rgba(254, 225, 112, .18);
}
/* Chrome's autofill paints fields pale yellow-white; keep them dark. */
body.login input:-webkit-autofill,
body.login input:-webkit-autofill:hover,
body.login input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--l-ink);
	-webkit-box-shadow: 0 0 0 1000px #2a2340 inset;
	caret-color: var(--l-ink);
	transition: background-color 9999s;
}

/* Show/hide password eye sits inside the field. */
body.login .wp-pwd { position: relative; }
body.login .wp-pwd input[type="password"],
body.login .wp-pwd input[type="text"] { padding-right: 48px; }
body.login .button.wp-hide-pw {
	top: 0;
	right: 2px;
	height: 48px;
	min-width: 44px;
	color: var(--l-muted);
	background: none;
	border: 0;
	box-shadow: none;
}
body.login .button.wp-hide-pw:hover,
body.login .button.wp-hide-pw:focus { color: var(--l-yellow); background: none; box-shadow: none; }
body.login .button.wp-hide-pw .dashicons { width: 20px; height: 20px; top: 0; }

/* Password strength meter (reset screen). */
body.login #pass-strength-result {
	margin: -8px 0 16px;
	border-radius: 8px;
	border: 0;
	background: rgba(255, 255, 255, .08);
	color: var(--l-ink);
	opacity: 1;
}
body.login #pass-strength-result.short { background: rgba(177, 75, 131, .45); }
body.login #pass-strength-result.bad   { background: rgba(249, 151, 95, .45); }
body.login #pass-strength-result.good  { background: rgba(254, 225, 112, .35); }
body.login #pass-strength-result.strong{ background: rgba(59, 161, 165, .5); }
body.login .pw-weak { color: var(--l-muted); }
body.login .description, body.login .indicator-hint { color: var(--l-muted); font-size: .82rem; }

/* Remember me + submit: stack, with the button full width. */
body.login .forgetmenot {
	float: none;
	display: flex;
	align-items: center;
	margin: 0 0 20px;
}
body.login .forgetmenot label { margin: 0; color: var(--l-muted); font-weight: 500; font-size: .88rem; letter-spacing: 0; }
body.login input[type="checkbox"] {
	width: 18px; height: 18px; min-width: 18px;
	margin: 0 10px 0 0;
	background: var(--l-field);
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 4px;
	box-shadow: none;
}
body.login input[type="checkbox"]:checked { background: var(--l-yellow); border-color: var(--l-yellow); }
body.login input[type="checkbox"]:checked::before {
	/* core draws a blue tick SVG; recolour it dark on yellow */
	filter: brightness(0);
	margin: -2px 0 0 -3px;
}
body.login input[type="checkbox"]:focus { box-shadow: 0 0 0 3px rgba(254, 225, 112, .25); outline: none; }

body.login .submit { float: none; margin: 0; padding: 0; clear: both; }
body.login .button-primary,
body.login .submit .button,
body.login #wp-submit {
	float: none;
	display: block;
	width: 100%;
	min-height: 50px;
	padding: 0 20px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 800;
	line-height: 50px;
	letter-spacing: .01em;
	text-shadow: none;
	color: #1a1330;
	background: var(--l-yellow);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(254, 225, 112, .18);
	cursor: pointer;
	transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
body.login .button-primary:hover,
body.login #wp-submit:hover { background: #ffe98f; color: #1a1330; }
body.login .button-primary:focus,
body.login #wp-submit:focus { outline: none; box-shadow: 0 0 0 3px rgba(254, 225, 112, .35); color: #1a1330; }
body.login .button-primary:active,
body.login #wp-submit:active { transform: translateY(1px); }

/* Secondary buttons on the reset screen ("Generate password"). */
body.login .button:not(.button-primary):not(.wp-hide-pw) {
	color: var(--l-ink);
	background: rgba(255, 255, 255, .1);
	border: 1px solid var(--l-hair);
	border-radius: 999px;
	box-shadow: none;
}
body.login .reset-pass-submit { display: flex; flex-direction: column-reverse; gap: 10px; }
body.login .reset-pass-submit .button { float: none; width: 100%; }

/* ------------------------------------------------------------ link footer */

body.login #nav,
body.login #backtoblog,
.avms-login__join {
	margin: 18px 0 0;
	padding: 0;
	text-align: center;
	font-size: .88rem;
	color: var(--l-muted);
}
body.login #nav a,
body.login #backtoblog a {
	color: var(--l-muted);
	text-decoration: none;
	transition: color .15s ease;
}
body.login #nav a:hover,
body.login #backtoblog a:hover { color: var(--l-ink); text-decoration: underline; }

.avms-login__join {
	padding-top: 18px;
	border-top: 1px solid var(--l-hair);
}
.avms-login__join a {
	color: var(--l-yellow);
	font-weight: 700;
	text-decoration: none;
	margin-left: 4px;
}
.avms-login__join a:hover { text-decoration: underline; }

body.login #backtoblog { margin-top: 14px; font-size: .82rem; }

body.login .privacy-policy-page-link { margin: 14px 0 0; text-align: center; }
body.login .privacy-policy-page-link a { color: var(--l-muted); font-size: .8rem; }

/* Interim (session-expired) login inside wp-admin's modal: no card art. */
body.login.interim-login { background: var(--l-purple); }
body.login.interim-login #login { box-shadow: none; border: 0; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 520px) {
	body.login { justify-content: flex-start; padding: 6vh 16px 32px; }
	#login { padding: 30px 22px 22px; border-radius: 14px; }
	.avms-login__head h2 { font-size: 1.45rem; }
}

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