/* ============================================================
   Flow Life Global — Luminous Threshold
   Custom authentication styling for wp-login.php
   Works with the stock WordPress login markup (WP 6.x / 7.x).
   Companion file: flow-life-login.php (mu-plugin)
   ============================================================ */

/* ---------- 1. Canvas ------------------------------------- */

body.login {
	min-height: 100vh;
	margin: 0;
	padding: 0;
	background: #0b0e17;
	color: #c3c9da;
	font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* WordPress's own logo heading — our mark lives in the environment instead.
   (`:not(.fl-title)` keeps our injected heading visible.) */
body.login h1:not(.fl-title),
body.login .login-header h1:not(.fl-title) {
	display: none;
}

/* ---------- 2. The environment (left field) ---------------- */
/* Markup injected by flow-life-login.php on the `login_header` hook. */

/* If an older copy of the plugin is still injecting its own environment,
   only the current one renders. */
.fl-env:not(.fl-env--current) { display: none !important; }

.fl-env {
	position: fixed;
	inset: 0 50% 0 0;
	overflow: hidden;
	background:
		radial-gradient(circle at 50% 52%, rgba(0, 0, 0, 0) 379px, rgba(255, 255, 255, .055) 380px, rgba(0, 0, 0, 0) 381px),
		radial-gradient(circle at 50% 52%, rgba(0, 0, 0, 0) 549px, rgba(255, 255, 255, .04) 550px, rgba(0, 0, 0, 0) 551px),
		radial-gradient(120% 95% at 22% 18%, #1c1838 0%, #0e1122 48%, #070911 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 34px;
	z-index: 0;
}

/* Two very slow luminous drifts — violet and copper. */
.fl-glow {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	will-change: transform;
}

.fl-glow--violet {
	left: -200px;
	top: -180px;
	width: 820px;
	height: 820px;
	background: radial-gradient(circle, rgba(126, 98, 216, .40), rgba(126, 98, 216, 0) 62%);
	filter: blur(30px);
	animation: fl-drift-a 30s ease-in-out infinite alternate;
}

.fl-glow--copper {
	right: -160px;
	bottom: -200px;
	width: 700px;
	height: 600px;
	background: radial-gradient(circle, rgba(201, 138, 82, .30), rgba(201, 138, 82, 0) 64%);
	filter: blur(36px);
	animation: fl-drift-b 38s ease-in-out infinite alternate;
}

@keyframes fl-drift-a {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(60px, 40px, 0) scale(1.08); }
}

@keyframes fl-drift-b {
	from { transform: translate3d(0, 0, 0) scale(1.05); }
	to   { transform: translate3d(-50px, -30px, 0) scale(1); }
}

/* The mark.
   The link is the flex item, so it — not the image — carries the width and
   the centring. `content:` replaces whatever <img> the page emitted. */
.fl-mark-link {
	position: relative;
	display: block;
	width: 380px;
	max-width: 46%;
	margin: 0 auto;
	line-height: 0;
}

.fl-mark {
	display: block;
	content: url("https://staging.flowlife.cc/wp-content/uploads/2026/04/LogoV2.png");
	width: 100% !important;
	height: auto !important;
	max-width: 100%;
	filter: drop-shadow(0 0 72px rgba(140, 110, 230, .45));
}

.fl-tagline {
	position: relative;
	max-width: 420px;
	margin: 0;
	text-align: center;
	font-family: "Instrument Serif", Georgia, serif;
	font-size: 27px;
	font-weight: 400;
	line-height: 1.45;
	color: #dcd8ea;
}

.fl-place {
	position: absolute;
	left: 56px;
	bottom: 44px;
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .2em;
	color: rgba(232, 232, 245, .45);
}

/* ---------- 3. The authentication panel (right) ------------ */

body.login #login {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: 50%;
	min-width: 480px;
	max-width: 100%;
	min-height: 100vh;
	margin: 0 0 0 auto;
	padding: 96px 56px 104px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: #0b0e17;
	border-left: 1px solid rgba(255, 255, 255, .07);
	text-align: left;
}

/* The panel is half the screen; the content column inside it is not. */
body.login #login > * {
	width: 100%;
	max-width: 412px;
}

body.login .fl-eyebrow,
body.login .fl-title,
body.login .fl-sub {
	text-align: left;
}

/* Heading block, injected via the `login_message` filter. */
.fl-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .22em;
	color: #9b93b8;
}

.fl-eyebrow::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9b83ef;
}

.fl-title {
	margin: 0 0 10px;
	font-family: "Instrument Serif", Georgia, serif;
	font-size: 50px;
	font-weight: 400;
	line-height: 1.08;
	color: #f4f2ef;
}

