/* ==========================================================================
   WEST · login lightbox — tracking.west-hn.com
   Same component as instrument.west-hn.com, retuned to this site's tokens:
   navy panel, blue accents, 12/9px radii (--wes-radius-md / --wes-radius-sm).
   Change the block below only; the rest of the file never hard-codes a colour.
   ========================================================================== */
:root {
	--lm-brand: #1E6AE0;        /* theme color_primary is #2F7CF6; the darker step passes AA for 11-13px text */
	--lm-brand-dark: #155BB5;   /* --wes-blue-link */
	--lm-brand-weak: #EAF2FE;   /* --wes-tint-1 */
	--lm-ink: #222222;          /* --wes-ink */
	--lm-ink-2: #5A6675;        /* --wes-text-2 */
	--lm-ink-3: #8B98AB;        /* --wes-text-3 */
	--lm-rule: #E3E9F2;         /* --wes-line */
	--lm-rule-2: #C9CDD4;
	--lm-panel: #10233B;        /* --wes-navy */
	--lm-r: 12px;               /* --wes-radius-md */
	--lm-r-sm: 9px;             /* --wes-radius-sm */
}


/* ---------- shell ------------------------------------------------------- */
#login-form-popup {
	position: relative;
	background: transparent;
	padding: 0;
	box-shadow: none;
	max-width: none;
	text-align: left;
	color: var(--lm-ink);
	font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#login-form-popup .woocommerce { margin: 0; }

#login-form-popup .account-container {
	position: relative;
	width: 940px;
	max-width: calc(100vw - 48px);
	margin: 0 auto;
	padding: 0;
	background: #fff;
	border: 1px solid var(--lm-rule-2);
	box-shadow: 0 24px 60px -18px rgba(16, 35, 59, .35);
	border-radius: var(--lm-r);
	overflow: hidden;
}

#login-form-popup .col2-set {
	display: flex !important;
	flex-wrap: nowrap;
	align-items: stretch;
	margin: 0 !important;
	width: 100%;
	border: 0;
	background: none;
}

/* ---------- left pane : brand + recommendations ------------------------- */
#login-form-popup .col2-set > .col-1.wes-lm-col {
	flex: 0 0 360px;
	width: 360px;
	max-width: 360px;
	margin: 0;
	padding: 0 !important;
	position: relative;
	display: flex;
	flex-direction: column;
}

/* the theme column is a centred flex column (align-items:center), which would
   shrink the panel to its content width — force it to fill the 360px track */
#login-form-popup .col2-set > .col-1.wes-lm-col {
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
}

#login-form-popup .wes-lm-panel {
	width: 100%;
	max-width: none;
	margin: 0;
	box-sizing: border-box;
}

#login-form-popup .wes-lm-bg {
	position: absolute;
	inset: 0;
	background: var(--lm-panel) !important;
}

/* faint 44px grid, same texture family as the rest of the site */
#login-form-popup .wes-lm-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 44px 44px;
	pointer-events: none;
}

#login-form-popup .wes-lm-panel {
	position: relative;
	z-index: 1;
	padding: 34px 32px 30px !important;
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	text-align: left !important;
	color: #fff;
	min-height: 100%;
}

#login-form-popup .wes-lm-brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

#login-form-popup .wes-lm-mark {
	width: 26px;
	height: 26px;
	border: 1px solid rgba(255, 255, 255, .45);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	line-height: 1;
	letter-spacing: .04em;
	color: #fff;
}

#login-form-popup .wes-lm-word {
	font-size: 11.5px;
	line-height: 1;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .86);
}

#login-form-popup .wes-lm-title {
	margin: 24px 0 0 !important;
	padding: 0;
	font-size: 27px !important;
	line-height: 1.15;
	font-weight: 400 !important;
	letter-spacing: -.01em;
	text-transform: none !important;
	color: #fff !important;
}

#login-form-popup .wes-lm-lede {
	margin: 10px 0 0 !important;
	padding: 0;
	font-size: 13px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .72);
	max-width: 30ch;
}

/* recommendation groups */
#login-form-popup .wes-lm-groups { margin-top: 22px; }

