/*
 * Login (guest view of /my-account/) and lost-password
 * (/my-account/lost-password/) form styling - matches the look applied to
 * the Ultimate Member login/register forms (see um-forms.css) so the
 * site's auth pages are visually consistent.
 *
 * Scoped to WooCommerce's own standard class names (.woocommerce-form-login,
 * .woocommerce-ResetPassword, .woocommerce-Input, etc.) and the theme's
 * existing .account-container/.account-login-inner wrapper - nothing here
 * is a plugin/template override, so a WooCommerce update shouldn't affect
 * it. Only enqueued on the account page for logged-out visitors (see
 * custom_enqueue_scripts() in functions.php) - this markup only ever
 * renders for guests anyway (WooCommerce shows the account dashboard
 * instead once logged in), so it can't affect the logged-in view.
 */

/* ---------------- Card wrapper ---------------- */
/* The theme's own .container can behave inconsistently here (it's forced
   to max-width:100% at some breakpoints, and the exact display/float
   context of these two elements isn't guaranteed) - centered with flexbox
   on a wrapper we control, plus block/float/margin forced with !important
   as a second line of defense, rather than relying on plain "margin: auto"
   alone actually centering correctly in whatever context it lands in. */
.page-wrapper.my-account .container {
	display: flex !important;
	justify-content: center !important;
}
.page-wrapper.my-account .container > .woocommerce {
	flex: 0 1 auto;
	width: 100%;
	max-width: 440px;
}

/* /my-account/ (guest view) already has this wrapper div - turn it into a
   proper card instead of bare, left-aligned text. */
.account-container.lightbox-inner {
	display: block !important;
	float: none !important;
	width: 100% !important;
	max-width: 440px !important;
	margin: 20px auto !important;
	padding: 32px 36px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
}
.account-login-inner h2 {
	margin-top: 0;
	margin-bottom: 24px;
	color: #1a1a1a;
}

/* /my-account/lost-password/ has no wrapper div at all - the form element
   itself becomes the card. */
form.woocommerce-ResetPassword {
	display: block !important;
	float: none !important;
	width: 100% !important;
	max-width: 440px !important;
	margin: 20px auto !important;
	padding: 32px 36px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
}
form.woocommerce-ResetPassword > p:first-child {
	margin-top: 0;
	color: #5a5a5a;
	font-size: 14px;
	line-height: 1.5;
}

@media (max-width: 500px) {
	.account-container.lightbox-inner,
	form.woocommerce-ResetPassword {
		padding: 22px 18px;
		border-radius: 6px;
		margin: 10px auto;
	}
}

/* ---------------- Form rows / labels ---------------- */
/* WooCommerce's classic form-row-first/form-row-last classes are meant for
   two fields sitting side by side (e.g. City/State) and default to ~50%
   width with a float - the lost-password field uses form-row-first with no
   paired form-row-last next to it, so it was rendering at half width for
   no reason. Force every row here to the full card width regardless of
   which of those classes WooCommerce happened to put on it. */
.woocommerce-form-login .form-row,
.woocommerce-ResetPassword .form-row {
	width: 100% !important;
	float: none !important;
	clear: both;
	margin-bottom: 18px;
}
.woocommerce-form-login .form-row label,
.woocommerce-ResetPassword .form-row label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #1a1a1a;
	margin-bottom: 6px;
}
.woocommerce-form-login .required,
.woocommerce-ResetPassword .required {
	color: #ED1B24;
	text-decoration: none;
}

/* ---------------- Inputs ---------------- */
.woocommerce-form-login .woocommerce-Input,
.woocommerce-ResetPassword .woocommerce-Input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	font-size: 14px;
	color: #1a1a1a;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.woocommerce-form-login .woocommerce-Input:focus,
.woocommerce-ResetPassword .woocommerce-Input:focus {
	border-color: #ED1B24;
	box-shadow: 0 0 0 3px rgba(237, 27, 36, 0.12);
	outline: none;
}

/* ---------------- Remember me checkbox ---------------- */
.woocommerce-form-login__rememberme {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	color: #4a4a4a;
	margin-bottom: 16px;
	cursor: pointer;
}
.woocommerce-form-login__rememberme input {
	margin: 0;
}

/* ---------------- Buttons ---------------- */
.woocommerce-form-login__submit,
.woocommerce-ResetPassword button[type="submit"] {
	width: 100% !important;
	background-color: #ED1B24 !important;
	border: none !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 16px;
	height: 48px;
	padding: 0 28px;
	box-sizing: border-box;
	border-radius: 6px !important;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.woocommerce-form-login__submit:hover,
.woocommerce-ResetPassword button[type="submit"]:hover {
	background-color: #c9151d !important;
}

/* ---------------- Lost password link ---------------- */
.woocommerce-LostPassword {
	margin-top: 16px;
	margin-bottom: 0;
}
.woocommerce-LostPassword a {
	color: #ED1B24;
	font-size: 13.5px;
}
.woocommerce-LostPassword a:hover {
	text-decoration: underline;
}

/* ---------------- Validation errors ---------------- */
/* WooCommerce prints these as a plain unstyled <ul class="woocommerce-error">
   list at the top of the page - give it the same treatment as the UM error
   box so both login flows look consistent. */
.woocommerce-error {
	background: #C74A4A;
	color: #fff;
	border-radius: 6px;
	padding: 14px 18px;
	margin: 0 auto 20px;
	max-width: 440px;
	list-style: none;
	font-size: 13.5px;
}
.woocommerce-error li {
	margin: 0;
}
