/* Better Homes: My account, signed out (woocommerce/myaccount/form-login.php, assets/js/account-page.js). */

.bh-auth {
	--bh-ink: #242424;
	--bh-muted: #6b6b6b;
	--bh-line: #d9d9d9;
	--bh-accent: var(--wd-primary-color, #370d1d);
	--bh-error: #c4314b;
	width: 100%;
	max-width: 520px;
	margin: 10px auto 60px;
	font-family: "Poppins", "Poppins Fallback", Arial, Helvetica, sans-serif;
	color: var(--bh-ink);
}

.bh-auth *,
.bh-auth *::before,
.bh-auth *::after {
	box-sizing: border-box;
}

/* ---------- Tabs ---------- */
.bh-auth__tabs {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: -1px; /* sits on the card's top border */
	padding: 0 18px;
}

.bh-auth .bh-auth__tab {
	position: relative;
	min-height: 50px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid transparent;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	background: var(--bh-brand-soft, #f7f0f3);
	box-shadow: none;
	color: var(--bh-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}

.bh-auth .bh-auth__tab:hover {
	background: var(--bh-brand-soft-2, #f1e4ea);
	color: var(--bh-ink);
}

.bh-auth .bh-auth__tab[aria-selected="true"] {
	z-index: 1;
	border-color: #e6e4dc;
	background: #fff;
	color: var(--bh-accent);
}

/* The selected tab joins the card (covers the card's top border). */
.bh-auth .bh-auth__tab[aria-selected="true"]::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 2px;
	background: #fff;
}

.bh-auth .bh-auth__tab:focus-visible {
	outline: 2px solid var(--bh-ink);
	outline-offset: -4px;
}

/* ---------- Card ---------- */
.bh-auth__card {
	position: relative;
	padding: 26px 28px 30px;
	border: 1px solid #e6e4dc;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.bh-auth__panel[hidden] {
	display: none;
}

.bh-auth__panel.is-in {
	animation: bh-auth-in .3s ease;
}

@keyframes bh-auth-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

.bh-auth__title {
	margin: 0 0 18px;
	color: var(--bh-ink);
	font-family: inherit;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-transform: none;
}

.bh-auth__perks {
	display: grid;
	gap: 10px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
	color: #444;
	font-size: 14px;
	line-height: 1.5;
}

.bh-auth__perks li {
	position: relative;
	margin: 0;
	padding-left: 30px;
	list-style: none;
}

.bh-auth__perks li::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--bh-brand-soft, #f7f0f3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%235e7153' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.bh-auth__perks strong {
	color: var(--bh-ink);
	font-weight: 600;
}

/* ---------- Fields: the label sits inside and floats up when typing ---------- */
.bh-auth__form {
	margin: 0;
}

.bh-auth__pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.bh-field {
	position: relative;
	margin: 0 0 14px;
}

.bh-auth .bh-field__input {
	display: block;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 22px 16px 6px;
	border: 1px solid var(--bh-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--bh-ink);
	font-family: inherit;
	font-size: 16px; /* no zoom on iPhones */
	line-height: 1.3;
	transition: border-color .2s ease, box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bh-field--password .bh-field__input {
	padding-right: 52px;
}

.bh-auth .bh-field__input:hover {
	border-color: #b9b9b9;
}

.bh-auth .bh-field__input:focus {
	border-color: var(--bh-accent);
	box-shadow: 0 0 0 3px rgba(55, 13, 29, .15);
	outline: none;
}

.bh-field__label {
	position: absolute;
	top: 18px;
	left: 17px;
	margin: 0;
	color: var(--bh-muted);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
	pointer-events: none;
	transform-origin: left top;
	transition: transform .18s ease, color .18s ease;
}

.bh-field__input:focus + .bh-field__label,
.bh-field__input:not(:placeholder-shown) + .bh-field__label,
.bh-field__input:-webkit-autofill + .bh-field__label {
	color: var(--bh-muted);
	transform: translateY(-10px) scale(.75);
}

.bh-field__input:focus + .bh-field__label {
	color: var(--bh-accent);
}

.bh-field.is-invalid .bh-field__input {
	border-color: var(--bh-error);
}

.bh-field.is-invalid .bh-field__input:focus {
	box-shadow: 0 0 0 3px rgba(196, 49, 75, .14);
}

.bh-field.is-invalid .bh-field__label {
	color: var(--bh-error);
}

.bh-field.is-valid .bh-field__input {
	border-color: var(--bh-brand-line, #e5d3da);
}

.bh-field__error {
	margin: 6px 2px 0;
	color: var(--bh-error);
	font-size: 13px;
	line-height: 1.4;
	animation: bh-auth-in .2s ease;
}

.bh-field__error[hidden] {
	display: none;
}

/* Show / hide password */
.bh-auth .bh-auth__eye {
	position: absolute;
	top: 6px;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-width: 44px;
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: var(--bh-ink);
	cursor: pointer;
}

.bh-auth .bh-auth__eye:hover {
	background: var(--bh-brand-soft, #f7f0f3);
}

.bh-auth .bh-auth__eye:focus-visible {
	outline: 2px solid var(--bh-ink);
	outline-offset: -2px;
}

.bh-auth__eye[aria-pressed="true"] .bh-auth__eye-slash {
	display: none;
}

/* Password rules: tick as they are met */
.bh-auth__rules {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: -4px 0 14px;
	padding: 0;
	list-style: none;
	color: var(--bh-muted);
	font-size: 13px;
}

.bh-auth__rules li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	list-style: none;
	transition: color .2s ease;
}

.bh-auth__rules li::before {
	content: "";
	width: 14px;
	height: 14px;
	border: 1.5px solid #c4c4c4;
	border-radius: 50%;
	transition: background .2s ease, border-color .2s ease;
}

.bh-auth__rules li.is-met {
	color: var(--bh-accent);
}

.bh-auth__rules li.is-met::before {
	border-color: var(--bh-accent);
	background: var(--bh-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ---------- Row: keep me signed in | forgotten password ---------- */
.bh-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 2px 0 20px;
	font-size: 14px;
}

.bh-auth__check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--bh-ink);
	font-weight: 400;
	cursor: pointer;
}

.bh-auth__check input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--bh-accent);
}

.bh-auth__link {
	color: var(--bh-ink);
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 4px;
}

.bh-auth__link:hover {
	color: var(--bh-accent);
}

.bh-auth__note,
.bh-auth__legal {
	margin: 0 0 16px;
	color: #555;
	font-size: 12.5px;
	line-height: 1.55;
}

.bh-auth__legal:empty {
	display: none;
}

.bh-auth__legal .woocommerce-privacy-policy-text:empty {
	display: none;
}

.bh-auth__legal p {
	margin: 0 0 8px;
}

.bh-auth__legal a {
	color: var(--bh-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Buttons ---------- */
.bh-auth .bh-auth__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: var(--btn-default-brd-radius, 5px); /* the site's button corners */
	background: #d9d9d9;
	box-shadow: none;
	color: #8a8a8a;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background .25s ease, color .25s ease, transform .15s ease;
}

/* Filled in: the button turns to the brand colour. */
.bh-auth__form.is-ready .bh-auth__submit {
	background: var(--btn-accented-bgcolor, var(--bh-accent));
	color: var(--btn-accented-color, #fff);
}

.bh-auth__form.is-ready .bh-auth__submit:hover {
	filter: brightness(1.06);
}

.bh-auth .bh-auth__submit:active {
	transform: scale(.99);
}

.bh-auth .bh-auth__submit svg {
	transition: transform .2s ease;
}

.bh-auth__form.is-ready .bh-auth__submit:hover svg {
	transform: translateX(3px);
}

.bh-auth .bh-auth__submit:focus-visible {
	outline: 2px solid var(--bh-ink);
	outline-offset: 3px;
}

.bh-auth__form.is-sending .bh-auth__submit {
	opacity: .7;
	pointer-events: none;
}

.bh-auth__or {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 22px 0;
	color: var(--bh-muted);
	font-size: 14px;
}

.bh-auth__or::before,
.bh-auth__or::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #dedede;
}

.bh-auth .bh-auth__google {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 20px;
	border: 1.5px solid var(--bh-ink);
	border-radius: var(--btn-default-brd-radius, 5px); /* the site's button corners */
	background: #fff;
	box-shadow: none;
	color: var(--bh-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: background .2s ease;
}

a.bh-auth__google:hover {
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-ink);
}

/* Greyed out until the Google sign-in details are added in the Customizer. */
.bh-auth .bh-auth__google[disabled] {
	border-color: #d6d6d6;
	color: #9a9a9a;
	cursor: not-allowed;
}

.bh-auth__google[disabled] .bh-auth__g {
	filter: grayscale(1);
	opacity: .55;
}

.bh-auth__soon {
	padding: 2px 8px;
	border-radius: 999px;
	background: #efefef;
	color: #777;
	font-size: 11px;
	font-weight: 600;
}

/* ---------- Messages inside the card (inc/account-page.php: bh_auth_notices_html) ---------- */
.bh-alerts {
	display: grid;
	gap: 10px;
	margin: 0 0 20px;
}

.bh-alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.55;
	animation: bh-alert-in .35s cubic-bezier(.22, .61, .36, 1);
	transition: opacity .25s ease, transform .25s ease;
}

.bh-alert--error {
	border-color: #f1c7cf;
	background: #fdf3f5;
	color: #5c1020;
}

.bh-alert--success {
	border-color: var(--bh-brand-line, #e5d3da);
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-brand, #370d1d);
}

.bh-alert--notice {
	border-color: #e3e1d8;
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-ink);
}

.bh-alert__icon {
	flex: 0 0 auto;
	margin-top: 0;
}

.bh-alert--error .bh-alert__icon {
	color: var(--bh-error);
}

.bh-alert--success .bh-alert__icon {
	color: var(--bh-accent);
}

.bh-alert__text {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 1px;
	overflow-wrap: anywhere;
}

.bh-alert__text strong {
	font-weight: 600;
}

.bh-alert__text a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bh-alert__text a:hover {
	color: var(--bh-accent);
}

.bh-alerts.is-leaving .bh-alert {
	opacity: 0;
	transform: translateY(-4px);
}

@keyframes bh-alert-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
}

/* ---------- Phones ---------- */
@media (max-width: 575px) {
	.bh-auth {
		margin-top: 0;
	}

	.bh-auth__tabs {
		gap: 6px;
		padding: 0 10px;
	}

	.bh-auth .bh-auth__tab {
		min-height: 48px;
		font-size: 14px;
	}

	.bh-auth__card {
		padding: 22px 16px 24px;
		border-radius: 12px;
	}

	.bh-auth__title {
		font-size: 22px;
	}

	.bh-auth__pair {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bh-auth *,
	.bh-auth *::before,
	.bh-auth *::after {
		animation: none !important;
		transition: none !important;
	}
}
