/**
 * Login / reset password card — values from the Figma section
 * "Login & Password Reset" (1600 / 834 / 393 frames).
 *
 * Selectors on inputs and buttons are deliberately specific enough to beat
 * the theme reset and WooCommerce's general stylesheet.
 */

.cbp-auth {
	--cbp-ink: #000000;
	--cbp-walnut: var(--e-global-color-text, #3E2C22);
	--cbp-walnut-dark: #2B1E17;
	--cbp-line: var(--e-global-color-primary, #EFE3CD);
	--cbp-field: #FAF5F4;
	--cbp-notice: var(--e-global-color-a68c46f, #F7F1E6);
	--cbp-error: #D00000;
	--cbp-success: #385E4A;
	--cbp-display: var(--e-global-typography-primary-font-family, "the-seasons"), Georgia, serif;
	--cbp-body: var(--e-global-typography-text-font-family, "helvetica-neue-lt-pro"), "Helvetica Neue", Helvetica, Arial, sans-serif;

	box-sizing: border-box;
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 64px 16px;
}

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

/* Card ------------------------------------------------------------------ */

.cbp-auth__card {
	display: flex;
	flex-direction: column;
	width: 456px;
	max-width: 100%;
	padding: 32px;
	border-radius: 32px;
	background: #FFFFFF;
	color: var(--cbp-ink);
	font-family: var(--cbp-body);
	font-size: 16px;
	font-weight: 300;
	line-height: 28px;
	text-align: left;
}

.cbp-auth .cbp-auth__mark {
	display: block;
	width: 40px;
	height: 40px;
	margin: 0 auto 32px;
}

.cbp-auth .cbp-auth__title {
	margin: 0;
	color: var(--cbp-ink);
	font-family: var(--cbp-display);
	font-size: 32px;
	font-weight: 300;
	line-height: 1.28;
	letter-spacing: 0;
	text-transform: none;
}

.cbp-auth .cbp-auth__intro {
	margin: 16px 0 0;
}

.cbp-auth a {
	color: var(--cbp-ink);
	text-decoration: none;
}

.cbp-auth a:hover {
	color: var(--cbp-walnut);
	text-decoration: underline;
}

/* Form ------------------------------------------------------------------ */

/* Beats WooCommerce's `.woocommerce form.login` box (border, padding, margin). */
.cbp-auth .cbp-auth__card form.cbp-auth__form {
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin: 32px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	text-align: left;
}

.cbp-auth .cbp-field {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.cbp-auth .cbp-field__label {
	margin: 0;
	color: var(--cbp-ink);
	font-size: 14px;
	font-weight: 300;
	line-height: 20px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cbp-auth .cbp-auth__form .cbp-field .cbp-input {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--cbp-line);
	border-radius: 8px;
	background: var(--cbp-field);
	box-shadow: none;
	color: var(--cbp-ink);
	font-family: var(--cbp-body);
	font-size: 16px;
	font-weight: 300;
	line-height: 28px;
	outline: none;
}

.cbp-auth .cbp-auth__form .cbp-field .cbp-input::placeholder {
	color: var(--cbp-ink);
	opacity: 0.5;
}

.cbp-auth .cbp-auth__form .cbp-field .cbp-input:focus-visible {
	border-color: var(--cbp-walnut);
	box-shadow: 0 0 0 3px rgba(62, 44, 34, 0.12);
}

.cbp-auth .cbp-auth__form .cbp-field--error .cbp-input {
	border-color: var(--cbp-error);
}

/* Sits in the gap above the button, so the card does not grow (as designed). */
.cbp-auth .cbp-field__error {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 4px;
	color: var(--cbp-error);
	font-size: 12px;
	line-height: 20px;
}

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

/* Login: forgot link sits 16px above the button instead of 32px. */
.cbp-auth .cbp-auth__forgot {
	margin: 0 0 -16px;
	text-align: right;
}

.cbp-auth .cbp-auth__footnote {
	margin: 16px 0 0;
	text-align: center;
}

.cbp-auth .cbp-auth__footnote a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Button ---------------------------------------------------------------- */

.cbp-auth .cbp-auth__card .cbp-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 47px;
	margin: 0;
	padding: 0 46px;
	border: 0;
	border-radius: 24px;
	background: var(--cbp-walnut);
	box-shadow: none;
	color: #FFFFFF;
	font-family: var(--cbp-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 0;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

.cbp-auth .cbp-auth__card .cbp-button:hover {
	background: var(--cbp-walnut-dark);
	color: #FFFFFF;
	text-decoration: none;
}

.cbp-auth .cbp-auth__card .cbp-button:focus-visible {
	outline: 2px solid var(--cbp-walnut);
	outline-offset: 3px;
}

.cbp-auth .cbp-auth__card .cbp-button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

/* Confirmation screen: the button follows the intro text directly. */
.cbp-auth .cbp-auth__card > a.cbp-button {
	margin-top: 32px;
}

@media (prefers-reduced-motion: no-preference) {
	.cbp-auth .cbp-auth__card .cbp-button,
	.cbp-auth .cbp-auth__form .cbp-field .cbp-input {
		transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	}
}

/* WooCommerce notices inside the card ----------------------------------- */

.cbp-auth .woocommerce-error,
.cbp-auth .woocommerce-message,
.cbp-auth .woocommerce-info,
.cbp-auth .wc-block-components-notice-banner {
	margin: 24px 0 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--cbp-notice);
	color: var(--cbp-ink);
	font-size: 14px;
	line-height: 22px;
	list-style: none;
}

.cbp-auth .woocommerce-error {
	background: #FBECEC;
	color: var(--cbp-error);
}

.cbp-auth .woocommerce-error::before,
.cbp-auth .woocommerce-message::before,
.cbp-auth .woocommerce-info::before {
	content: none;
}

.cbp-auth .woocommerce-error li {
	margin: 0;
	padding: 0;
}

.cbp-auth .woocommerce-error strong {
	font-weight: 400;
}

.cbp-auth .wc-block-components-notice-banner > svg {
	display: none;
}

/* WooCommerce password strength meter ----------------------------------- */

.cbp-auth .woocommerce-password-strength {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cbp-walnut);
	font-size: 12px;
	font-weight: 400;
	line-height: 20px;
	text-align: left;
}

.cbp-auth .woocommerce-password-strength.short,
.cbp-auth .woocommerce-password-strength.bad {
	color: var(--cbp-error);
}

.cbp-auth .woocommerce-password-strength.strong {
	color: var(--cbp-success);
}

.cbp-auth .woocommerce-password-hint {
	display: block;
	color: var(--cbp-ink);
	font-size: 12px;
	line-height: 18px;
	opacity: 0.6;
}

/* Tablet & mobile ------------------------------------------------------- */

@media (max-width: 1024px) {
	.cbp-auth .cbp-auth__title {
		font-size: 28px;
	}
}

/* The Elementor container already gives the site's 20px mobile margin. */
@media (max-width: 767px) {
	.cbp-auth {
		padding: 48px 0;
	}

	.cbp-auth .cbp-auth__title {
		font-size: 22px;
	}
}