#login-form-popup .wes-lm-group + .wes-lm-group { margin-top: 18px; }

#login-form-popup .wes-lm-label {
	font-size: 10px;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .58);
}

#login-form-popup .wes-lm-group ul {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	border-top: 1px solid rgba(255, 255, 255, .2);
}

#login-form-popup .wes-lm-group li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .14);
	list-style: none;
}

#login-form-popup .wes-lm-group li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0;
	font-size: 12.5px;
	line-height: 1.35;
	color: rgba(255, 255, 255, .92);
	text-decoration: none;
	transition: color .15s;
}

/* drawn arrows: the text glyph renders as a thin dash in the fallback font */
#login-form-popup .wes-lm-group li a i {
	position: relative;
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	font-style: normal;
	color: rgba(255, 255, 255, .62);
	transition: transform .16s, color .16s;
}

#login-form-popup .wes-lm-group li a i::before {
	content: "";
	position: absolute;
	left: 0;
	right: 1px;
	top: 6px;
	height: 1px;
	background: currentColor;
}

#login-form-popup .wes-lm-group li a i::after {
	content: "";
	position: absolute;
	right: 0;
	top: 3px;
	width: 6px;
	height: 6px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
}

#login-form-popup .wes-lm-group li a:hover { color: #fff; }

#login-form-popup .wes-lm-group li a:hover i {
	color: #fff;
	transform: translateX(3px);
}

/* register CTA */
#login-form-popup .wes-lm-cta {
	margin-top: auto;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 20px;
	border: 1px solid rgba(255, 255, 255, .55);
	color: #fff !important;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .16s, border-color .16s;
}

#login-form-popup .wes-lm-cta:hover {
	background: rgba(255, 255, 255, .14);
	border-color: #fff;
}

/* keep a gap above the CTA when the panel is short */
#login-form-popup .wes-lm-groups + .wes-lm-cta { margin-top: 26px; }

/* ---------- right pane : form ------------------------------------------- */
#login-form-popup .col2-set > .col-2.wes-lm-formcol {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0 !important;
	background: #fff;
}

#login-form-popup .account-login-inner.inner-padding {
	padding: 40px 44px 28px !important;
	display: flex !important;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

#login-form-popup .wes-lm-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 10.5px;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--lm-ink-3);
}

#login-form-popup .wes-lm-eyebrow::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--lm-rule);
}

#login-form-popup .wes-lm-formtitle {
	margin: 14px 0 6px !important;
	padding: 0;
	font-size: 26px !important;
	line-height: 1.18;
	font-weight: 400 !important;
	letter-spacing: -.01em;
	text-transform: none !important;
	color: var(--lm-ink) !important;
}

#login-form-popup .wes-lm-formsub {
	margin: 0 0 24px !important;
	padding: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--lm-ink-2);
}

/* login error copied from the page into the card */
#login-form-popup .wes-lm-alerts:empty { display: none; }

#login-form-popup .wes-lm-alerts { margin: 0 0 18px; }

#login-form-popup .wes-lm-alert {
	list-style: none;
	margin: 0;
	padding: 11px 14px;
	background: #FDF3F3;
	border-left: 3px solid #C0392B;
	border-radius: var(--lm-r-sm);
	font-size: 13px;
	line-height: 1.45;
	color: #8C2F24;
}

#login-form-popup .wes-lm-alert li {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: #8C2F24;
}

/* fields */
#login-form-popup .woocommerce-form-row,
#login-form-popup .form-row {
	margin: 0 0 16px !important;
	padding: 0 !important;
}

#login-form-popup .woocommerce-form-row label {
	display: block;
	margin: 0 0 8px;
	font-size: 10.5px;
	line-height: 1.2;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--lm-ink-2);
}

#login-form-popup .woocommerce-form-row label .required {
	color: var(--lm-brand) !important;
	text-decoration: none;
	font-weight: 500;
}

