/**
 * Private Site Auth – Login page styles.
 * Loaded only on wp-login.php via login_enqueue_scripts.
 * Dynamic URLs: --psa-login-logo-url, --psa-login-bg-url.
 * Font "Seitu Regular" loaded via @font-face in inline style (dynamic theme path).
 */

/* -------------------------------------------------------------------------
   Page – full viewport, background image cover
   ------------------------------------------------------------------------- */

body.login {
	position: relative;
	margin: 0;
	padding: 0;
	min-height: 100vh;
	overflow: hidden;
	background-color: #e8eaed;
	background-image: var(--psa-login-bg-url, none);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	font-family: "Seitu Regular", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
		Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------------
   Card – absolute left, white, 650×750, rounded 10px
   ------------------------------------------------------------------------- */

body.login div#login {
	position: absolute;
	left: 140px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 630px;
	max-height: 750px;
	margin: 0;
	padding: 50px 5px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 10px;
	overflow-y: auto;
}

/* -------------------------------------------------------------------------
   Logo – 90×101px, centered
   ------------------------------------------------------------------------- */

body.login h1 {
	margin: 0 0 16px;
	padding: 0;
	width: 100%;
	text-align: center;
}

body.login h1 a {
	display: inline-block;
	width: 90px;
	height: 101px;
	margin: 0 auto;
	padding: 0;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	background-image: var(--psa-login-logo-url, none);
	text-indent: -9999px;
	overflow: hidden;
}

.wp-hide-pw {
	display: none !important;
}

/* -------------------------------------------------------------------------
   Welcome block – title 30px bold, description 15px regular
   ------------------------------------------------------------------------- */

body.login .psa-login-welcome {
	width: 100%;
	text-align: center;
	margin-bottom: 24px;
}

body.login .psa-login-welcome-title {
	margin: 0 0 10px;
	font-size: 30px;
	font-weight: 700;
	color: #000;
	line-height: 1.25;
	letter-spacing: -0.01em;
	font-family: inherit;
}

body.login .psa-login-welcome-desc {
	margin: 0 auto;
	max-width: 490px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.55;
	color: #000;
	font-family: inherit;
	padding-bottom: 10px;
}

/* -------------------------------------------------------------------------
   Form – transparent (card IS the background)
   ------------------------------------------------------------------------- */

body.login form {
	width: 100%;
	max-width: 420px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/* Hide default WP labels – use placeholders instead.
   Still accessible via sr-only pattern. */
body.login form label[for="user_login"],
body.login form label[for="user_pass"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Hide password toggle & "remember me" */
body.login .wp-pwd .button.wp-hide-pw,
body.login .forgetmenot {
	display: none;
}

/* -------------------------------------------------------------------------
   Inputs – 420×65px, border-radius 5px, no border, #EDEDED
   Placeholder labels: centered, 14px, medium
   ------------------------------------------------------------------------- */

body.login form .input,
body.login form input[type="text"],
body.login form input[type="password"] {
	width: 420px;
	max-width: 100%;
	height: 65px;
	box-sizing: border-box;
	padding: 0 16px;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 500;
	line-height: 65px;
	text-align: center;
	color: #000;
	border: none;
	border-radius: 5px;
	background: #EDEDED;
	box-shadow: none;
	font-family: inherit;
	/* transition: box-shadow 0.2s ease; */
}

body.login form .input::placeholder,
body.login form input[type="text"]::placeholder,
body.login form input[type="password"]::placeholder {
	color: #000;
	opacity: 1;
	font-size: 14px;
	font-weight: 500;
}

body.login form .input:focus,
body.login form input[type="text"]:focus,
body.login form input[type="password"]:focus {
	outline: none;
	background: #EDEDED;
	/* box-shadow: 0 0 0 2px rgba(0, 187, 49, 0.4); */
}

/* Keep #EDEDED when browser autofills (removes default blue/yellow tint) */
body.login form .input:-webkit-autofill,
body.login form .input:-webkit-autofill:hover,
body.login form .input:-webkit-autofill:focus,
body.login form .input:-webkit-autofill:active,
body.login form input[type="text"]:-webkit-autofill,
body.login form input[type="text"]:-webkit-autofill:hover,
body.login form input[type="text"]:-webkit-autofill:focus,
body.login form input[type="text"]:-webkit-autofill:active,
body.login form input[type="password"]:-webkit-autofill,
body.login form input[type="password"]:-webkit-autofill:hover,
body.login form input[type="password"]:-webkit-autofill:focus,
body.login form input[type="password"]:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 30px #EDEDED inset !important;
	box-shadow: 0 0 0 30px #EDEDED inset !important;
	-webkit-text-fill-color: #000;
	transition: background-color 5000s ease-in-out 0s;
}

/* -------------------------------------------------------------------------
   Button – 420×65px, #00BB31, black text, 16px, semi-bold
   ------------------------------------------------------------------------- */

body.login form .button-primary,
body.login form input[type="submit"] {
	width: 420px;
	max-width: 100%;
	height: 65px;
	display: block;
	margin: 10px 0 0;
	padding: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 65px;
	color: #000;
	background: #00BB31;
	border: none;
	border-radius: 5px;
	box-shadow: none;
	cursor: pointer;
	font-family: inherit;
	text-shadow: none;
	transition: background 0.2s ease;
}

body.login form .button-primary:hover,
body.login form input[type="submit"]:hover {
	background: #00a32a;
}

body.login form .button-primary:focus,
body.login form input[type="submit"]:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 187, 49, 0.5);
}

