/* Horizon Studio - Custom WordPress Login Page Styles (2026 Edition)
   Loaded via login_enqueue_scripts to restyle wp-login.php, lost password, and reset password pages.
   Font: Onest (loaded via Google Fonts in the PHP hook). */

/* --- Keyframes --- */
@keyframes loginFloat {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(30px, -30px) scale(1.05); }
	66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes loginFloatSlow {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(-25px, 20px) scale(1.03); }
	66% { transform: translate(15px, -25px) scale(0.97); }
}

@keyframes loginCardEntrance {
	0% {
		opacity: 0;
		transform: translateY(20px) scale(0.97);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* --- Hide WP logo, title, back link, language selector, footer --- */
.login h1 a,
.login h1,
#backtoblog,
.language-switcher,
#footer,
.privacy-policy-page-link,
.login .privacy-policy-page-link,
.request-username {
	display: none !important;
}

/* --- Page background: static gradient --- */
body.login {
	background: linear-gradient(135deg, #002B52 0%, #00519C 25%, #0077CC 50%, #00A3E0 75%, #00519C 100%) !important;
	font-family: 'Onest', sans-serif;
	position: relative;
	overflow: hidden;
	min-height: 100vh;
	min-height: 100dvh;
}

/* Blob 1 — top right, bright brand blue */
body.login::before {
	content: '' !important;
	position: fixed;
	top: -20%;
	right: -15%;
	width: clamp(350px, 65vw, 650px);
	height: clamp(350px, 65vw, 650px);
	border-radius: 50%;
	background: linear-gradient(135deg, rgba(0, 163, 224, 0.6), rgba(0, 212, 170, 0.3));
	filter: blur(90px);
	animation: loginFloat 18s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

/* Blob 2 — bottom left, warm accent */
body.login::after {
	content: '' !important;
	position: fixed;
	bottom: -15%;
	left: -10%;
	width: clamp(280px, 50vw, 500px);
	height: clamp(280px, 50vw, 500px);
	border-radius: 50%;
	background: linear-gradient(45deg, rgba(255, 107, 53, 0.25), rgba(247, 201, 75, 0.2));
	filter: blur(80px);
	animation: loginFloatSlow 22s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

/* Blob 3 — center-left, teal glow (using #login wrapper) */
#login::before {
	content: '' !important;
	position: fixed;
	top: 30%;
	left: -5%;
	width: clamp(200px, 40vw, 400px);
	height: clamp(200px, 40vw, 400px);
	border-radius: 50%;
	background: linear-gradient(180deg, rgba(0, 212, 170, 0.3), rgba(0, 81, 156, 0.15));
	filter: blur(70px);
	animation: loginFloat 25s ease-in-out infinite reverse;
	pointer-events: none;
	z-index: 0;
}

/* --- Login form card with static border glow --- */
.login form {
	background: rgba(255, 255, 255, 0.92) !important;
	backdrop-filter: blur(24px) !important;
	-webkit-backdrop-filter: blur(24px) !important;
	border: 2px solid transparent !important;
	border-radius: 20px !important;
	box-shadow:
		0 12px 40px rgba(0, 0, 0, 0.2),
		0 4px 12px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
	padding: 40px 36px 32px !important;
	margin-top: 0 !important;
	position: relative;
	z-index: 2;
	animation: loginCardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) both !important;
	animation-delay: 0.15s !important;
}

/* Static gradient border glow */
.login form::after {
	content: '' !important;
	position: absolute !important;
	inset: -2px !important;
	border-radius: 22px !important;
	padding: 2px !important;
	background: linear-gradient(135deg, #00A3E0, #00519C 50%, #00D4AA, #00519C, #00A3E0) !important;
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
	-webkit-mask-composite: xor !important;
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
	mask-composite: exclude !important;
	pointer-events: none !important;
	z-index: -1 !important;
	opacity: 0.6 !important;
}

/* Subtle glow under the card */
.login form::before {
	content: '' !important;
	position: absolute !important;
	bottom: -20px !important;
	left: 10% !important;
	right: 10% !important;
	height: 40px !important;
	background: radial-gradient(ellipse at center, rgba(0, 81, 156, 0.15) 0%, transparent 70%) !important;
	filter: blur(10px) !important;
	pointer-events: none !important;
	z-index: -1 !important;
}

/* --- Form labels --- */
.login label {
	font-family: 'Onest', sans-serif !important;
	font-weight: 600 !important;
	font-size: 12px !important;
	color: #64748b !important;
	margin-bottom: 6px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.04em !important;
}

/* --- Input fields --- */
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 12px !important;
	padding: 12px 16px !important;
	font-family: 'Onest', sans-serif !important;
	font-size: 14px !important;
	color: #1e293b !important;
	background: #f8fafc !important;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
	box-shadow: none !important;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
	border-color: #00519C !important;
	box-shadow: 0 0 0 3px rgba(0, 81, 156, 0.1) !important;
	background: #ffffff !important;
	outline: none !important;
}

/* --- Primary button (Log In, Get New Password, etc.) --- */
.login .button-primary,
.login .button.button-primary {
	background: linear-gradient(135deg, #00519C, #003D75) !important;
	border: none !important;
	border-radius: 12px !important;
	padding: 14px 24px !important;
	font-family: 'Onest', sans-serif !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	color: #ffffff !important;
	cursor: pointer !important;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s ease !important;
	box-shadow: 0 4px 16px rgba(0, 81, 156, 0.2), 0 1px 2px rgba(0, 81, 156, 0.1) !important;
	text-shadow: none !important;
	float: none !important;
	width: 100% !important;
	position: relative !important;
	overflow: hidden !important;
}

.login .button-primary:hover,
.login .button.button-primary:hover {
	background: linear-gradient(135deg, #0066CC, #00519C) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 12px 40px rgba(0, 81, 156, 0.3), 0 4px 12px rgba(0, 81, 156, 0.15) !important;
}

.login .button-primary:active,
.login .button.button-primary:active {
	background: linear-gradient(135deg, #003D75, #002d55) !important;
	transform: translateY(0) scale(0.98) !important;
	box-shadow: 0 4px 16px rgba(0, 81, 156, 0.25) !important;
}

/* --- Remember me checkbox --- */
.login .forgetmenot {
	display: flex !important;
	align-items: center !important;
	gap: 0 !important;
	margin-bottom: 20px !important;
	margin-top: 4px !important;
	float: none !important;
}

.login .forgetmenot label {
	font-family: 'Onest', sans-serif !important;
	font-weight: 500 !important;
	font-size: 13px !important;
	color: #64748b !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	cursor: pointer !important;
	transition: color 0.2s ease !important;
	line-height: 18px !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	margin-bottom: 0 !important;
}

.login .forgetmenot label:hover {
	color: #1e293b !important;
}

.login input[type="checkbox"] {
	accent-color: #00519C !important;
	width: 18px !important;
	height: 18px !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	vertical-align: middle !important;
	margin: 0 8px 0 0 !important;
}

/* --- Lost password link --- */
.login #nav {
	margin-top: 16px;
	text-align: center;
	animation: loginCardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both !important;
	animation-delay: 0.4s !important;
}

.login #nav a {
	color: rgba(255, 255, 255, 0.7);
	font-family: 'Onest', sans-serif;
	font-weight: 500;
	transition: color 0.2s ease;
}

.login #nav a:hover {
	color: #ffffff;
}

/* --- Messages (errors, info) --- */
.login .message {
	border-left: 4px solid #00519C !important;
	background: rgba(240, 244, 255, 0.95) !important;
	backdrop-filter: blur(12px) !important;
	color: #1e293b !important;
	font-family: 'Onest', sans-serif !important;
	border-radius: 0 12px 12px 0 !important;
	padding: 12px 16px !important;
}

.login #login_error {
	border-left: 4px solid #dc2626 !important;
	background: rgba(254, 242, 242, 0.95) !important;
	backdrop-filter: blur(12px) !important;
	color: #1e293b !important;
	font-family: 'Onest', sans-serif !important;
	border-radius: 0 12px 12px 0 !important;
}

/* --- Lost password / reset form heading --- */
.login p.message,
.login h2 {
	font-family: 'Onest', sans-serif !important;
}

/* --- Center the form vertically --- */
#login {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding-top: 0 !important;
	padding-top: env(safe-area-inset-top) !important;
	padding-bottom: env(safe-area-inset-bottom);
	position: relative;
	z-index: 1;
	animation: loginCardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

#loginform,
#lostpasswordform,
#resetpassform {
	margin-top: 0 !important;
}

/* --- Submit container: stack remember-me above button --- */
.login .submit {
	display: flex !important;
	flex-direction: column !important;
	float: none !important;
}

/* --- Form paragraph spacing --- */
.login form p {
	margin-bottom: 20px !important;
}

.login form p.submit {
	margin-bottom: 0 !important;
}

/* --- Responsive --- */
@media (max-width: 480px) {
	body.login::before {
		width: clamp(220px, 60vw, 380px);
		height: clamp(220px, 60vw, 380px);
	}

	body.login::after {
		width: clamp(180px, 50vw, 320px);
		height: clamp(180px, 50vw, 320px);
	}

	#login::before {
		width: clamp(150px, 40vw, 280px);
		height: clamp(150px, 40vw, 280px);
	}

	.login form {
		border-radius: 16px !important;
		padding: 28px 24px 24px !important;
	}

	.login .button-primary,
	.login .button.button-primary {
		padding: 13px 20px !important;
		font-size: 14px !important;
		border-radius: 10px !important;
	}

}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
	body.login::before,
	body.login::after,
	#login::before {
		animation: none !important;
	}

	#login,
	.login form,
	.login #nav {
		animation: none !important;
		opacity: 1 !important;
	}

	.login .button-primary,
	.login .button.button-primary {
		transition: background 0.15s ease !important;
	}
}
