/* Esfiya login page (wp-login.php): look 1 "Switch" (Ariph, 2026-10-04).
   Colours are the website theme's tokens (themes/esfiya/style.css); the mode comes from data-theme. */
:root {
	--bg: #F4F4F4; --surface: #FFFFFF; --hover: #E0E0E0; --text: #161616; --text2: #525252;
	--border: #DDE1E6; --track: #E4E6EA; --field: #F4F4F4; --primary: #0f6bff; --tint: rgba(15, 107, 255, .09);
	--glass: rgba(255, 255, 255, .62); --shadow: rgba(0, 0, 0, .1); --error: #DA1E28; --success: #24A148;
	--font-body: 'Faruma', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-title: 'MVWaheed', 'Faruma', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #161616; --surface: #262626; --hover: #393939; --text: #F4F4F4; --text2: #A8A8A8;
	--border: #393939; --track: #232325; --field: #1d1d1d; --tint: rgba(15, 107, 255, .2);
	--glass: rgba(22, 22, 26, .62); --shadow: rgba(0, 0, 0, .5); --error: #FA4D56; --success: #42BE65;
	color-scheme: dark;
}

body.login { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 18px; line-height: 1.7; direction: rtl; min-height: 100vh; -webkit-font-smoothing: antialiased; }
body.login a { color: var(--primary); text-decoration: none; }
body.login a:focus { box-shadow: none; outline: 2px solid var(--primary); outline-offset: 2px; }

/* Top bar, as on the website */
.esl-bar { position: sticky; top: 0; z-index: 5; height: 76px; display: flex; align-items: center; justify-content: space-between; padding-inline: 32px; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
body.login .esl-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 30px; line-height: 44px; color: var(--text); }
.esl-brand::before, .login h1 a::before { content: ""; width: 44px; height: 44px; border-radius: 50%; background: var(--primary) center / cover no-repeat; flex: none; }
body.login .esl-ghost { display: inline-flex; align-items: center; height: 44px; padding-inline: 16px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; }
body.login .esl-ghost:hover { background: var(--hover); }

/* The card */
#login { width: 420px; max-width: calc(100% - 32px); margin: 56px auto 40px; padding: 30px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 12px 40px var(--shadow); box-sizing: border-box; }
.login h1 { display: none; }
.login h1 a { display: flex; align-items: center; justify-content: center; gap: 10px; width: auto; height: auto; margin: 0; background: none; text-indent: 0; overflow: visible; font-family: var(--font-title); font-size: 30px; line-height: 44px; font-weight: 400; color: var(--text); }
.interim-login h1 { display: block; }

