/* ==========================================================================
   Blackcat Hub sign-in (everyone). Split screen: a black brand panel and a
   clean sign-in card on cream. On phones the brand becomes a band on top.
   ========================================================================== */

body.login {
	--red: #cc2615;
	--red-dark: #a81f11;
	--ink: #17171a;
	--muted: #75757d;
	--cream: #f4f1ec;
	--field: #e6e0d6;
	--brand-w: 44%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-left: var(--brand-w);
	background: var(--cream);
	color: var(--ink);
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}
body.login * { box-sizing: border-box; }

/* ---------------- Brand panel ---------------- */

.bhl-brand {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--brand-w);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 56px clamp(32px, 6vw, 88px);
	color: #fff;
	background:
		radial-gradient(70% 55% at 10% 110%, rgba(204, 38, 21, .55) 0%, rgba(204, 38, 21, 0) 60%),
		radial-gradient(55% 45% at 105% -5%, rgba(204, 38, 21, .28) 0%, rgba(204, 38, 21, 0) 60%),
		#0c0c0e;
	overflow: hidden;
}
.bhl-brand::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 22px 22px;
	pointer-events: none;
}
.bhl-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.bhl-logo { width: 116px; height: 116px; object-fit: contain; margin-bottom: 28px; filter: drop-shadow(0 12px 30px rgba(204, 38, 21, .35)); }
.bhl-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff7a6b; }
.bhl-name { margin: 0; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; }
.bhl-tag { margin: 18px 0 0; max-width: 380px; font-size: 17px; line-height: 1.55; color: #b9b9c0; }
.bhl-foot {
	position: absolute;
	z-index: 1;
	left: clamp(32px, 6vw, 88px);
	bottom: 36px;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #6e6e76;
}
.bhl-foot::before { content: ""; display: inline-block; width: 28px; height: 2px; margin-right: 12px; vertical-align: middle; background: var(--red); }

/* ---------------- Sign-in column ---------------- */

#login {
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: 48px 24px;
}
.login h1 { display: none; } /* the brand panel carries the logo */

.bhl-heading { margin: 0 0 22px; }
.bhl-title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.bhl-sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

.login form {
	margin: 0;
	padding: 28px 28px 24px;
	border: 0;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(23, 23, 26, .04), 0 20px 50px rgba(23, 23, 26, .08);
	overflow: visible;
}
.login label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.login form .input,
.login input[type=text],
.login input[type=email],
.login input[type=password] {
	height: 50px;
	margin: 4px 0 18px;
	padding: 0 16px;
	font-size: 16px;
	border: 1px solid var(--field);
	border-radius: 14px;
	background: #fff;
	box-shadow: none;
	color: var(--ink);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.login form .input:focus,
.login input[type=text]:focus,
.login input[type=password]:focus {
	border-color: var(--red);
	box-shadow: 0 0 0 4px rgba(204, 38, 21, .14);
	outline: none;
}

/* Show-password button inside the field */
.login .wp-pwd { position: relative; }
.login .wp-pwd input[type=password],
.login .wp-pwd input[type=text] { padding-right: 52px; }
.login .button.wp-hide-pw {
	top: 4px;
	right: 4px;
	height: 50px;
	width: 48px;
	min-height: 0;
	border: 0;
	background: transparent;
	color: var(--muted);
	box-shadow: none;
}
.login .button.wp-hide-pw:hover,
.login .button.wp-hide-pw:focus { color: var(--red); background: transparent; box-shadow: none; }
.login .button.wp-hide-pw .dashicons { top: 0; width: 20px; height: 20px; font-size: 20px; }

/* Remember me + button */
.login .forgetmenot { display: flex; align-items: center; float: none; margin: 0 0 18px; }
.login .forgetmenot label { margin: 0; font-weight: 500; color: var(--muted); }
.login input[type=checkbox] {
	width: 18px;
	height: 18px;
	margin: 0 8px 0 0;
	border: 1.5px solid #c9c2b6;
	border-radius: 6px;
	box-shadow: none;
}
.login input[type=checkbox]:checked { background: var(--red); border-color: var(--red); }
.login input[type=checkbox]:checked::before {
	margin: -1px 0 0 -1px;
	content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E");
}
.login input[type=checkbox]:focus { box-shadow: 0 0 0 3px rgba(204, 38, 21, .2); }

.login .submit { float: none; clear: both; }
.login .button-primary,
.wp-core-ui.login .button-primary {
	float: none;
	width: 100%;
	height: 50px;
	min-height: 50px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--red);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 50px;
	text-shadow: none;
	box-shadow: 0 10px 24px rgba(204, 38, 21, .3);
	transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.login .button-primary:hover,
.login .button-primary:focus { background: var(--red-dark); box-shadow: 0 12px 28px rgba(204, 38, 21, .38); }
.login .button-primary:active { transform: translateY(1px); }
.login .button-primary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Links under the card */
.login #nav,
.login #backtoblog { margin: 18px 0 0; padding: 0; text-align: center; font-size: 14px; }
.login #backtoblog { margin-top: 8px; }
.login #nav a,
.login #backtoblog a,
.login .privacy-policy-page-link a { color: var(--muted); text-decoration: none; font-weight: 600; }
.login #nav a:hover,
.login #backtoblog a:hover { color: var(--red); }
.login .privacy-policy-page-link { margin: 0 auto 24px; text-align: center; }
.login .language-switcher { display: none; }

/* Messages and errors */
.login .message,
.login .notice,
.login #login_error {
	margin: 0 0 18px;
	padding: 12px 16px;
	border: 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: inset 4px 0 0 #0e7490, 0 10px 30px rgba(23, 23, 26, .06);
	font-size: 14px;
}
.login #login_error,
.login .notice-error { box-shadow: inset 4px 0 0 var(--red), 0 10px 30px rgba(23, 23, 26, .06); }
.login .success,
.login .notice-success { box-shadow: inset 4px 0 0 #1a7f37, 0 10px 30px rgba(23, 23, 26, .06); }
.login #login_error a { color: var(--red-dark); }

/* Lost / reset password screens reuse the card */
.login #lostpasswordform p:first-child,
.login #resetpassform p.description { color: var(--muted); }
.login .pw-weak { display: flex; align-items: center; }
#pass-strength-result { border-radius: 10px; }

/* The small "session expired" sign-in popup inside wp-admin */
body.login.interim-login { padding-left: 0; display: block; }
body.login.interim-login #login { padding: 24px 16px; }

/* ---------------- Tablets & phones ---------------- */

@media (max-width: 900px) {
	body.login { --brand-w: 38%; }
	.bhl-tag { font-size: 15px; }
	.bhl-logo { width: 88px; height: 88px; }
}

@media (max-width: 700px) {
	body.login { padding-left: 0; display: block; }
	.bhl-brand {
		position: relative;
		width: auto;
		padding: 36px 24px 44px;
		border-radius: 0 0 28px 28px;
	}
	.bhl-brand-inner { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
	.bhl-logo { grid-row: 1 / span 2; width: 64px; height: 64px; margin: 0; }
	.bhl-kicker { font-size: 11px; margin: 0 0 2px; align-self: end; }
	.bhl-name { font-size: 32px; align-self: start; }
	.bhl-tag, .bhl-foot { display: none; }
	#login { padding: 28px 18px 32px; }
	.bhl-title { font-size: 26px; }
	.login form { padding: 22px 20px 20px; border-radius: 22px; }
}

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