/*
 * Phone sign-in card on the My Account login page (owner-approved mockup, 2026-11-15). Styled from the theme's
 * tokens; every selector is under .mw-otp so nothing leaks into WooCommerce's own forms.
 */
.mw-otp {
	box-sizing: border-box;
	width: 100%;
	max-width: 440px;
	margin: 0 auto 24px;
	padding: 26px 22px 22px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.mw-otp *,
.mw-otp *::before,
.mw-otp *::after {
	box-sizing: border-box;
}

.mw-otp [hidden] {
	display: none !important;
}

.mw-otp .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mw-otp__title {
	margin: 0 0 4px;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 1.75rem);
	font-weight: 300;
	line-height: 1.25;
	text-align: center;
}

.mw-otp__lead {
	margin: 0 0 18px;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.9375rem;
	text-align: center;
}

.mw-otp__lead--code {
	margin: 8px 0 14px;
}

.mw-otp__tabs {
	display: flex;
	margin: 0 0 20px;
	padding: 4px;
	border-radius: 10px;
	background: var(--wp--preset--color--surface);
}

.mw-otp__tabs button {
	flex: 1;
	min-height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
}

.mw-otp__tabs button.is-on {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.mw-otp__status {
	min-height: 1.4em;
	margin: 0 0 12px;
	font-size: 0.9375rem;
	text-align: center;
}

.mw-otp__status:empty {
	min-height: 0;
	margin: 0;
}

.mw-otp__status.is-error {
	color: var(--wp--preset--color--error);
}

.mw-otp__label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.8125rem;
	font-weight: 500;
}

.mw-otp__phone {
	display: flex;
	margin: 0 0 6px;
}

.mw-otp__chip {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-right: 0;
	border-radius: 8px 0 0 8px;
	background: var(--wp--preset--color--surface);
	white-space: nowrap;
}

.mw-otp__country {
	min-height: 52px;
	max-width: 9.5rem;
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 0.9375rem;
	line-height: 1.2;
	text-overflow: ellipsis;
	cursor: pointer;
}

.mw-otp__country:disabled {
	cursor: default;
	opacity: 1;
	-webkit-text-fill-color: var(--wp--preset--color--contrast);
	appearance: none;
	background-image: none;
}

.mw-otp__country:focus-visible {
	position: relative;
	z-index: 1;
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.mw-otp__flag {
	display: inline-block;
	width: 22px;
	height: 15px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	background: linear-gradient(#f4963a 33%, #fff 33% 66%, #2e8b3e 66%);
}

.mw-otp__input {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 0 8px 8px 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 1rem;
}

.mw-otp__input--solo {
	margin: 0 0 14px;
	border-radius: 8px;
}

.mw-otp__input:focus-visible,
.mw-otp__box:focus-visible,
.mw-otp__btn:focus-visible,
.mw-otp__link:focus-visible,
.mw-otp__tabs button:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: 2px;
}

.mw-otp__help {
	margin: 0 0 16px;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.8125rem;
}

.mw-otp__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 0 0 10px;
	padding: 0 24px;
	border: 2px solid var(--wp--preset--color--secondary);
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
}

.mw-otp__btn--ghost {
	border: 1.5px solid var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.mw-otp__btn:disabled {
	opacity: 0.6;
	cursor: progress;
}

.mw-otp__or {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 6px 0 14px;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.8125rem;
}

.mw-otp__or::before,
.mw-otp__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--wp--preset--color--border);
}

.mw-otp__codes {
	display: flex;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-width: 0; /* a fieldset will not shrink below its content otherwise */
	margin: 0 0 10px;
	padding: 0;
	border: 0;
}

.mw-otp__box {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	max-width: 46px;
	height: 56px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 1.375rem;
	text-align: center;
}

@media (max-width: 380px) {
	.mw-otp {
		padding-inline: 16px;
	}

	.mw-otp__codes {
		gap: 6px;
	}

	.mw-otp__box {
		height: 52px;
	}
}

.mw-otp__link {
	margin: 0;
	padding: 8px 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
}

.mw-otp__link--center {
	display: block;
	margin: 0 auto 8px;
}

.mw-otp__link:disabled {
	color: var(--wp--preset--color--text-muted);
	cursor: default;
	text-decoration: none;
}

.mw-otp__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 0.8438rem;
	line-height: 1.5;
}

.mw-otp__check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
}

.mw-otp__recaptcha {
	position: absolute;
}

/* WooCommerce's own login form, moved into the card behind "Login with password". */
.mw-otp__wc .woocommerce-form-login {
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
}

/* Name step: first and last name side by side when the card is wide enough, an optional email below. */
.mw-otp__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 12px;
}

@media (min-width: 440px) {
	.mw-otp__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mw-otp__input--tight {
	margin-bottom: 4px;
}

.mw-otp__opt {
	color: var(--wp--preset--color--text-muted);
	font-weight: 400;
}

/* Email sign-in and sign-up (0.7.0). */
.mw-otp a.mw-otp__btn {
	text-decoration: none;
}

.mw-otp__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.mw-otp__altsignup {
	margin: 6px 0 0;
}

.mw-otp__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: 0 auto 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
}

.mw-otp__help--center {
	text-align: center;
}
