/*
 * Login screen — restyles wp-login.php to match the theme's
 * editorial identity. Keeps every default WP class WordPress uses,
 * plus explicit styling for the OneAll Social Login container that
 * the site currently uses for Google / Facebook / LinkedIn buttons.
 *
 * Selectors ARE prefixed with `body.login` where WordPress uses that
 * body class so we don't leak into any front-end page that happens
 * to reuse a class name.
 */

:root {
	--mec-primary: #003c71;
	--mec-primary-hover: #002a52;
	--mec-accent: #005a87;
	--mec-ink: #1a1a1a;
	--mec-ink-soft: #4a5561;
	--mec-muted: #6b7280;
	--mec-line: #e2e5ea;
	--mec-line-soft: #eef0f3;
	--mec-bg: #ffffff;
	--mec-bg-strip: #f2f5f8;
	--mec-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--mec-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Full-page background — a subtle warm-blue wash instead of the
   default WP grey, so the login card floats on a branded surface. */
body.login {
	background: linear-gradient(180deg, #f2f5f8 0%, #ffffff 100%);
	font-family: var(--mec-sans);
}

body.login #login {
	max-width: 420px;
	padding: 40px 20px 24px;
}

/* Header logo area */
body.login h1 {
	margin-bottom: 12px;
}
body.login h1 a {
	/* Default state — inline CSS from PHP overrides background-image
	   when a custom logo is set. Falls back to the site title as text
	   below when no logo is present. */
	width: 220px;
	height: 60px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	margin: 0 auto;
	transition: opacity 0.15s ease;
}
body.login h1 a:hover {
	opacity: 0.85;
}

/* Login form card */
body.login form {
	background: var(--mec-bg);
	border: 1px solid var(--mec-line);
	border-top: 3px solid var(--mec-primary);
	box-shadow: 0 20px 40px -20px rgba(15, 30, 55, 0.15);
	padding: 26px 26px 22px;
	margin-top: 0;
}

/* Field labels */
body.login label {
	font-family: var(--mec-sans);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--mec-ink-soft);
}

/* Input fields */
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
	border: 1px solid var(--mec-line);
	border-radius: 0;
	padding: 10px 12px;
	font-family: var(--mec-sans);
	font-size: 15px;
	color: var(--mec-ink);
	background: var(--mec-bg);
	box-shadow: none;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
	border-color: var(--mec-primary);
	box-shadow: 0 0 0 3px rgba(0, 60, 113, 0.14);
	outline: none;
}

/* Remember me checkbox */
body.login .forgetmenot label {
	text-transform: none;
	letter-spacing: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--mec-ink-soft);
}
body.login input[type="checkbox"] {
	accent-color: var(--mec-primary);
}

/* Primary submit button */
body.login .submit,
body.login p.submit {
	margin-top: 20px;
}
body.login .button-primary,
body.login #wp-submit {
	background: var(--mec-primary);
	border: 0;
	color: #fff;
	font-family: var(--mec-sans);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	padding: 12px 22px;
	height: auto;
	line-height: 1.2;
	border-radius: 0;
	box-shadow: 0 8px 20px -10px rgba(0, 60, 113, 0.4);
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	width: 100%;
	text-shadow: none;
}
body.login .button-primary:hover,
body.login .button-primary:focus,
body.login #wp-submit:hover,
body.login #wp-submit:focus {
	background: var(--mec-primary-hover);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 12px 26px -10px rgba(0, 60, 113, 0.5);
}

/* Bottom navigation links (Lost password / Register / Back to site) */
body.login #nav,
body.login #backtoblog {
	text-align: center;
	font-family: var(--mec-sans);
	font-size: 13px;
	margin: 16px 0 0;
}
body.login #nav a,
body.login #backtoblog a {
	color: var(--mec-primary);
	text-decoration: none;
	font-weight: 500;
	padding: 4px 8px;
}
body.login #nav a:hover,
body.login #backtoblog a:hover {
	color: var(--mec-primary-hover);
	text-decoration: underline;
}