.fl-sub {
	margin: 0 0 38px;
	font-size: 16.5px;
	font-weight: 300;
	line-height: 1.6;
	color: #9aa2b8;
}

/* ---------- 4. The form ------------------------------------ */

body.login form {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	gap: 20px;
	overflow: visible;
}

/* The sign-in form itself uses a two-column grid so "Remember me" and the
   recovery link can share a row; other auth steps stay a simple column. */
body.login #loginform {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 20px 16px;
	align-items: center;
}

body.login #loginform > * { grid-column: 1 / -1; }

body.login form p,
body.login form .user-pass-wrap {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

body.login form label,
body.login .user-pass-wrap label {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: #c3c9da;
}

body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
	box-sizing: border-box;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid rgba(190, 205, 235, .18);
	border-radius: 10px;
	background: rgba(255, 255, 255, .045);
	color: #f0f1f5;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}

body.login input::placeholder { color: #737d94; }

body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus,
body.login input[type="checkbox"]:focus-visible,
body.login a:focus-visible,
body.login button:focus-visible,
body.login .button:focus-visible {
	outline: none;
	border-color: #9b83ef;
	box-shadow: 0 0 0 3px rgba(155, 131, 239, .3);
}

/* Links and buttons need a visible ring of their own. */
body.login a:focus-visible,
body.login button:focus-visible,
body.login .button:focus-visible {
	border-radius: 6px;
	box-shadow: 0 0 0 3px rgba(155, 131, 239, .45);
}

/* Autofill: keep the dark field instead of the browser's yellow. */
body.login input:-webkit-autofill,
body.login input:-webkit-autofill:hover,
body.login input:-webkit-autofill:focus {
	-webkit-text-fill-color: #f0f1f5;
	caret-color: #f0f1f5;
	-webkit-box-shadow: 0 0 0 1000px #151a28 inset;
	box-shadow: 0 0 0 1000px #151a28 inset;
	transition: background-color 9999s ease-in-out 0s;
}

/* Password field + WordPress's own show/hide button. */
body.login .wp-pwd {
	position: relative;
	display: flex;
}

body.login .wp-pwd input[type="text"],
body.login .wp-pwd input[type="password"] {
	flex: 1;
	padding-right: 84px;
}

body.login .wp-pwd .button.wp-hide-pw {
	position: absolute;
	top: 8px;
	right: 8px;
	width: auto;
	height: 36px;
	min-height: 36px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(190, 205, 235, .16);
	border-radius: 8px;
	background: rgba(255, 255, 255, .05);
	color: #c3c9da;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease;
}

body.login .wp-pwd .button.wp-hide-pw:hover {
	background: rgba(255, 255, 255, .1);
	color: #f0f1f5;
	border-color: rgba(190, 205, 235, .28);
}

body.login .wp-pwd .button.wp-hide-pw .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
	color: inherit;
}

/* "Remember me" keeps its own row; recovery sits centred under the button,
   the same relationship at every breakpoint. */
body.login #loginform > p,
body.login #loginform > div { order: 1; }

body.login .forgetmenot {
	order: 2;
	grid-column: 1 / -1;
	justify-self: start;
}

body.login form p.submit {
	order: 3;
	grid-column: 1 / -1;
}

body.login .fl-forgot {
	order: 4;
	grid-column: 1 / -1;
	justify-self: center;
	margin: 0;
	padding: 2px 0;
	border-bottom: 0;
}

body.login .forgetmenot {
	flex-direction: row;
	align-items: center;
	gap: 9px;
	font-size: 15px;
	color: #b3bacd;
}

body.login .forgetmenot label {
	font-size: 15px;
	font-weight: 400;
	color: #b3bacd;
	cursor: pointer;
	line-height: 1.3;
}

body.login input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid rgba(190, 205, 235, .3);
	border-radius: 4px;
	background: rgba(255, 255, 255, .06);
	accent-color: #8b6ce4;
	cursor: pointer;
	box-shadow: none;
}

body.login input[type="checkbox"]:checked::before { content: none; }

/* Injected by flow-life-login.php on the `login_form` hook. */
.fl-forgot {
	font-size: 15px;
	line-height: 1.3;
	color: #b79ef5;
	text-decoration: none;
	border-bottom: 0;
}