#login-form-popup .woocommerce-Input,
#login-form-popup input.input-text {
	width: 100%;
	height: 48px;
	min-height: 48px;
	padding: 0 14px !important;
	margin: 0 !important;
	font-size: 14.5px;
	line-height: 46px;
	color: var(--lm-ink);
	background: #fff;
	border: 1px solid var(--lm-rule-2) !important;
	border-radius: var(--lm-r-sm) !important;
	box-shadow: none !important;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}

#login-form-popup .woocommerce-Input:focus,
#login-form-popup input.input-text:focus {
	border-color: var(--lm-brand) !important;
	box-shadow: 0 0 0 3px var(--lm-brand-weak) !important;
}

/* remember me + lost password */
#login-form-popup .wes-lm-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 2px 0 22px;
}

#login-form-popup .wes-lm-meta .woocommerce-form__label {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--lm-ink-2);
	cursor: pointer;
}

#login-form-popup .wes-lm-meta input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin: 0;
	background: #fff;
	border: 1px solid var(--lm-rule-2);
	border-radius: 2px;
	position: relative;
	cursor: pointer;
	box-shadow: none;
}

#login-form-popup .wes-lm-meta input[type="checkbox"]:checked {
	background: var(--lm-brand);
	border-color: var(--lm-brand);
}

#login-form-popup .wes-lm-meta input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 4.5px;
	top: 1.5px;
	width: 5px;
	height: 9px;
	border: 1.5px solid #fff;
	border-top: 0;
	border-left: 0;
	transform: rotate(42deg);
}

#login-form-popup .wes-lm-meta input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--lm-brand);
	outline-offset: 2px;
}

#login-form-popup .wes-lm-lost {
	font-size: 13px;
	color: var(--lm-brand);
	text-decoration: none;
	white-space: nowrap;
}

#login-form-popup .wes-lm-lost:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* submit */
#login-form-popup .wes-lm-actions { margin: 0 !important; }

#login-form-popup .woocommerce-form-login__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 50px;
	min-height: 50px;
	padding: 0 18px !important;
	margin: 0 !important;
	background: var(--lm-brand) !important;
	border: 1px solid var(--lm-brand) !important;
	border-radius: var(--lm-r) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	letter-spacing: .1em;
	text-transform: uppercase;
	transition: background .16s, border-color .16s;
}

#login-form-popup .woocommerce-form-login__submit:hover {
	background: var(--lm-brand-dark) !important;
	border-color: var(--lm-brand-dark) !important;
}

#login-form-popup .wes-lm-arrow {
	position: relative;
	width: 16px;
	height: 16px;
	transition: transform .16s;
}

#login-form-popup .wes-lm-arrow::before {
	content: "";
	position: absolute;
	left: 0;
	right: 1px;
	top: 7px;
	height: 1px;
	background: currentColor;
}

#login-form-popup .wes-lm-arrow::after {
	content: "";
	position: absolute;
	right: 0;
	top: 4px;
	width: 7px;
	height: 7px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
}

#login-form-popup .woocommerce-form-login__submit:hover .wes-lm-arrow {
	transform: translateX(3px);
}

/* quote link pinned to the bottom of the form pane */
#login-form-popup .wes-lm-foot {
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--lm-rule);
	font-size: 10.5px;
	line-height: 1.4;
	letter-spacing: .1em;
	text-transform: uppercase;
}

#login-form-popup .wes-lm-foot a {
	color: var(--lm-ink);
	text-decoration: none;
}

#login-form-popup .wes-lm-foot a:hover { color: var(--lm-brand); }

/* ---------- close button ------------------------------------------------ */
/* The theme puts its own .mfp-close outside the card (close_btn_inside=false);
   the template now renders .wes-lm-close inside the card and calls the
   lightbox API, so the theme button is hidden for this popup only. */
.mfp-wrap:has(#login-form-popup) .mfp-close { display: none !important; }

#login-form-popup .wes-lm-close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 6;
	width: 52px;
	height: 52px;
	padding: 0;
	margin: 0;
	background: #fff;
	border: 0;
	border-left: 1px solid var(--lm-rule);
	border-bottom: 1px solid var(--lm-rule);
	color: var(--lm-ink-2);
	font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: background .15s, color .15s;
}

#login-form-popup .wes-lm-close:hover {
	background: #F4F6F4;
	color: var(--lm-ink);
}

