/**
 * Maz Electric login: dark industrial, fully branded — shell, form
 * interior, nav links — with electrical interaction details. Every
 * animation carries a prefers-reduced-motion suppression.
 */

body.login {
	background:
		radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 198, 39, 0.08), transparent 70%),
		#0d1117;
	position: relative;
}

body.login::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(139, 148, 158, 0.06) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(139, 148, 158, 0.06) 1px, transparent 1px);
	background-size: 48px 48px;
	pointer-events: none;
}

/* Circuit traces (injected by login.js) sit behind everything. */

.maz-login-traces {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

body.login #login {
	position: relative;
	z-index: 1;
}

/* ---------------------------------------------------------------- */
/* Lockup                                                            */
/* ---------------------------------------------------------------- */

body.login #login h1 a,
body.login #login .wp-login-logo a {
	background: none;
	width: auto;
	height: auto;
	text-indent: 0;
	display: inline-block;
	color: #ffc627; /* fallback text color if SVG fails */
	overflow: visible;
}

.maz-login-brand {
	height: 72px;
	width: auto;
	display: block;
	margin: 0 auto;
	overflow: visible;
}

.maz-login-brand__bulb {
	filter:
		brightness(1.08) saturate(1.06)
		drop-shadow(0 0 6px rgba(255, 198, 39, 0.7))
		drop-shadow(0 0 22px rgba(255, 198, 39, 0.42));
	transition: filter 0.25s ease;
	animation: maz-login-strike 1.4s ease-out 1.2s backwards;
}

@keyframes maz-login-strike {
	0% { filter: grayscale(1) brightness(0.38); }
	8% { filter: brightness(1.02) drop-shadow(0 0 4px rgba(255, 198, 39, 0.45)); }
	13% { filter: grayscale(1) brightness(0.38); }
	24% { filter: brightness(1.05) drop-shadow(0 0 5px rgba(255, 198, 39, 0.55)); }
	31% { filter: grayscale(0.85) brightness(0.5); }
	46%, 100% {
		filter:
			brightness(1.08) saturate(1.06)
			drop-shadow(0 0 6px rgba(255, 198, 39, 0.7))
			drop-shadow(0 0 22px rgba(255, 198, 39, 0.42));
	}
}

@media (hover: hover) and (pointer: fine) {
	body.login #login a:hover .maz-login-brand__bulb {
		filter:
			brightness(1.16) saturate(1.1)
			drop-shadow(0 0 10px rgba(255, 198, 39, 1))
			drop-shadow(0 0 34px rgba(255, 198, 39, 0.65));
	}
}

body.login #login a:focus-visible .maz-login-brand__bulb {
	filter:
		brightness(1.16) saturate(1.1)
		drop-shadow(0 0 10px rgba(255, 198, 39, 1))
		drop-shadow(0 0 34px rgba(255, 198, 39, 0.65));
}

/* ---------------------------------------------------------------- */
/* Form card + interior                                              */
/* ---------------------------------------------------------------- */