/* Notices — success, error, and info banners */
body.login .message,
body.login .success,
body.login .notice,
body.login #login_error {
	font-family: var(--mec-sans);
	font-size: 14px;
	line-height: 1.5;
	padding: 12px 14px;
	border-radius: 0;
	background: #fff;
	border-left: 3px solid var(--mec-primary);
	box-shadow: 0 4px 12px -6px rgba(15, 30, 55, 0.15);
	margin: 0 0 16px;
}
body.login #login_error {
	border-left-color: #b91c1c;
	color: #7f1d1d;
}
body.login .message,
body.login .success {
	border-left-color: #166534;
	color: #14532d;
}

/* Language switcher */
body.login .language-switcher {
	background: transparent;
	margin-top: 12px;
}
body.login .language-switcher select {
	font-family: var(--mec-sans);
	font-size: 13px;
	border: 1px solid var(--mec-line);
	padding: 6px 10px;
	background: #fff;
}

/* ────────────────────────────────────────────────────────────
   OneAll Social Login container styling. OneAll injects markup
   directly into the login form; the plugin renders social provider
   icons inside .oneall_social_login_providers. Our theme frames
   the block and adds a divider "or sign in with" separator.
   ──────────────────────────────────────────────────────────── */
body.login .oneall_social_login {
	background: var(--mec-bg-strip);
	border: 1px solid var(--mec-line);
	border-radius: 0;
	padding: 16px !important;
	margin: 0 -26px 20px !important;
	border-left: 0;
	border-right: 0;
}
body.login .oneall_social_login_label label {
	display: block;
	text-align: center;
	font-family: var(--mec-sans);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--mec-primary);
	margin-bottom: 10px;
}
body.login .oneall_social_login_providers {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* Divider — a fine "or" separator between social buttons and the
   email/password fields. Injected after the OneAll block via a
   ::after pseudo-element so we don't need to touch OneAll's markup. */
body.login .oneall_social_login::after {
	content: attr(data-divider-text) 'or sign in with your email';
	display: block;
	text-align: center;
	font-family: var(--mec-sans);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--mec-muted);
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--mec-line);
}

/* Header banner strip above the WordPress logo — the "log in / register"
   pill nav some plugins inject. */
body.login .login-language-selector,
body.login p.login-language-selector-title {
	display: none;
}

/* Custom login footer note — added via ::after on #backtoblog. */
body.login #backtoblog::after {
	content: '';
	display: block;
	margin-top: 24px;
	height: 1px;
	background: var(--mec-line);
}
body.login #backtoblog + .language-switcher {
	margin-top: 12px;
}

/* Mobile tweaks — pack tighter on small screens. */
@media (max-width: 480px) {
	body.login #login {
		padding: 20px 12px;
	}
	body.login form {
		padding: 20px 18px 18px;
	}
	body.login .oneall_social_login {
		margin: 0 -18px 16px !important;
	}
}

/* ────────────────────────────────────────────────────────────
   Logout toast — small "you're signed out" chip that appears on
   the front-end homepage after logout. Styled inline in the theme
   so it doesn't need a full-featured toast library.
   ──────────────────────────────────────────────────────────── */
.mec-loggedout-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 1000;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--mec-primary);
	color: #fff;
	padding: 10px 12px 10px 16px;
	font-family: 'Hanken Grotesk', sans-serif;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 18px 40px -18px rgba(15, 30, 55, 0.35);
	animation: mec-toast-in 260ms ease-out both;
}
.mec-loggedout-toast__close {
	background: transparent;
	color: #fff;
	border: 0;
	font-size: 18px;
	line-height: 1;
	padding: 4px 6px;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.15s ease;
}
.mec-loggedout-toast__close:hover {
	opacity: 1;
}
@keyframes mec-toast-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}