.fl-forgot:hover { color: #d6c6ff; text-decoration: underline; }

.fl-forgot:focus { color: #d6c6ff; }

/* Primary action — copper, so the panel never reads as "all purple". */
body.login .submit,
body.login form p.submit {
	margin-top: 8px;
}

body.login #wp-submit,
body.login .button-primary {
	box-sizing: border-box;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 0 20px;
	border: none;
	border-radius: 10px;
	background: linear-gradient(100deg, #d5a067, #c2854e);
	color: #14100b;
	font-family: inherit;
	font-size: 16.5px;
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1;
	text-shadow: none;
	cursor: pointer;
	box-shadow: 0 10px 30px -14px rgba(213, 160, 103, .85);
	transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

body.login #wp-submit:hover,
body.login .button-primary:hover {
	background: linear-gradient(100deg, #e0ac73, #cc8f56);
	transform: translateY(-1px);
	box-shadow: 0 16px 36px -14px rgba(213, 160, 103, .95);
}

body.login #wp-submit:active { transform: translateY(0); }

/* Secondary buttons (e.g. "Get New Password" variants, generate password). */
body.login .button-secondary {
	height: 44px;
	border-radius: 9px;
	border: 1px solid rgba(190, 205, 235, .2);
	background: rgba(255, 255, 255, .05);
	color: #d7dbe6;
	font-family: inherit;
	font-weight: 500;
}

/* ---------- 5. Notices, errors, secondary navigation -------- */

body.login #login_error,
body.login .notice,
body.login .message,
body.login .success {
	box-sizing: border-box;
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 1px solid rgba(190, 205, 235, .14);
	border-left: 3px solid #9b83ef;
	border-radius: 8px;
	background: rgba(255, 255, 255, .04);
	color: #d3d8e6;
	font-size: 14px;
	line-height: 1.55;
	box-shadow: none;
}

body.login #login_error {
	border-left-color: #e0918f;
	background: rgba(224, 145, 143, .09);
	color: #f0dcdb;
}

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

body.login .notice strong,
body.login #login_error strong { color: inherit; }

/* ---------- 5b. Third-party auth steps (Wordfence 2FA, etc.) ----
   Plugins that add a step after the password often ship their own white
   card, and some reuse #loginform. Strip the card, force a plain column. */

body.login #login > div:not(.fl-env),
body.login #login .wf-login-container,
body.login #login [class*="wfls"],
body.login #login [id*="wfls"],
body.login #login .wf-2fa-container {
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	transform: none !important;
	float: none !important;
	width: 100% !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: #c3c9da !important;
	max-width: none !important;
}

body.login #login > div:not(.fl-env),
body.login #login .wf-login-container,
body.login #login .wf-2fa-container {
	padding: 0 !important;
	margin: 0 !important;
}

body.login #login [class*="wfls"] label,
body.login #login [class*="wfls"] p,
body.login #login .wf-login-container label,
body.login #login .wf-login-container p {
	color: #c3c9da !important;
	font-family: inherit;
}

/* Any form carrying a plugin's second-factor field lays out as a column,
   whether or not it reuses the #loginform id. */
body.login form:has([class*="wfls"]),
body.login form:has([id*="wfls"]),
body.login form:has(.wf-login-container) {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 20px !important;
}

body.login #login form:not(#loginform) .submit,
body.login #login form:not(#loginform) input[type="submit"],
body.login #login form:not(#loginform) button[type="submit"],
body.login form:has([class*="wfls"]) .submit,
body.login form:has([class*="wfls"]) input[type="submit"],
body.login form:has([id*="wfls"]) input[type="submit"] {
	position: static !important;
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}

/* Second-factor code entry reads as a code, not prose. */
body.login #login input[type="number"],
body.login #login input[type="tel"],
body.login #login [id*="wfls"] input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	height: 54px;
	padding: 0 16px;
	border: 1px solid rgba(190, 205, 235, .18) !important;
	border-radius: 10px !important;
	background: rgba(255, 255, 255, .045) !important;
	color: #f0f1f5 !important;
	font-family: inherit;
	font-size: 16px;
	letter-spacing: .18em;
}

body.login #nav,
body.login #backtoblog {
	margin: 0;
	padding: 0;
	text-align: left;
	font-size: 13.5px;
}

body.login #nav {
	margin-top: 28px;
	color: rgba(230, 233, 244, .5);
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
	color: rgba(230, 233, 244, .5);
	text-decoration: none;
	transition: color .16s ease;
}

body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover { color: rgba(230, 233, 244, .85); }

/* On the login screen the lost-password link already lives beside
   "Remember me", so the default one below the form is redundant. */
body.login-action-login #nav { display: none; }

body.login #backtoblog {
	position: absolute;
	left: 56px;
	bottom: 44px;
	width: auto;
}

body.login .privacy-policy-page-link {
	position: absolute;
	right: 56px;
	bottom: 44px;
	width: auto;
	margin: 0;
	font-size: 13px;
}

body.login .language-switcher {
	margin: 32px 0 0;
	padding: 0;
}

body.login .language-switcher select {
	height: 40px;
	padding: 0 10px;
	border: 1px solid rgba(190, 205, 235, .18);
	border-radius: 8px;
	background: rgba(255, 255, 255, .05);
	color: #c3c9da;
	font-family: inherit;
	font-size: 13px;
}

