/* =====================================================================
 * WonderLab Account Suite — login / register / lost-password forms.
 *
 * Built on the same design tokens as the CartFlow checkout so the brand
 * reads as one continuous experience from /my-account/ to /cart/ to /checkout/.
 *
 * Design tokens
 *   terra      #851625   accent / primary
 *   terra-dk   #5E0F1A   hover, active
 *   terra-mid  #E8A9B8   hover stroke
 *   terra-lt   #F7E8EC
 *   terra-pale #FDF4F6   panel wash
 *   ivory      #FFFBF1   page background
 *   ink        #2E2E2E   primary copy
 *   ink-soft   #8C7678   secondary copy / placeholders
 *   rule-dark  rgba(133,22,37,0.18)  input border
 *
 * Font: Geologica (loaded by Divi parent / cartflow), system fallback.
 * Inputs: 44px, 8px radius, 3px terra focus ring.
 * ===================================================================== */


:root {
	--was-terra: #851625;
	--was-terra-dk: #5e0f1a;
	--was-terra-mid: #e8a9b8;
	--was-terra-lt: #f7e8ec;
	--was-terra-pale: #fdf4f6;
	--was-ivory: #fffbf1;
	--was-ivory-dark: #f7f0e6;
	--was-ink: #2e2e2e;
	--was-ink-mid: #5a4a4c;
	--was-ink-soft: #8c7678;
	--was-rule: rgba(133, 22, 37, 0.10);
	--was-rule-dark: rgba(133, 22, 37, 0.18);
	--was-radius-sm: 4px;
	--was-radius: 8px;
	--was-radius-lg: 14px;
	--was-red: #b83232;
	--was-green: #2e7d32;
}


/* ---------------------------------------------------------------------
 * Shell — applies on any non-logged-in My Account page + the dedicated
 * lost-password page. The plugin adds `wl-account-body` to <body> on
 * those pages so we can take Divi's section chrome out of the equation.
 * --------------------------------------------------------------------- */

body.wl-account-body,
body.wl-account-body .woocommerce,
body.wl-account-body .woocommerce-account {
	background: var(--was-ivory) !important;
	color: var(--was-ink);
	font-family: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.wl-account-body #page-container {
	background: var(--was-ivory) !important;
}

/* Center the WC content + take Divi's column system out of the equation */
body.wl-account-body #main-content {
	display: flex !important;
	justify-content: center !important;
	align-items: flex-start !important;
	min-height: 60vh !important;
	padding: 28px 24px 48px !important;
	background: var(--was-ivory) !important;
}

/* Layout overrides scoped to the Divi section / row / column that
 * actually contains our WC shortcode. The JS decorator (see
 * was_print_divi_host_decorator in styles-frontend.php) walks the
 * ancestor chain and tags those wrappers `.was-acc-ancestor`, so the
 * rules below NEVER apply to sibling Divi modules on the same page. */
body.wl-account-body .was-acc-ancestor {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	background: transparent !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Override Divi's `.et_pb_text_2.et_pb_text { padding: 40px !important }`
 * — but ONLY on the specific Divi text module hosting our card (tagged
 * `.was-acc-host`). Other Divi text modules on the same page keep their
 * native padding. */
body.wl-account-body .was-acc-host {
	padding: 20px !important;
	max-width: 100% !important;
	width: 100% !important;
}
body.wl-account-body .was-acc-host .et_pb_text_inner {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.wl-account-body #main-content h1,
body.wl-account-body #main-content .page-title {
	display: none !important;
}

body.wl-account-body .woocommerce {
	display: block !important;
	width: 480px !important;
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	float: none !important;
	box-sizing: border-box !important;
	padding: 0 !important;
}

body.wl-account-body #main-footer {
	width: 100% !important;
	display: block !important;
	clear: both !important;
	float: none !important;
}


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

