.ouo-fotp {
	max-width: 420px;
	margin: 0 0 1.25rem;
	padding: 1.1rem 1.15rem;
	border: 1px solid #e6ddd6;
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
}

.ouo-fotp__title {
	margin: 0 0 0.85rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.ouo-fotp__label {
	display: block;
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
}

.ouo-fotp__label > span {
	display: block;
	margin-bottom: 0.35rem;
	color: #5c4f4a;
}

.ouo-fotp__phone-row {
	display: flex;
	gap: 0.45rem;
}

.ouo-fotp__dial {
	width: 4.5rem;
	flex: 0 0 auto;
	text-align: center;
}

.ouo-fotp__phone,
.ouo-fotp__otp,
.ouo-fotp__dial {
	padding: 0.55rem 0.65rem;
	border: 1px solid #d9cec6;
	border-radius: 8px;
	font: inherit;
	box-sizing: border-box;
}

.ouo-fotp__phone,
.ouo-fotp__otp {
	width: 100%;
}

.ouo-fotp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0.25rem 0 0;
	padding: 0.7rem 1rem;
	border: 0;
	border-radius: 8px;
	background: #8b1e2d;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ouo-fotp__btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.ouo-fotp__link {
	display: inline-block;
	margin-top: 0.65rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #8b1e2d;
	font: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
}

.ouo-fotp__msg {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
	color: #1a7f37;
}

.ouo-fotp__msg.is-error {
	color: #b42318;
}

.ouo-fotp__recaptcha {
	min-height: 0;
}

.ouo-fotp-checkout-wrap {
	margin: 0 0 1.25rem;
}

.ouo-fotp-myaccount-only {
	display: flex;
	justify-content: center;
	padding: 1rem 0 2rem;
}

.ouo-fotp-myaccount-only .ouo-fotp {
	width: 100%;
	max-width: 32rem;
	margin: 0;
	padding: 1.75rem 1.6rem 1.5rem;
	border: 1px solid rgba(26, 18, 20, 0.1);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 32px rgba(26, 18, 20, 0.06);
	box-sizing: border-box;
}

/* OTP sits inside the theme Login card tabs — no second box. */
body.woocommerce-account:not(.logged-in) .ouo-auth .ouo-fotp {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body.woocommerce-account:not(.logged-in) .ouo-auth .ouo-fotp__title {
	display: none;
}

body.woocommerce-account:not(.logged-in) .ouo-auth--tabs-3 .ouo-auth__tabs {
	grid-template-columns: 1fr 1fr 1fr;
}

body.woocommerce-account:not(.logged-in) .ouo-auth--tabs-3 .ouo-auth__tab {
	font-size: 0.88rem;
	padding: 0.7rem 0.35rem;
}

.ouo-fotp-phone-wrap {
	display: contents;
}

.ouo-fotp--billing {
	max-width: none;
}

/* Phone + Verify share one stretched row (same height, top-aligned). */
.woocommerce-checkout #billing_phone_field {
	display: block !important;
}

.woocommerce-checkout #billing_phone_field > label {
	display: block;
	margin-bottom: 0.4rem;
}

.woocommerce-checkout #billing_phone_field .ouo-fotp-phone-row {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch !important;
	gap: 0.5rem;
	width: 100%;
	margin: 0;
	padding: 0;
}

.woocommerce-checkout #billing_phone_field .ouo-fotp-phone-row .woocommerce-input-wrapper {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	max-width: none;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	align-self: stretch;
}

.woocommerce-checkout #billing_phone_field .ouo-fotp-phone-row .woocommerce-input-wrapper .input-text,
.woocommerce-checkout #billing_phone_field .ouo-fotp-phone-row #billing_phone {
	width: 100% !important;
	max-width: none;
	margin: 0 !important;
	height: 3rem !important;
	min-height: 3rem !important;
	box-sizing: border-box !important;
}

.woocommerce-checkout #billing_phone_field .ouo-fotp-phone-row > [data-action="send"],
.woocommerce-checkout #billing_phone_field .ouo-fotp-phone-row .ouo-fotp__btn--inline {
	flex: 0 0 auto;
	align-self: stretch !important;
	width: auto !important;
	min-width: 4.75rem;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 0.95rem !important;
	white-space: nowrap;
	line-height: 1 !important;
	box-sizing: border-box !important;
	border-radius: 10px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
}

.woocommerce-checkout #billing_phone_field .ouo-fotp--inline {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-sizing: border-box;
	position: relative;
}

.woocommerce-checkout #billing_phone_field.ouo-fotp-awaiting-otp .ouo-fotp-phone-row,
.woocommerce-checkout #billing_phone_field.ouo-fotp-awaiting-otp .ouo-fotp-phone-row[hidden] {
	display: none !important;
}

.woocommerce-checkout #billing_phone_field.ouo-fotp-awaiting-otp > label {
	display: none !important;
}

.woocommerce-checkout #billing_phone_field.ouo-fotp-awaiting-otp .ouo-fotp--inline {
	margin-top: 0 !important;
}