body.login .language-switcher .button { margin-left: 8px; }

/* Password-strength meter, used by reset / registration screens. */
body.login #pass-strength-result {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid rgba(190, 205, 235, .16);
	border-radius: 8px;
	background: rgba(255, 255, 255, .04);
	color: #c3c9da;
	font-size: 13px;
}

body.login #pass-strength-result.short  { border-color: rgba(224, 145, 143, .5); }
body.login #pass-strength-result.bad    { border-color: rgba(213, 160, 103, .5); }
body.login #pass-strength-result.good   { border-color: rgba(155, 131, 239, .5); }
body.login #pass-strength-result.strong { border-color: rgba(139, 196, 160, .55); }

body.login .indicator-hint,
body.login .description,
body.login p.description {
	color: #8a93a8;
	font-size: 13px;
	line-height: 1.55;
}

/* ---------- 6. Responsive composition ---------------------- */
/* Tablet: the field narrows, the panel keeps its proportion. */

@media (max-width: 1200px) {
	body.login #login { padding: 80px 44px 96px; }
	.fl-tagline { font-size: 24px; }
	body.login #backtoblog { left: 44px; }
	body.login .privacy-policy-page-link { right: 44px; }
}

/* Below 900px the composition is rebuilt, not shrunk: the environment
   becomes a full-screen backdrop with the mark crowning it, and the form
   sits on top of the light rather than on a separate dark slab. */
@media (max-width: 900px) {
	body.login {
		background: #0a0d16;
		height: auto;
		min-height: 100vh;
	}

	.fl-env {
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100%;
		display: block;
		gap: 0;
		background:
			radial-gradient(130% 70% at 28% 0%, #1d1839 0%, #11142a 42%, #0a0d16 78%);
	}

	.fl-glow--violet {
		left: -120px;
		top: -160px;
		width: 560px;
		height: 520px;
		bottom: auto;
	}

	.fl-glow--copper {
		right: -140px;
		top: 120px;
		bottom: auto;
		width: 420px;
		height: 380px;
		opacity: .85;
	}

	.fl-mark-link {
		position: absolute;
		left: 50%;
		top: 40px;
		transform: translateX(-50%);
		width: 168px;
		max-width: 48%;
		margin: 0;
	}

	.fl-tagline { display: none; }
	.fl-place { display: none; }

	body.login #login {
		width: 100%;
		min-width: 0;
		max-width: 520px;
		min-height: 0;
		margin: 216px auto 0;
		padding: 0 26px 48px;
		border-left: 0;
		background: transparent;
		text-align: center;
	}

	body.login #login > * { max-width: none; }

	/* Mobile centres the composition around the mark — and the mark itself
	   already says Flow Life, so the eyebrow is redundant here. */
	body.login .fl-eyebrow { display: none; }

	body.login .fl-title,
	body.login .fl-sub { text-align: center; }

	body.login .forgetmenot { justify-self: center; }
	.fl-title { font-size: 38px; }
	.fl-sub { margin-bottom: 30px; }

	/* Recovery stays centred under the primary action. */
	body.login .fl-forgot {
		justify-self: center;
		margin: 0;
		padding: 2px 0;
		border-bottom: 0;
	}

	body.login #backtoblog,
	body.login .privacy-policy-page-link {
		position: static;
		margin-top: 28px;
		text-align: center;
	}

	body.login .privacy-policy-page-link { margin-top: 10px; }
}

/* Phone: full-width controls, comfortable tap targets. */
@media (max-width: 600px) {
	.fl-mark-link { top: 32px; width: 150px; }
	body.login #login { margin-top: 196px; padding: 0 22px 44px; }
	.fl-title { font-size: 35px; }

	body.login form .input,
	body.login input[type="text"],
	body.login input[type="email"],
	body.login input[type="password"] {
		height: 52px;
		font-size: 16px; /* prevents iOS zoom on focus */
	}
}

/* Short viewports: let the panel scroll rather than clip. */
@media (max-height: 760px) and (min-width: 901px) {
	body.login #login { min-height: 0; padding-top: 64px; padding-bottom: 96px; }
}

/* ---------- 7. Motion & contrast preferences ---------------- */

@media (prefers-reduced-motion: reduce) {
	body.login *,
	body.login *::before,
	body.login *::after,
	.fl-env * {
		animation: none !important;
		transition: none !important;
	}
}

@media (prefers-contrast: more) {
	body.login form .input,
	body.login input[type="text"],
	body.login input[type="password"] { border-color: rgba(200, 215, 245, .5); }
	.fl-sub, body.login .description { color: #b6bece; }
}

/* Print: nobody should print a login page, but if they do. */
@media print {
	.fl-env { display: none; }
	body.login { background: #fff; color: #000; }
}