body.login form {
	position: relative;
	overflow: hidden;
	background: #161b22;
	border-radius: 12px;
	border: 1px solid #2d333b;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

body.login form::before {
	content: "";
	position: absolute;
	top: 0;
	left: 20px;
	right: 20px;
	height: 2px;
	background: linear-gradient(to right, #ffc627 0 48px, transparent 48px);
}

body.login form .forgetmenot label,
body.login form label {
	color: #8b949e;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body.login input[type="text"],
body.login input[type="password"] {
	background: #0d1117;
	border: 1px solid #2d333b;
	border-radius: 6px;
	color: #f7f6f2;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
	border-color: #ffc627;
	box-shadow: 0 0 0 2px rgba(255, 198, 39, 0.25);
	outline: none;
}

/* Energized field: a live indicator lights beside the label while
   the circuit is closed. */

body.login form p:focus-within > label::after,
body.login form .user-pass-wrap:focus-within > label::after {
	content: "\2022 live";
	color: #ffc627;
	margin-inline-start: 8px;
	letter-spacing: 0.14em;
	animation: maz-login-live 1.6s ease-in-out infinite;
}

@keyframes maz-login-live {
	50% { opacity: 0.45; }
}

body.login .wp-hide-pw {
	color: #8b949e;
}

body.login .wp-hide-pw:hover,
body.login .wp-hide-pw:focus {
	color: #ffc627;
}

body.login .wp-hide-pw:focus {
	box-shadow: 0 0 0 2px rgba(255, 198, 39, 0.4);
}

body.login input[type="checkbox"] {
	accent-color: #ffc627;
	background: #0d1117;
	border-color: #2d333b;
}

/* Submit: throw the breaker. */

body.login .wp-core-ui .button-primary {
	background: #ffc627;
	border-color: #ffc627;
	color: #0d1117;
	font-weight: 700;
	border-radius: 999px;
	padding-inline: 20px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
	body.login .wp-core-ui .button-primary:hover {
		transform: translateY(-1px);
		box-shadow: 0 8px 20px -8px rgba(255, 198, 39, 0.6);
	}
}

body.login .wp-core-ui .button-primary:focus {
	box-shadow: 0 0 0 2px #0d1117, 0 0 0 4px #ffc627;
}

/* Strike flash when the form submits (class added by login.js). */

body.login form.maz-energize {
	animation: maz-login-energize 0.45s ease-out;
}

@keyframes maz-login-energize {
	0% { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); }
	18% { box-shadow: 0 0 0 3px rgba(255, 198, 39, 0.8), 0 0 60px rgba(255, 198, 39, 0.35); }
	32% { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); }
	48% { box-shadow: 0 0 0 3px rgba(255, 198, 39, 0.55), 0 0 40px rgba(255, 198, 39, 0.25); }
	100% { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); }
}

/* Messages and errors, branded. */

body.login .notice,
body.login .message,
body.login #login_error {
	background: #161b22;
	border: 1px solid #2d333b;
	border-inline-start: 4px solid #ffc627;
	color: #f7f6f2;
	border-radius: 8px;
}

body.login .notice a,
body.login .message a,
body.login #login_error a {
	color: #ffc627;
}

/* ---------------------------------------------------------------- */
/* The links below the form — no more defaults                       */
/* ---------------------------------------------------------------- */

body.login #nav,
body.login #backtoblog {
	text-align: center;
}

body.login #nav a,
body.login #backtoblog a {
	color: #8b949e;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	padding-bottom: 3px;
	background-image: linear-gradient(to right, #ffc627, #ffc627);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: color 0.18s ease, background-size 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
	body.login #nav a:hover,
	body.login #backtoblog a:hover {
		color: #ffc627;
		background-size: 100% 1px;
	}
}

body.login #nav a:focus-visible,
body.login #backtoblog a:focus-visible {
	color: #ffc627;
	outline: 2px solid #ffc627;
	outline-offset: 3px;
	border-radius: 2px;
}

body.login .language-switcher {
	color: #8b949e;
}

body.login .language-switcher label {
	color: #8b949e;
}

body.login .language-switcher select {
	background: #161b22;
	border: 1px solid #2d333b;
	color: #f7f6f2;
	border-radius: 6px;
}

body.login .language-switcher .button {
	background: transparent;
	border: 1px solid #2d333b;
	color: #8b949e;
	border-radius: 999px;
}

/* Privacy policy link WP appends on some setups. */

body.login .privacy-policy-page-link a {
	color: #8b949e;
}

/* ---------------------------------------------------------------- */
/* Reduced motion: everything holds still                            */
/* ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.maz-login-brand__bulb,
	body.login form.maz-energize,
	body.login form p:focus-within > label::after,
	body.login form .user-pass-wrap:focus-within > label::after {
		animation: none;
	}

	.maz-login-brand__bulb,
	body.login input[type="text"],
	body.login input[type="password"],
	body.login .wp-core-ui .button-primary,
	body.login #nav a,
	body.login #backtoblog a {
		transition: none;
	}
}
