/* WBS email-code sign-in — checkout gate for logged-out visitors (body.wbs-otp-gate). */

/* Until signed in, the checkout form shows only its first slot (express wallet buttons, when the
   browser has one); contact/billing/payment/place-order appear after sign-in. The order summary
   (sidebar) is untouched. */
/* Fail-open: only hide once the sign-in box has actually mounted (JS adds .wbs-otp-on) — if the
   script ever breaks, customers still get the normal checkout. */
body.wbs-otp-gate.wbs-otp-on .wc-block-checkout__form > *:not(:first-child) { display: none !important; }

.wbs-otp {
	--otp-accent: #2b7bb9; --otp-accent-dark: #1f5a87; --otp-ink: #2a3440; --otp-muted: #5b6773; --otp-line: #cfd8e1;
	margin: 8px 0 32px; color: var(--otp-ink); font-size: 16px; line-height: 1.45;
}
.wbs-otp *, .wbs-otp *::before { box-sizing: border-box; }
.wbs-otp-h { margin: 0 0 14px; font-size: 22px; font-weight: 600; }
.wbs-otp-label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.wbs-otp-row { display: flex; gap: 10px; align-items: stretch; }
.wbs-otp input.wbs-otp-input { /* theme input styles are specific — out-rank them */
	flex: 1; min-width: 0; width: auto; height: 52px !important; min-height: 52px !important; max-height: none !important; padding: 0 14px !important; margin: 0 !important; font-size: 17px !important; line-height: normal !important;
	color: var(--otp-ink); border: 1.5px solid var(--otp-line) !important; border-radius: 10px !important; background: #fff !important; box-shadow: none;
}
.wbs-otp input.wbs-otp-input:focus { outline: none; border-color: var(--otp-accent); box-shadow: 0 0 0 3px rgba(43, 123, 185, .18); }