/* -------------------------------------------------------------------------
   Hide default WP nav links (replaced by custom contact link)
   ------------------------------------------------------------------------- */

body.login #nav,
body.login #backtoblog {
	display: none;
}

/* -------------------------------------------------------------------------
   Contact link – 14px, regular, black, underline
   ------------------------------------------------------------------------- */

#psa-contact-link {
	width: 100%;
	max-width: 420px;
	text-align: center;
	margin-top: 65px;
}

#psa-contact-link a {
	color: #000;
	font-size: 14px;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 3px;
	font-family: inherit;
	transition: opacity 0.2s ease;
}

#psa-contact-link a:hover {
	opacity: 0.7;
}

/* -------------------------------------------------------------------------
   Messages & errors
   ------------------------------------------------------------------------- */

body.login .message,
body.login .success {
	width: 100%;
	max-width: 420px;
	box-sizing: border-box;
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: 5px;
	border-left: 4px solid #00BB31;
	background: #f0fdf4;
	color: #000;
	font-size: 14px;
}

/* Error appears below the button (moved there by JS); in flow so it’s always visible */
body.login #login_error {
	width: 100%;
	max-width: 420px;
	box-sizing: border-box;
	margin: 10px 0 0;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: 5px;
	border-left: 4px solid #dc2626;
	background: #fef2f2;
	color: #000;
	font-size: 13px;
	line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------------------- */

body.login a:focus-visible,
body.login input:focus-visible,
body.login .button-primary:focus-visible {
	outline: 2px solid #00BB31;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	body.login form .input,
	body.login form input,
	body.login form .button-primary,
	#psa-contact-link a {
		transition: none;
	}
}

/* =========================================================================
   Responsive breakpoints
   - Large (>1024px): untouched — original design
   - Tablet landscape (769px–1024px)
   - Tablet portrait (481px–768px)
   - Mobile (≤480px)
   ========================================================================= */

/* -------------------------------------------------------------------------
   Tablet landscape
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	body.login div#login {
		left: 40px;
		max-width: 540px;
		padding: 40px 32px;
	}

	body.login .psa-login-welcome-desc {
		max-width: 100%;
	}

	#psa-contact-link {
		margin-top: 40px;
	}
}

/* -------------------------------------------------------------------------
   Tablet portrait
   ------------------------------------------------------------------------- */

@media (max-width: 768px) {
	body.login {
		overflow-y: auto;
	}

	body.login div#login {
		position: relative;
		left: auto;
		top: auto;
		transform: none;
		max-width: 520px;
		max-height: none;
		margin: 40px auto;
		padding: 36px 28px;
		border-radius: 10px;
	}

	body.login .psa-login-welcome-title {
		font-size: 26px;
	}

	body.login .psa-login-welcome-desc {
		font-size: 14px;
	}

	body.login form {
		max-width: 100%;
	}

	body.login form .input,
	body.login form input[type="text"],
	body.login form input[type="password"] {
		width: 100%;
		height: 56px;
		line-height: 56px;
	}

	body.login form .button-primary,
	body.login form input[type="submit"] {
		width: 100%;
		height: 56px;
		line-height: 56px;
	}

	#psa-contact-link {
		max-width: 100%;
		margin-top: 32px;
	}

	body.login .message,
	body.login .success,
	body.login #login_error {
		max-width: 100%;
	}
}

/* -------------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------------- */

@media (max-width: 480px) {
	body.login div#login {
		margin: 0;
		max-width: 100%;
		min-height: 100vh;
		border-radius: 0;
		padding: 32px 20px;
		justify-content: center;
	}

	body.login h1 {
		margin-bottom: 12px;
	}

	body.login h1 a {
		width: 72px;
		height: 81px;
	}

	body.login .psa-login-welcome {
		margin-bottom: 20px;
	}

	body.login .psa-login-welcome-title {
		font-size: 22px;
	}

	body.login .psa-login-welcome-desc {
		font-size: 13px;
		line-height: 1.5;
	}

	body.login form .input,
	body.login form input[type="text"],
	body.login form input[type="password"] {
		height: 52px;
		line-height: 52px;
		font-size: 13px;
		margin-bottom: 10px;
	}

	body.login form .input::placeholder,
	body.login form input[type="text"]::placeholder,
	body.login form input[type="password"]::placeholder {
		font-size: 13px;
	}

	body.login form .button-primary,
	body.login form input[type="submit"] {
		height: 52px;
		line-height: 52px;
		font-size: 15px;
	}

	#psa-contact-link {
		margin-top: 24px;
	}

	#psa-contact-link a {
		font-size: 13px;
	}
}

