/**
 * Artsun Login — modern login page styles.
 * Uses CSS variables injected inline from plugin settings.
 */


:root {
	--artsun-primary: #6d5efc;
	--artsun-secondary: #4b7bec;
	--artsun-accent: #8f6dff;
	--artsun-radius: 18px;
	--artsun-form-bg: #ffffff;
	--artsun-form-text: #1e2233;
	--artsun-shadow: 0 30px 80px -20px rgba(12, 14, 40, 0.55);
	--artsun-font: 'Vazirmatn', Tahoma, sans-serif;
}

/* ---------- Base layout ---------- */
body.login {
	min-height: 100vh;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	font-family: var(--artsun-font), 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}

/* Persian font when RTL */
html[dir="rtl"] body.login,
body.artsun-dir-rtl {
	font-family: var(--artsun-font);
}
html[dir="rtl"] body.login { direction: rtl; }

/* Overlay for image backgrounds / depth */
body.login::before {
	content: "";
	position: fixed;
	inset: 0;
	background: radial-gradient(1200px 600px at 20% 10%, rgba(255,255,255,.14), transparent 60%),
	            radial-gradient(900px 500px at 100% 100%, rgba(0,0,0,.28), transparent 55%);
	pointer-events: none;
	z-index: 0;
}

#artsun-particles {
	position: fixed;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ---------- Shell wrapper (welcome header) ---------- */
.artsun-login-shell {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 440px;
	padding: 24px;
	box-sizing: border-box;
	animation: artsun-rise .7s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes artsun-rise {
	from { opacity: 0; transform: translateY(24px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.artsun-welcome {
	text-align: center;
	color: #fff;
	margin-bottom: 6px;
}
.artsun-sitename {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	opacity: .85;
	padding: 5px 14px;
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 999px;
	margin-bottom: 14px;
	backdrop-filter: blur(6px);
}
.artsun-welcome-title {
	font-size: 30px;
	font-weight: 700;
	margin: 6px 0 6px;
	color: #fff;
	text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.artsun-welcome-sub {
	font-size: 14.5px;
	line-height: 1.7;
	opacity: .9;
	margin: 0 auto 6px;
	max-width: 340px;
}

/* ---------- The WordPress login form ---------- */
#login {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 400px;
	padding: 0 !important;
	margin: 0 auto;
}

/* Logo area */
#login h1 {
	margin-bottom: 4px;
}
#login h1 a {
	width: 200px;
	height: 84px;
	margin: 0 auto 4px;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform .3s ease;
}
#login h1 a:hover { transform: translateY(-2px); }

/* The card */
#loginform,
#registerform,
#lostpasswordform {
	background: var(--artsun-form-bg);
	border-radius: var(--artsun-radius);
	padding: 30px 28px 26px;
	box-shadow: var(--artsun-shadow);
	border: 1px solid rgba(255,255,255,.5);
	margin-top: 18px;
	position: relative;
	overflow: hidden;
}

/* Glassmorphism variant */
body.artsun-glass #loginform,
body.artsun-glass #registerform,
body.artsun-glass #lostpasswordform {
	background: rgba(255,255,255,.72);
	backdrop-filter: blur(22px) saturate(160%);
	-webkit-backdrop-filter: blur(22px) saturate(160%);
	border: 1px solid rgba(255,255,255,.6);
}

/* Accent bar at top of card */
#loginform::before,
#registerform::before,
#lostpasswordform::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--artsun-primary), var(--artsun-secondary), var(--artsun-accent));
}

/* Labels */
#login form label {
	color: var(--artsun-form-text);
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 4px;
	display: block;
}

/* Inputs */
#login form .input,
#login input[type="text"],
#login input[type="password"],
#login input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	background: rgba(120,130,170,.08);
	border: 1.5px solid rgba(120,130,170,.22);
	border-radius: calc(var(--artsun-radius) * .6);
	padding: 13px 14px;
	font-size: 15px;
	color: var(--artsun-form-text);
	margin: 4px 0 16px;
	transition: border-color .2s, box-shadow .2s, background .2s;
}
#login form .input:focus,
#login input[type="text"]:focus,
#login input[type="password"]:focus,
#login input[type="email"]:focus {
	border-color: var(--artsun-primary);
	background: #fff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--artsun-primary) 18%, transparent);
	outline: none;
}