/* the code box: big and fat like a 2FA field */
.wbs-otp input.wbs-otp-code {
	height: 68px !important; min-height: 68px !important; max-height: none !important; max-width: 260px; text-align: center !important; font-size: 36px !important; font-weight: 700 !important; letter-spacing: .14em !important;
	font-family: ui-monospace, Menlo, Consolas, "Roboto Mono", monospace !important; font-variant-numeric: tabular-nums; color: #1f2a36 !important;
}
.wbs-otp input.wbs-otp-code::placeholder { color: #c9d1da; font-weight: 600; letter-spacing: .14em; }
.wbs-otp input.wbs-otp-code[readonly] { background: #f4f7fa !important; }

.wbs-otp button.wbs-otp-btn {
	all: unset; box-sizing: border-box; flex: none; display: inline-flex; align-items: center; justify-content: center;
	min-width: 120px; height: 52px; padding: 0 22px; border-radius: 10px; background: var(--otp-accent); color: #fff;
	font-size: 16px; font-weight: 600; cursor: pointer; transition: background .12s; text-align: center; line-height: 1.25;
}
.wbs-otp .wbs-otp-step:has(.wbs-otp-code) button.wbs-otp-btn { height: 68px; }
.wbs-otp button.wbs-otp-btn:hover { background: var(--otp-accent-dark); }
.wbs-otp button.wbs-otp-btn:focus-visible { outline: 3px solid var(--otp-accent); outline-offset: 2px; }
.wbs-otp button.wbs-otp-btn:disabled { opacity: .65; cursor: progress; }

.wbs-otp button.wbs-otp-link {
	all: unset; color: var(--otp-accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-weight: 600;
}
.wbs-otp button.wbs-otp-link:focus-visible { outline: 2px solid var(--otp-accent); outline-offset: 2px; }
.wbs-otp button.wbs-otp-link:disabled { color: var(--otp-muted); text-decoration: none; cursor: default; font-weight: 400; }

.wbs-otp-help { margin: 10px 0 0; font-size: 14px; color: var(--otp-muted); }
.wbs-otp-sent { margin: 0 0 14px; font-size: 15px; overflow-wrap: anywhere; }
.wbs-otp-typo { margin: 8px 0 0; font-size: 14px; }
.wbs-otp-msg { margin: 12px 0 0; font-size: 15px; min-height: 0; }
.wbs-otp-msg:empty { display: none; }
.wbs-otp-msg.is-error { color: #a32020; }
.wbs-otp-msg.is-ok { color: #1e7b45; }
.wbs-otp [hidden] { display: none !important; }

@media (max-width: 520px) {
	.wbs-otp-row { flex-direction: column; }
	.wbs-otp button.wbs-otp-btn { width: 100%; }
	.wbs-otp input.wbs-otp-code { max-width: none; width: 100%; }
	.wbs-otp input.wbs-otp-input { width: 100%; }
	.wbs-otp .wbs-otp-step:has(.wbs-otp-code) button.wbs-otp-btn { height: 52px; }
}

/* My Account (signed out): email code first; WooCommerce's password form only after "Sign in with a
   password instead". Fail-open like the checkout — nothing hides until the widget mounted (.wbs-otp-on). */
body.wbs-otp-on:not(.wbs-otp-show-password) .woocommerce-form-login,
body.wbs-otp-on:not(.wbs-otp-show-password) h2:has(+ .woocommerce-form-login) { display: none !important; }
.wbs-otp-mount .wbs-otp { margin: 0 0 28px; max-width: 560px; }

/* Account details: confirm-new-email box */
.wbs-otp-change { margin: 6px 0 22px; padding: 18px 18px 4px; border: 2px solid #2b7bb9; border-radius: 12px; background: #f4f8fc; }
.wbs-otp-change-h { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #2a3440; }
.wbs-otp-change .wbs-otp { margin: 12px 0 8px; }
.wbs-otp-signedin { font-size: 16px; }

/* Signed-in customer checkout: the editable email is replaced by "Signed in as … · Use a different
   email" (fail-open: only hidden once our panel mounted). */
body.wbs-otp-acct-on #contact-fields { display: none !important; }
.wbs-otp-acct { margin: 0 0 28px; }
.wbs-otp-signedas { margin: 0 0 4px; font-size: 16px; overflow-wrap: anywhere; }
.wbs-otp-acct .wbs-otp { margin: 16px 0 6px; padding: 16px; border: 1.5px solid #cfd8e1; border-radius: 12px; background: #f8fafc; }

/* Verified email with no bookings (My Account / Booking Info) */
.wbs-otp-noacct { margin: 4px 0 8px; padding: 18px 18px 16px; border: 3px solid #f2b705; border-radius: 14px; background: #fff7dc; color: #2a3440; overflow-wrap: anywhere; }
.wbs-otp-noacct-h { margin: 0 0 6px !important; font-size: 20px; font-weight: 800; }
.wbs-otp-noacct p { margin: 0 0 12px; font-size: 15px; }
.wbs-otp-noacct-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.wbs-otp button.wbs-otp-btn.wbs-otp-btn-ghost { background: #fff; color: #1f5a87; border: 2px solid #2b7bb9; }
.wbs-otp button.wbs-otp-btn.wbs-otp-btn-ghost:hover { background: #eef4fb; }
@media (max-width: 520px) { .wbs-otp-noacct-btns { flex-direction: column; } .wbs-otp-noacct-btns .wbs-otp-btn { width: 100%; } }

/* Booked with this email under another account: links to those bookings */
.wbs-otp-noacct.is-found { border-color: #2b7bb9; background: #eef4fb; }
.wbs-otp-found { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.wbs-otp-found li { margin: 0; }
.wbs-otp-found-a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #cfe1f0; border-radius: 10px; background: #fff; color: #1f5a87 !important; font-weight: 700; text-decoration: none !important; }
.wbs-otp-found-a:hover { border-color: #2b7bb9; }
.wbs-otp-found-tag { flex: none; padding: 2px 9px; border-radius: 999px; background: #e6eaee; color: #5b6773; font-size: 12px; font-weight: 700; }
.wbs-otp-found-tag.is-live { background: #d9f2df; color: #1d6b33; }