.wl-acc-card {
	background: #fff;
	border: 1px solid var(--was-rule);
	border-radius: var(--was-radius-lg);
	padding: 36px 36px 32px;
	box-shadow: 0 1px 0 var(--was-rule), 0 24px 48px -32px rgba(94, 15, 26, 0.18);
	/* Pin to the parent's width so sign-in / register / lost-password all
	 * render at identical 480px regardless of how much content they carry. */
	width: 100%;
	box-sizing: border-box;
	/* Cap to parent so a flex blowout in a child (e.g. the Remember-me
	 * row) can't push the card past the viewport. Note: NOT using
	 * `overflow: hidden` here so the intl-tel-input country dropdown and
	 * the flatpickr calendar can still overflow the card visually. */
	max-width: 100%;
	min-width: 0;
}

.wl-acc-eyebrow {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--was-terra);
	margin-bottom: 10px;
}

.wl-acc-title {
	color: var(--was-ink);
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.5px;
	margin: 0 0 4px 0;
}
/* When there's no subtitle row underneath, the title needs its own
   bottom-margin so the form below doesn't crowd it. */
.wl-acc-title--alone {
	margin-bottom: 26px;
}
.wl-acc-title em {
	color: var(--was-terra);
	font-style: italic;
	font-weight: 400;
}

.wl-acc-subtitle {
	font-size: 0.92rem;
	color: var(--was-ink-soft);
	margin: 0 0 28px 0;
	line-height: 1.55;
}


/* ---------------------------------------------------------------------
 * Form rows / inputs / labels — mirror cartflow checkout exactly
 * --------------------------------------------------------------------- */

.wl-acc-card .form-row,
.wl-acc-card p.form-row,
.wl-acc-card .woocommerce-form-row {
	width: 100% !important;
	margin: 0 0 1.1rem !important;
	padding: 0 !important;
	float: none !important;
	clear: both !important;
	box-sizing: border-box !important;
}

.wl-acc-card label {
	display: block !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	color: var(--was-ink) !important;
	margin-bottom: 6px !important;
	letter-spacing: 0 !important;
	line-height: 1.4 !important;
	text-transform: none !important;
}

.wl-acc-card label .required {
	color: var(--was-red) !important;
	margin-left: 3px !important;
	font-weight: 700;
	text-decoration: none;
}

.wl-acc-card input.input-text,
.wl-acc-card input[type="text"],
.wl-acc-card input[type="email"],
.wl-acc-card input[type="password"],
.wl-acc-card input[type="tel"],
.wl-acc-card input[type="date"],
.wl-acc-card select {
	width: 100% !important;
	height: 44px !important;
	padding: 0 14px !important;
	background: #fff !important;
	border: 1px solid var(--was-rule-dark) !important;
	border-radius: var(--was-radius) !important;
	color: var(--was-ink) !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	line-height: 1.4 !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
	box-sizing: border-box !important;
	-webkit-appearance: none;
	appearance: none;
	min-height: unset !important;
}

.wl-acc-card select {
	padding-right: 36px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23851625' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 10px 7px !important;
	cursor: pointer !important;
}

.wl-acc-card input:hover,
.wl-acc-card select:hover {
	border-color: var(--was-terra-mid) !important;
}

.wl-acc-card input:focus,
.wl-acc-card select:focus {
	border-color: var(--was-terra) !important;
	box-shadow: 0 0 0 3px rgba(133, 22, 37, 0.12) !important;
	outline: none !important;
}

.wl-acc-card .woocommerce-invalid input.input-text,
.wl-acc-card .woocommerce-invalid select {
	border-color: var(--was-red) !important;
}


/* ---------------------------------------------------------------------
 * Two-column row helper (Gender + DOB on register)
 * --------------------------------------------------------------------- */

.wl-acc-card .custom-reg-row {
	display: flex !important;
	gap: 16px;
	margin: 0 0 1.1rem !important;
}
.wl-acc-card .custom-reg-row > * {
	flex: 1 1 0;
	margin: 0 !important;
	min-width: 0;
}
@media (max-width: 480px) {
	.wl-acc-card .custom-reg-row { flex-direction: column; gap: 0; }
	.wl-acc-card .custom-reg-row > * { margin-bottom: 1.1rem !important; }
}


/* ---------------------------------------------------------------------
 * Checkboxes (Remember me / marketing opt-in)
 * --------------------------------------------------------------------- */