/* The home page switch (themes/esfiya .switch) */
.esl-switch { display: flex; height: 52px; border-radius: 26px; padding: 4px; background: var(--track); margin-bottom: 18px; box-sizing: border-box; }
body.login .esl-switch a { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 22px; font-size: 20px; color: var(--text); white-space: nowrap; }
.esl-switch a svg { opacity: .8; flex: none; }
body.login .esl-switch a:hover { background: rgba(127, 127, 127, .1); }
body.login .esl-switch a.on, body.login .esl-switch a.on:hover { background: var(--primary); color: #fff; box-shadow: 0 2px 5px rgba(15, 107, 255, .45); }
.esl-switch a.on svg { opacity: 1; }

/* Notices */
.login .message, .login .notice, .login .success, #login_error { margin: 0 0 16px; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--tint); color: var(--text); box-shadow: none; font-size: 16px; line-height: 26px; }
.login .notice p, .login .message p { margin: 0; }
.login .notice-error, #login_error { background: color-mix(in srgb, var(--error) 14%, transparent); }
.login .message.register { display: none; }

/* Forms */
.login form { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; font-weight: 400; }
/* One spacing for every form: 16px between fields, 6px label to field, 24px above the button */
#loginform { display: flex; flex-wrap: wrap; gap: 16px 8px; }
#loginform > * { flex: 1 1 100%; margin: 0; }
#registerform, #lostpasswordform, #resetpassform { display: flex; flex-direction: column; gap: 16px; }
body.login #login form > p, body.login #login form > div { margin: 0; }
body.login #login form p.submit { margin-top: 8px; }
#loginform .forgetmenot { order: 10; flex: 1 1 auto; }
#loginform .esl-forgot { order: 11; flex: 0 1 auto; font-size: 16px; line-height: 22px; text-align: left; align-self: center; }
#loginform .submit { order: 12; }
.login label { font-size: 16px; line-height: 24px; color: var(--text2); margin-bottom: 6px; display: block; }
.login form .input, .login input[type="text"], .login input[type="email"], .login input[type="password"] {
	width: 100%; height: 52px; margin: 0; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--field); color: var(--text);
	font-family: var(--font-body); font-size: 18px; line-height: 1; box-shadow: none; box-sizing: border-box; direction: rtl;
}
.login input[type="email"], .login #user_login, .login #user_email { unicode-bidi: plaintext; }
.login form .input:focus, .login input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 107, 255, .22); outline: 0; }
.login .wp-pwd { position: relative; }
.login .wp-pwd input[type="password"], .login .wp-pwd input[type="text"] { padding-left: 52px; padding-right: 14px; }
.login .button.wp-hide-pw { position: absolute; top: 0; right: auto; left: 4px; width: 44px; height: 52px; min-width: 0; border: 0; background: none; color: var(--text2); box-shadow: none; }
.login .button.wp-hide-pw .dashicons { top: 0; width: 20px; height: 20px; font-size: 20px; }
.login .button.wp-hide-pw:focus { box-shadow: none; outline: 2px solid var(--primary); }

/* Remember me as a switch */
.login .forgetmenot { display: flex; align-items: center; gap: 8px; float: none; }
.login .forgetmenot label { margin: 0; font-size: 16px; color: var(--text); }
#rememberme { -webkit-appearance: none; appearance: none; position: relative; width: 38px; height: 22px; margin: 0; border: 0; border-radius: 11px; background: var(--track); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; flex: none; }
#rememberme::before { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; margin: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: right .15s; float: none; }
#rememberme:checked { background: var(--primary); box-shadow: none; }
#rememberme:checked::before { content: ""; right: 19px; }

/* Blue button */
.login .submit { float: none; }
.login .button-primary, .login #wp-submit { float: none; width: 100%; height: 52px; min-height: 52px; margin: 4px 0 0; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-family: var(--font-body); font-size: 20px; line-height: 1; text-shadow: none; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.login .button-primary:hover, .login .button-primary:focus { background: var(--primary); filter: brightness(1.08); color: #fff; }
#reg_passmail { font-size: 15px; line-height: 24px; color: var(--text2); text-align: center; }
#registerform br.clear { display: none; }

/* Links under the card: on log in and register the tabs and the forgot link take their place */
.login #nav, .login #backtoblog { margin: 16px 0 0; padding: 0; text-align: center; font-size: 16px; }
.login #nav a, .login #backtoblog a { color: var(--primary); }
.login #backtoblog, .login .language-switcher { display: none; }
body.login-action-login #nav, body.login-action-register #nav { display: none; }
.login .privacy-policy-page-link { margin: 16px 0 0; text-align: center; font-size: 15px; }
.login .wp-tooltip__toggle { background: none; border: 0; color: var(--text2); }