#login-form-popup .wes-lm-close:focus-visible {
	outline: 2px solid var(--lm-brand);
	outline-offset: -4px;
}

/* the close square sits over the top-right corner: keep the eyebrow rule clear */
#login-form-popup .wes-lm-eyebrow { padding-right: 56px; }

/* the floating contact bubble would sit on top of the form */
body:has(.mfp-container #login-form-popup:not(.mfp-hide)) .wes-cp {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* the popup can be taller than short viewports: allow the lightbox to scroll */
.mfp-content:has(> #login-form-popup) {
	max-height: 100vh;
	overflow-y: auto;
}

/* ---------- compact / mobile ------------------------------------------- */
@media (max-width: 849px) {
	/* full-bleed sheet: the lightbox container itself carries padding */
	.mfp-container:has(#login-form-popup) { padding: 0 !important; }

	/* Magnific centres content with an inline-block ::before that is 100% tall;
	   with a block-level content box that pseudo element pushes the sheet down
	   by a full viewport, so drop it. */
	.mfp-container:has(#login-form-popup)::before { display: none !important; }

	.mfp-content:has(> #login-form-popup) {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		transform: none !important;
	}

	#login-form-popup { width: 100%; }

	#login-form-popup .account-container {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		min-height: 100vh;
		border: 0;
		box-shadow: none;
	}

	/* stack the two panes and let the form pane absorb the remaining height,
	   so the quote link sits at the bottom of the sheet */
	#login-form-popup .col2-set {
		display: flex !important;
		flex-direction: column;
		flex: 1 1 auto;
	}

	#login-form-popup .col2-set > .col-1.wes-lm-col {
		flex: 0 0 auto;
		width: 100%;
		max-width: none;
	}

	#login-form-popup .col2-set > .col-2.wes-lm-formcol {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		width: 100%;
	}

	#login-form-popup .account-login-inner.inner-padding { flex: 1 1 auto; }


	#login-form-popup .wes-lm-panel { padding: 22px 20px 20px !important; }

	#login-form-popup .wes-lm-title { margin-top: 14px !important; font-size: 21px !important; }

	#login-form-popup .wes-lm-lede,
	#login-form-popup .wes-lm-groups { display: none; }

	#login-form-popup .wes-lm-cta {
		margin-top: 16px;
		height: 40px;
	}

	#login-form-popup .wes-lm-groups + .wes-lm-cta { margin-top: 16px; }

	#login-form-popup .account-login-inner.inner-padding {
		padding: 24px 20px max(26px, calc(env(safe-area-inset-bottom, 0px) + 18px)) !important;
	}

	#login-form-popup .wes-lm-formtitle { font-size: 22px !important; }

	#login-form-popup .wes-lm-meta { flex-wrap: wrap; gap: 10px; }

	#login-form-popup .wes-lm-close { width: 44px; height: 44px; }

	#login-form-popup .wes-lm-foot { margin-top: auto; }
}

/* short laptops: trim vertical rhythm so the card still fits */
@media (min-width: 850px) and (max-height: 720px) {
	#login-form-popup .wes-lm-panel { padding-top: 26px !important; padding-bottom: 24px !important; }
	#login-form-popup .wes-lm-lede { display: none; }
	#login-form-popup .wes-lm-group li a { padding: 7px 0; }
	#login-form-popup .account-login-inner.inner-padding { padding-top: 30px !important; }
}

/* ---------- close button ownership (site port) --------------------------- */
/* Flatsome runs the lightbox with closeBtnInside=false, so Magnific appends its
   own close button next to the card. This card renders .wes-lm-close instead, so
   the theme button is hidden for this popup only (other lightboxes untouched). */
.mfp-wrap:has(#login-form-popup) > .mfp-close,
.mfp-container:has(#login-form-popup) .mfp-close,
.mfp-wrap:has(#login-form-popup) .mfp-close { display: none !important; }

/* the card's own close square keeps the card's top-right radius */
#login-form-popup .wes-lm-close {
	border-radius: 0 var(--lm-r) 0 0 !important;
	box-shadow: none !important;
}