.wl-acc-card .woocommerce-form__label-for-checkbox,
.wl-acc-card label.woocommerce-form-login__rememberme {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	color: var(--was-ink) !important;
	cursor: pointer !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.wl-acc-card .woocommerce-form__input-checkbox,
.wl-acc-card input[type="checkbox"] {
	width: 16px !important;
	height: 16px !important;
	min-height: unset !important;
	accent-color: var(--was-terra) !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	margin: 0 !important;
}


/* ---------------------------------------------------------------------
 * Primary submit button — same spec as cartflow's wl-btn-next
 * --------------------------------------------------------------------- */

.wl-acc-card button.button,
.wl-acc-card .button[type="submit"],
.wl-acc-card .wl-acc-submit {
	width: 100% !important;
	height: 48px !important;
	background: var(--was-terra) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--was-radius) !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em !important;
	text-transform: none !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background 0.18s ease, transform 0.18s ease !important;
	padding: 0 24px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	margin: 0 !important;
	line-height: 1 !important;
}

.wl-acc-card button.button:hover,
.wl-acc-card .button[type="submit"]:hover,
.wl-acc-card .wl-acc-submit:hover {
	background: var(--was-terra-dk) !important;
}

.wl-acc-card button.button:active,
.wl-acc-card .button[type="submit"]:active,
.wl-acc-card .wl-acc-submit:active {
	transform: translateY(1px);
}


/* ---------------------------------------------------------------------
 * Remember-me + Forgot-password on one row (login card)
 * --------------------------------------------------------------------- */

.wl-acc-card .wl-acc-row-split {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 1.1rem;
	flex-wrap: wrap;
	/* Prevent the flex container from demanding intrinsic content
	 * width — without min-width: 0 a long Remember-me label or a long
	 * "Forgot password?" link can stretch the parent .wl-acc-card past
	 * the viewport on a narrow phone, which makes the card render at a
	 * subtly wider width than the lost-password / register cards. */
	min-width: 0;
	max-width: 100%;
}
.wl-acc-card .wl-acc-row-split > * {
	min-width: 0;
	max-width: 100%;
}
.wl-acc-card .wl-acc-row-split label.woocommerce-form-login__rememberme {
	margin: 0 !important;
}
.wl-acc-card .wl-acc-inline-link {
	color: var(--was-terra) !important;
	font-size: 0.85rem !important;
	text-decoration: none !important;
	font-weight: 500;
	white-space: nowrap;
}
.wl-acc-card .wl-acc-inline-link:hover {
	text-decoration: underline !important;
}


/* ---------------------------------------------------------------------
 * Helpers (Lost-your-password link, privacy text, errors)
 * --------------------------------------------------------------------- */

.wl-acc-card .lost_password,
.wl-acc-card .woocommerce-LostPassword {
	margin: 6px 0 0;
	text-align: right;
}
.wl-acc-card .lost_password a,
.wl-acc-card .woocommerce-LostPassword a {
	color: var(--was-terra) !important;
	font-size: 0.85rem !important;
	text-decoration: none !important;
	font-weight: 500;
}
.wl-acc-card .lost_password a:hover,
.wl-acc-card .woocommerce-LostPassword a:hover {
	text-decoration: underline !important;
}

.wl-acc-card .woocommerce-privacy-policy-text {
	font-size: 0.78rem !important;
	color: var(--was-ink-soft) !important;
	margin: 10px 0 18px !important;
	line-height: 1.55 !important;
}
.wl-acc-card .woocommerce-privacy-policy-text a {
	color: var(--was-terra) !important;
	text-decoration: none !important;
}
.wl-acc-card .woocommerce-privacy-policy-text a:hover {
	text-decoration: underline !important;
}

/* Global notice — non-field-specific errors like "Invalid credentials".
 *
 * WC renders these notices via the `woocommerce_before_customer_login_form`
 * hook, which fires OUTSIDE our `.wl-acc-card` shell on the login screen.
 * So we target both placements (inside the card, and anywhere on a
 * wl-account-body page) and constrain the width to the card's max so the
 * notice doesn't span the whole page above it. */