/* Extra register fields from Cimy User Extra Fields (password, mobile number) in the same look */
body.login #login input.cimy_uef_input_27 { width: 100%; height: 52px; margin: 0; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--field); color: var(--text); font-size: 18px; box-sizing: border-box; }
body.login #login input.cimy_uef_input_27:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 107, 255, .22); outline: 0; }
#registerform br { display: none; }
#registerform p:empty { display: none; }
body.login #registerform .indicator-hint { margin: -8px 0 0; font-size: 14px; line-height: 22px; color: var(--text2); }
/* WordPress's strength box is not tied to these fields (it never changes), so it is left out */
body.login-action-register #pass-strength-result { display: none; }
/* The reader sets the password here, so no password link is emailed */
#registerform:has(input[name="cimy_uef_wp_PASSWORD"]) #reg_passmail { display: none; }

/* New password page (the reset link): English, left to right, WordPress's own rules (Ariph, 2026-10-16) */
body.login-action-rp #login, body.login-action-resetpass #login { direction: ltr; text-align: left; --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-family: var(--font-body); }
body.login-action-rp #login input, body.login-action-resetpass #login input, body.login-action-rp #login .button, body.login-action-resetpass #login .button { direction: ltr; font-family: var(--font-body); }
body.login-action-rp .wp-pwd input[type="password"], body.login-action-rp .wp-pwd input[type="text"],
body.login-action-resetpass .wp-pwd input[type="password"], body.login-action-resetpass .wp-pwd input[type="text"] { padding-left: 14px; padding-right: 52px; }
body.login-action-rp .button.wp-hide-pw, body.login-action-resetpass .button.wp-hide-pw { left: auto; right: 4px; }
#resetpassform br.clear { display: none; }
#resetpassform .user-pass1-wrap { display: flex; flex-direction: column; gap: 10px; }
#resetpassform .user-pass1-wrap > p { margin: 0; }
#resetpassform .user-pass1-wrap label { margin: 0; }
#resetpassform #pass-strength-result { margin: 10px 0 0; padding: 8px 14px; width: 100%; box-sizing: border-box; border: 0; border-radius: 10px; background: var(--track); color: var(--text); font-size: 15px; font-weight: 600; line-height: 22px; text-align: left; }
#resetpassform #pass-strength-result.short { background: color-mix(in srgb, var(--error) 18%, transparent); color: var(--error); }
#resetpassform #pass-strength-result.bad { background: rgba(241, 194, 27, .2); color: #b28600; }
#resetpassform #pass-strength-result.good { background: var(--tint); color: var(--primary); }
#resetpassform #pass-strength-result.strong { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
:root[data-theme="dark"] #resetpassform #pass-strength-result.bad { color: #f1c21b; }
/* WordPress shows and hides the weak-password row itself (inline display), so it stays a block */
#resetpassform .pw-weak { margin: 0; }
#resetpassform .pw-weak label { display: inline; margin: 0 0 0 8px; color: var(--text); font-size: 15px; vertical-align: middle; }
#resetpassform .pw-weak input[type="checkbox"] { -webkit-appearance: checkbox; appearance: auto; width: 18px; height: 18px; margin: 0; border: 0; box-shadow: none; accent-color: var(--primary); vertical-align: middle; }
#resetpassform .indicator-hint { margin: 0; font-size: 14px; line-height: 22px; color: var(--text2); }
#resetpassform .reset-pass-submit { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 0; }
#resetpassform .reset-pass-submit .button { float: none; margin: 0; }
.login .button.wp-generate-pw { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: none; color: var(--primary); font-size: 16px; line-height: 1; box-shadow: none; }
.login .button.wp-generate-pw:hover, .login .button.wp-generate-pw:focus { border-color: var(--primary); background: var(--tint); color: var(--primary); }
.login .button-primary:disabled, .login .button-primary[disabled] { background: var(--primary) !important; color: #fff !important; opacity: .45; filter: none; }

/* Phone: no bar; the logo and name sit at the top of a flat page */
@media (max-width: 700px) {
	.esl-bar { display: none; }
	#login { width: 100%; max-width: 390px; margin: 0 auto; padding: 40px 24px 24px; background: none; border: 0; box-shadow: none; }
	.login h1 { display: block; margin-bottom: 18px; }
}