.woocommerce-checkout #billing_phone_field.ouo-fotp-awaiting-otp .ouo-fotp__step[data-step="otp"]:not([hidden]) {
	display: block !important;
	width: 100%;
}

.ouo-fotp--inline .ouo-fotp__sent {
	margin: 0 0 0.45rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #5c4f4a;
}

.ouo-fotp--inline .ouo-fotp__otp-label {
	display: block;
	margin: 0 0 0.4rem;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ink, #1a1214);
}

.woocommerce-checkout #billing_phone_field.ouo-fotp-awaiting-otp .ouo-fotp-phone-row > [data-action="send"],
.woocommerce-checkout #billing_phone_field.ouo-fotp-phone-verified .ouo-fotp-phone-row > [data-action="send"] {
	display: none !important;
}

.woocommerce-checkout #billing_phone_field.ouo-fotp-phone-verified #billing_phone {
	border-color: #8fd19e !important;
}

/* After Verify is moved into the phone row, keep phone step only for captcha. */
.ouo-fotp--inline .ouo-fotp__step[data-step="phone"]:not([hidden]) {
	display: block !important;
	margin: 0;
	padding: 0;
	height: 0;
	overflow: hidden;
}

.ouo-fotp--inline.is-otp-open .ouo-fotp__step[data-step="phone"],
.ouo-fotp__step[hidden],
.ouo-fotp--inline .ouo-fotp__step[hidden] {
	display: none !important;
}

.ouo-fotp--inline .ouo-fotp__step[data-step="otp"]:not([hidden]) {
	display: block !important;
	width: 100%;
	margin: 0;
	padding: 0;
	visibility: visible !important;
	opacity: 1 !important;
}

.ouo-fotp--inline .ouo-fotp__btn--inline {
	width: auto;
	min-width: 4.75rem;
	height: 3rem;
	min-height: 3rem;
	margin: 0;
	padding: 0 0.95rem;
	white-space: nowrap;
	line-height: 1;
	box-sizing: border-box;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
}

.ouo-fotp--inline .ouo-fotp__recaptcha {
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.ouo-fotp--inline .ouo-fotp__otp-row {
	display: flex !important;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.55rem;
	margin: 0;
	width: 100%;
}

.woocommerce-checkout #billing_phone_field .ouo-fotp--inline .ouo-fotp__otp-row {
	display: flex !important;
}

.ouo-fotp--inline .ouo-fotp__otp {
	flex: 0 0 7.25rem;
	width: 7.25rem !important;
	min-width: 7.25rem !important;
	max-width: 7.25rem !important;
	height: 3rem !important;
	min-height: 3rem !important;
	margin: 0;
	padding: 0.55rem 0.65rem !important;
	box-sizing: border-box;
	border: 1px solid rgba(26, 18, 20, 0.14);
	border-radius: 10px;
	background: #fbf7f3;
	font: inherit;
	font-size: 1.15rem !important;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-align: center;
}

.ouo-fotp--inline .ouo-fotp__otp-row .ouo-fotp__btn--inline[data-action="verify"] {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 8.5rem;
	height: auto !important;
	min-height: 3rem !important;
	padding: 0 1.15rem !important;
	font-size: 1rem !important;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.ouo-fotp--inline .ouo-fotp__link {
	display: inline-block;
	margin-top: 0.4rem;
	margin-right: 0.85rem;
	padding: 0;
	border: 0;
	background: none;
	color: #7a1f2b;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.ouo-fotp--inline .ouo-fotp__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin-top: 0.35rem;
}

.ouo-fotp--inline .ouo-fotp__links .ouo-fotp__link {
	margin: 0;
}

.ouo-fotp--link-btns .ouo-fotp__links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem;
	margin-top: 0.75rem;
}

.ouo-fotp--link-btns .ouo-fotp__link,
.ouo-fotp--inline.ouo-fotp--link-btns .ouo-fotp__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 2.65rem;
	margin: 0;
	padding: 0.45rem 0.75rem;
	border: 1px solid #8b1e2d;
	border-radius: 10px;
	background: #fff;
	color: #8b1e2d;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none !important;
	box-sizing: border-box;
	cursor: pointer;
}

.ouo-fotp--link-btns .ouo-fotp__link:hover,
.ouo-fotp--inline.ouo-fotp--link-btns .ouo-fotp__link:hover {
	background: rgba(139, 30, 45, 0.06);
}

.ouo-fotp--inline .ouo-fotp__msg,
.ouo-fotp--inline .ouo-fotp__badge {
	width: 100%;
	margin: 0.35rem 0 0;
	line-height: 1.35;
}

.ouo-fotp--inline.is-verified {
	border: 0;
	background: transparent;
}

.ouo-fotp__badge {
	margin: 0.75rem 0 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a7f37;
}

.ouo-fotp.is-verified:not(.ouo-fotp--inline) {
	border-color: #8fd19e;
	background: #f4fff7;
}