body.wl-account-body .woocommerce-notices-wrapper,
body.wl-account-body ul.woocommerce-error,
body.wl-account-body .woocommerce-error,
.wl-acc-card .woocommerce-error,
.wl-acc-card .woocommerce-notices-wrapper > ul.woocommerce-error,
.wl-acc-card .was-error-box {
	background: #fdf0f0 !important;
	border: 1px solid rgba(184, 50, 50, 0.18) !important;
	border-left: 3px solid var(--was-red) !important;
	color: var(--was-ink) !important;
	border-radius: var(--was-radius-sm) !important;
	padding: 12px 16px !important;
	margin: 0 auto 16px !important;
	list-style: none !important;
	font-size: 0.88rem !important;
	line-height: 1.5 !important;
	max-width: 480px !important;
	width: 100% !important;
	box-sizing: border-box !important;
	font-family: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
body.wl-account-body .woocommerce-error li,
body.wl-account-body ul.woocommerce-error li,
.wl-acc-card .woocommerce-error li,
.wl-acc-card .was-error-box li {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	list-style: none !important;
	color: var(--was-ink) !important;
	font-size: 0.88rem !important;
	line-height: 1.5 !important;
}
/* WC sticks a "Showing notice" prefix icon on some themes; hide it. */
body.wl-account-body .woocommerce-error::before,
.wl-acc-card .woocommerce-error::before { display: none !important; }

/* Wrapper that WC sometimes outputs to hold a <ul> of errors.  Removing
 * its own border/background so only the inner <ul> shows our style. */
body.wl-account-body .woocommerce-notices-wrapper {
	background: transparent !important;
	border: none !important;
	border-left: none !important;
	padding: 0 !important;
}

.wl-acc-card .woocommerce-message,
body.wl-account-body .woocommerce-message {
	background: #f2f9f2 !important;
	border: 1px solid rgba(46, 125, 50, 0.18) !important;
	border-left: 3px solid var(--was-green) !important;
	color: var(--was-ink) !important;
	border-radius: var(--was-radius-sm) !important;
	padding: 12px 16px !important;
	font-size: 0.9rem !important;
	margin: 0 auto 16px !important;
	max-width: 480px !important;
	box-sizing: border-box !important;
}


/* Inline field error — placed directly below the input that failed
 * validation. Matches the cartflow checkout pattern. */
.wl-acc-card .was-field-error {
	margin: 4px 0 0 !important;
	padding: 0 !important;
	color: #b71c1c !important;
	font-size: 0.78rem !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	background: transparent !important;
	border: none !important;
	display: block;
}

/* Visual cue on the offending input. */
.wl-acc-card .form-row.was-has-error input,
.wl-acc-card .form-row.was-has-error select,
.wl-acc-card .was-has-error input,
.wl-acc-card .was-has-error select {
	border-color: #b71c1c !important;
	box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.10) !important;
}


/* ---------------------------------------------------------------------
 * Password strength meter — small, low-key, matches input typography.
 * Three rungs (Weak / OK / Strong) so the messaging is unambiguous.
 * --------------------------------------------------------------------- */

.was-pw-meter {
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.was-pw-bar {
	flex: 1 1 auto;
	height: 3px;
	border-radius: 2px;
	background: #efe6e8;
	overflow: hidden;
}
.was-pw-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--was-red);
	transition: width 0.18s ease, background 0.18s ease;
}
.was-pw-label {
	flex: 0 0 auto;
	font-size: 0.7rem;
	color: var(--was-ink-soft);
	line-height: 1.4;
	font-weight: 500;
}

/* Hide WC's native meter ( belt + braces — we also dequeue the script,
 * but if a cached page still has the markup the field stays tidy ). */
.wl-acc-card .woocommerce-password-strength,
.wl-acc-card .woocommerce-password-hint { display: none !important; }