/* Show-password toggle button */
.wp-pwd { position: relative; }
.wp-pwd .button.wp-hide-pw {
	background: transparent;
	border: 0;
	box-shadow: none;
	top: 2px;
}
.wp-pwd .button.wp-hide-pw:hover { color: var(--artsun-primary); }

/* Remember me */
.login .forgetmenot label {
	font-weight: 500 !important;
	font-size: 13px !important;
	color: color-mix(in srgb, var(--artsun-form-text) 75%, transparent) !important;
}

/* Submit button */
#login form .submit .button-primary,
.login .button-primary {
	width: 100%;
	background: linear-gradient(135deg, var(--artsun-primary), var(--artsun-secondary)) !important;
	border: 0 !important;
	border-radius: calc(var(--artsun-radius) * .6) !important;
	padding: 12px 18px !important;
	height: auto !important;
	font-size: 15.5px !important;
	font-weight: 600 !important;
	letter-spacing: .3px;
	box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--artsun-primary) 75%, transparent) !important;
	text-shadow: none !important;
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
	cursor: pointer;
}
.login .button-primary:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
	box-shadow: 0 18px 36px -10px color-mix(in srgb, var(--artsun-primary) 85%, transparent) !important;
}
.login .button-primary:active { transform: translateY(0); }

/* Links under the form */
#login #nav,
#login #backtoblog {
	text-align: center;
	padding: 14px 0 0;
	text-shadow: none;
}
#login #nav a,
#login #backtoblog a {
	color: rgba(255,255,255,.9) !important;
	font-size: 13.5px;
	font-weight: 500;
	transition: opacity .2s;
}
#login #nav a:hover,
#login #backtoblog a:hover { opacity: .7; color: #fff !important; }

/* Footer text */
.artsun-login-footer {
	position: relative;
	z-index: 2;
	text-align: center;
	color: rgba(255,255,255,.75);
	font-size: 12.5px;
	margin-top: 18px;
}

/* Messages / errors */
.login .message,
.login #login_error,
.login .notice {
	border-radius: calc(var(--artsun-radius) * .55);
	border: 0;
	border-inline-start: 4px solid var(--artsun-primary);
	box-shadow: 0 8px 24px -12px rgba(0,0,0,.3);
	padding: 12px 16px;
	font-size: 13.5px;
}
.login #login_error {
	border-inline-start-color: #e0245e;
}

/* Language switcher */
.login .language-switcher {
	text-align: center;
	margin-top: 10px;
}

/* Hide default WP privacy links styling clash */
.login .privacy-policy-page-link { text-align: center; }
.login .privacy-policy-page-link a { color: rgba(255,255,255,.7) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.artsun-login-shell { padding: 16px; }
	.artsun-welcome-title { font-size: 25px; }
	#loginform, #registerform, #lostpasswordform { padding: 24px 20px 22px; }
	#login h1 a { width: 160px; height: 70px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.artsun-login-shell { animation: none; }
	.login .button-primary,
	#login h1 a { transition: none; }
	#artsun-particles { display: none; }
}

/* Ensure all login controls use the selected font */
/* ARTSUN FONT INHERIT */
body.login,
#login h1, #login h2, #login p, #login label, #login a,
#loginform input, #loginform label,
.login .button, .login .button-primary,
.artsun-welcome, .artsun-welcome-title, .artsun-welcome-sub,
.artsun-login-footer {
	font-family: var(--artsun-font), 'Inter', Tahoma, sans-serif;
}

/* Protect WordPress icon font (show/hide password eye, etc.) */
.login .dashicons,
.login .dashicons-before::before,
.login [class*="dashicons-"]::before,
.login .wp-hide-pw .dashicons {
	font-family: dashicons !important;
}

/* Nicely style the show/hide password button */
.login .wp-pwd .button.wp-hide-pw {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	top: 0;
	color: color-mix(in srgb, var(--artsun-form-text) 55%, transparent);
}
.login .wp-pwd .button.wp-hide-pw .dashicons { font-size: 20px; line-height: 1; }

/* Force the selected font on the welcome header (title, subtitle, badge) */
.artsun-welcome,
.artsun-sitename,
.artsun-welcome-title,
.artsun-welcome-sub,
.artsun-login-footer {
	font-family: var(--artsun-font), 'Inter', Tahoma, sans-serif !important;
}