.form-row.is-pw-weak   .was-pw-bar span { background: #b71c1c; }
.form-row.is-pw-ok     .was-pw-bar span { background: #c87f04; }
.form-row.is-pw-strong .was-pw-bar span { background: var(--was-green); }
.form-row.is-pw-weak   .was-pw-label    { color: #b71c1c; }
.form-row.is-pw-ok     .was-pw-label    { color: #b56304; }
.form-row.is-pw-strong .was-pw-label    { color: var(--was-green); font-weight: 600; }


/* ---------------------------------------------------------------------
 * Footer link (Don't have an account? Register / Already have one? Sign in)
 * --------------------------------------------------------------------- */

.wl-acc-footer {
	text-align: center;
	margin-top: 22px;
	font-size: 0.88rem;
	color: var(--was-ink-soft);
}
.wl-acc-footer a {
	color: var(--was-terra) !important;
	font-weight: 600;
	text-decoration: none !important;
}
.wl-acc-footer a:hover {
	text-decoration: underline !important;
}


/* ---------------------------------------------------------------------
 * WC's `customer_login` two-column wrapper is no longer used by our
 * form-login.php template (we render a single card per page), but the
 * shortcode still emits the `<h2>Login / Register</h2>` headings above
 * the cards on some Divi pages. Hide them — the card has its own title.
 * --------------------------------------------------------------------- */

body.wl-account-body .woocommerce > h2:first-child,
body.wl-account-body #customer_login > h2 {
	display: none !important;
}

/* Defensive — if anything still injects the old col2-set markup
 * (e.g. a third-party add-on hooking woocommerce_before_customer_login_form),
 * flatten it so the single card doesn't render at 47% width. */
body.wl-account-body .u-columns,
body.wl-account-body .col2-set,
body.wl-account-body .u-column1,
body.wl-account-body .u-column2,
body.wl-account-body .col-1,
body.wl-account-body .col-2 {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}


/* ---------------------------------------------------------------------
 * Auxiliary link rendered below a card (e.g. "Sign in with phone OTP")
 * --------------------------------------------------------------------- */

.wl-acc-aux-link {
	text-align: center;
	margin: 16px 0 0;
	font-size: 0.88rem;
	color: var(--was-ink-soft);
}
.wl-acc-aux-link a {
	color: var(--was-terra) !important;
	font-weight: 600;
	text-decoration: none !important;
	margin-left: 6px;
}
.wl-acc-aux-link a:hover {
	text-decoration: underline !important;
}


/* ---------------------------------------------------------------------
 * Phone OTP card (its own /my-account/otp-signin/ endpoint)
 * + complete-account screen
 * --------------------------------------------------------------------- */

.wl-acc-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 22px 0;
	color: var(--was-ink-soft);
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.wl-acc-divider::before,
.wl-acc-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--was-rule);
}

.was-otp-card .wl-acc-eyebrow { color: var(--was-terra); }

.was-otp-status {
	min-height: 1.2em;
	margin: 0 0 0.6rem;
	font-size: 0.85rem;
	color: var(--was-ink-soft);
}
.was-otp-status.is-ok    { color: var(--was-green); }
.was-otp-status.is-error { color: var(--was-red); }

.was-otp-card .was-otp-actions {
	display: flex;
	gap: 10px;
	margin-bottom: 0.6rem;
}
.was-otp-card .was-otp-actions .button {
	flex: 1;
}

.was-otp-resend-row {
	text-align: center;
	margin: 0 !important;
}
.was-otp-resend-btn {
	background: none !important;
	border: none !important;
	color: var(--was-terra) !important;
	font-size: 0.85rem !important;
	font-weight: 500 !important;
	cursor: pointer;
	padding: 4px 8px !important;
	text-decoration: none !important;
}
.was-otp-resend-btn[disabled] {
	color: var(--was-ink-soft) !important;
	cursor: not-allowed;
}
.was-otp-resend-btn:hover:not([disabled]) { text-decoration: underline !important; }

.was-otp-deprecation {
	font-size: 0.8rem !important;
	color: var(--was-ink-mid) !important;
	background: var(--was-ivory-dark);
	border-radius: var(--was-radius);
	padding: 14px 18px !important;
	margin: 18px 0 0 !important;
	line-height: 1.6 !important;
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.was-otp-deprecation::before {
	content: 'ⓘ';
	flex-shrink: 0;
	font-size: 1rem;
	color: var(--was-terra);
	line-height: 1.4;
}

.was-otp-not-found {
	border-top: 1px solid var(--was-rule);
	padding-top: 18px;
	margin-top: 18px;
}
.was-otp-not-found p {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--was-ink);
	margin: 0 0 14px;
	line-height: 1.5;
}
.was-otp-not-found-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
/* Two equal-height equal-width buttons. Primary fills with terra, secondary is the outline variant. */
.was-otp-not-found-actions > a {
	flex: 1 1 0;
	min-width: 0;
	height: 48px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 18px !important;
	border-radius: var(--was-radius) !important;
	font-family: inherit !important;
	font-size: 0.92rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.02em !important;
	text-decoration: none !important;
	text-align: center !important;
	box-sizing: border-box !important;
	line-height: 1 !important;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
}
/* Secondary (Sign in with email) — outline */
.was-otp-not-found-actions .button {
	background: #fff !important;
	color: var(--was-terra) !important;
	border: 1px solid var(--was-rule-dark) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	min-height: 0 !important;
}
.was-otp-not-found-actions .button:hover {
	border-color: var(--was-terra) !important;
	background: var(--was-terra-pale) !important;
	color: var(--was-terra-dk) !important;
}
/* Primary (Create an account) — filled terra (already targeted by .wl-acc-submit
   defaults; override to drop the form-row width-100 from the global rule). */
.was-otp-not-found-actions .wl-acc-submit {
	background: var(--was-terra) !important;
	color: #fff !important;
	border: 1px solid var(--was-terra) !important;
	width: auto !important;
}
.was-otp-not-found-actions .wl-acc-submit:hover {
	background: var(--was-terra-dk) !important;
	border-color: var(--was-terra-dk) !important;
	color: #fff !important;
}


/* Complete-account screen */
.wl-acc-card.was-otp-complete input[disabled] {
	background: var(--was-ivory-dark) !important;
	color: var(--was-ink-soft) !important;
	cursor: not-allowed !important;
}


/* ---------------------------------------------------------------------
 * intl-tel-input integration — skin the library to match the form
 * tokens (44px height, 8px radius, terra focus ring).
 * --------------------------------------------------------------------- */

.wl-acc-card .iti,
.was-otp-card .iti,
.form-row .iti {
	display: block;
	width: 100%;
}

.wl-acc-card .iti input.iti__tel-input,
.was-otp-card .iti input.iti__tel-input,
.form-row .iti input.iti__tel-input {
	width: 100% !important;
	height: 44px !important;
	padding-left: 92px !important; /* room for the country selector + separate dial code */
	padding-right: 14px !important;
	border: 1px solid var(--was-rule-dark) !important;
	border-radius: var(--was-radius) !important;
}

.wl-acc-card .iti__selected-country {
	height: 44px !important;
}

.wl-acc-card .iti__dropdown-content {
	border-radius: var(--was-radius) !important;
	border: 1px solid var(--was-rule-dark) !important;
	box-shadow: 0 8px 24px -8px rgba(94, 15, 26, 0.20) !important;
	overflow: hidden;
}

.wl-acc-card .iti__search-input {
	height: 40px !important;
	padding: 0 12px !important;
	font-size: 0.92rem !important;
	border-bottom: 1px solid var(--was-rule) !important;
}

.wl-acc-card .iti__country.iti__highlight,
.wl-acc-card .iti__country:hover {
	background-color: var(--was-terra-pale) !important;
}


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

@media (max-width: 600px) {
	/* Less top whitespace on phones — the desktop 28px → 12px so the
	 * card lands closer to the page header. */
	body.wl-account-body #main-content {
		padding: 12px 8px 32px !important;
		min-height: 0 !important;
	}

	/* AGGRESSIVE WIDTH RESET — sign-in renders full-width on mobile but
	 * register and lost-password were ending up narrower because Divi's
	 * page-builder-cached CSS for those specific page-states applies
	 * extra constraints (e.g. flex-column min-widths, .et_pb_text
	 * gutters, .woocommerce-MyAccount padding). Force every container
	 * in the wl-account-body chain to fill the viewport so all three
	 * forms read identical width. */
	body.wl-account-body #page-container,
	body.wl-account-body .entry-content,
	body.wl-account-body .et_pb_section,
	body.wl-account-body .et_pb_row,
	body.wl-account-body .et_pb_column,
	body.wl-account-body .et_pb_column_inner,
	body.wl-account-body .et_pb_text,
	body.wl-account-body .et_pb_text_inner,
	body.wl-account-body .woocommerce-notices-wrapper,
	body.wl-account-body .woocommerce,
	body.wl-account-body .woocommerce-MyAccount-content {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		float: none !important;
		box-sizing: border-box !important;
	}
	/* Base card padding for ALL forms on mobile. */
	body.wl-account-body .wl-acc-card {
		padding: 22px 18px 20px !important;
		border-radius: var(--was-radius);
		box-sizing: border-box !important;
	}

	/* Sign-in keeps its current full-viewport behaviour — the user
	 * wants it this way; the form is shorter and "fills the screen"
	 * is the desired feel there. */
	body.wl-account-body.was-page-signin .wl-acc-card {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	/* Register / lost-password / OTP-signin: 86% width, centered with
	 * auto margins. Matches what the user originally set manually on
	 * the lost-password page via the Customizer. */
	body.wl-account-body:not(.was-page-signin) .wl-acc-card {
		width: 86% !important;
		max-width: 86% !important;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	/* "Don't have access to your email? Sign in with phone OTP →"
	 * (below the lost-password card) — same 86% mobile width so it
	 * sits visually aligned with the card above. */
	body.wl-account-body .wl-acc-aux-link {
		width: 86% !important;
		max-width: 86% !important;
		margin-left: auto !important;
		margin-right: auto !important;
		box-sizing: border-box !important;
	}
	.wl-acc-title        { font-size: 1.35rem; }
	.wl-acc-title--alone { margin-bottom: 18px; }
	.wl-acc-subtitle     { font-size: 0.85rem; margin-bottom: 22px; }
	.wl-acc-eyebrow      { font-size: 0.66rem; margin-bottom: 8px; }

	/* Tighter form rhythm on phones — every row shrinks 1.1rem → 0.85rem
	 * so the whole card fits without scrolling on a 5–6" screen. */
	.wl-acc-card .form-row,
	.wl-acc-card p.form-row,
	.wl-acc-card .woocommerce-form-row {
		margin-bottom: 0.85rem !important;
	}

	/* Marketing checkbox + Remember-me — full sentence is long, slim
	 * the label so it doesn't wrap into 3 lines on a 320px viewport. */
	.wl-acc-card .woocommerce-form__label-for-checkbox,
	.wl-acc-card label.woocommerce-form-login__rememberme {
		font-size: 0.8rem !important;
		line-height: 1.4 !important;
	}

	.wl-acc-card .woocommerce-privacy-policy-text { font-size: 0.72rem !important; }

	.wl-acc-footer    { font-size: 0.82rem; }
	.wl-acc-aux-link  { font-size: 0.82rem; }
	.wl-acc-divider   { font-size: 0.72rem; }

	/* Strength meter label can wrap on phones if the hint is long. */
	.was-pw-label     { font-size: 0.68rem; }

	/* Inline error stays tiny but legible. */
	.wl-acc-card .was-field-error { font-size: 0.74rem !important; }

	/* OTP card adjustments. */
	.was-otp-card .was-otp-actions { flex-direction: column; }
	.was-otp-not-found-actions     { flex-direction: column; }
	.was-otp-not-found-actions > a { width: 100%; }
	.was-otp-deprecation { font-size: 0.74rem !important; padding: 12px 14px !important; }

	/* Remember-me + Forgot password row can wrap; tighten gap. */
	.wl-acc-card .wl-acc-row-split { gap: 8px; }
	.wl-acc-card .wl-acc-inline-link { font-size: 0.78rem !important; }
}
