/* ==========================================================================
   WA OTP Verify — login card
   Sizes are in px on purpose so themes with a 62.5% root font don't shrink it,
   and inputs stay at 16px so iPhones don't zoom in on focus.
   ========================================================================== */

.wa-otp {
	--wa-accent: #0b7a5c;
	--wa-accent-soft: #e8f3ef;
	--wa-accent-ring: rgba(11, 122, 92, .18);
	--wa-accent-hover: #09684e;
	--wa-ink: #15211f;
	--wa-muted: #5f6e6b;
	--wa-faint: #98a5a2;
	--wa-line: #dbe3e0;
	--wa-surface: #f5f8f7;
	--wa-error: #a4271c;
	--wa-error-bg: #fdeeec;
	--wa-radius: 12px;

	position: relative;
	width: 100%;
	max-width: 440px;
	margin: 24px auto;
	padding: 36px 32px 24px;
	background: #fff;
	border: 1px solid #e4eae8;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(16, 32, 28, .04), 0 12px 32px -12px rgba(16, 32, 28, .14);
	color: var(--wa-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

@supports (color: color-mix(in srgb, red, blue)) {
	.wa-otp {
		--wa-accent-soft: color-mix(in srgb, var(--wa-accent) 10%, #fff);
		--wa-accent-ring: color-mix(in srgb, var(--wa-accent) 20%, transparent);
		--wa-accent-hover: color-mix(in srgb, var(--wa-accent) 86%, #000);
	}
}

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

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

.wa-otp .wa-otp__icon { display: block; width: 24px; height: 24px; flex: none; }

/* ---------- Header ---------- */

.wa-otp .wa-otp__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--wa-accent-soft);
	color: var(--wa-accent);
}

.wa-otp .wa-otp__title {
	margin: 18px 0 6px;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 23px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
	text-transform: none;
	color: var(--wa-ink);
}

.wa-otp .wa-otp__sub {
	margin: 0;
	font-size: 15px;
	color: var(--wa-muted);
}

/* ---------- Progress ---------- */

.wa-otp .wa-otp__progress {
	display: flex;
	gap: 6px;
	margin: 22px 0 24px;
}

.wa-otp .wa-otp__bar {
	flex: 1;
	height: 4px;
	border-radius: 4px;
	background: #e6ecea;
	transition: background-color .3s ease;
}

.wa-otp .wa-otp__bar.is-on { background: var(--wa-accent); }

/* ---------- Fields ---------- */

.wa-otp .wa-otp__field { margin: 0 0 16px; }

.wa-otp .wa-otp__label {
	display: block;
	margin: 0 0 7px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wa-ink);
	text-transform: none;
	letter-spacing: 0;
}

.wa-otp .wa-otp__opt { font-weight: 400; color: var(--wa-faint); }

.wa-otp .wa-otp__input {
	display: block;
	width: 100%;
	height: 52px;
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	background: #fff;
	border: 1.5px solid var(--wa-line);
	border-radius: var(--wa-radius);
	box-shadow: none;
	outline: 0;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: normal;
	letter-spacing: normal;
	color: var(--wa-ink);
	text-transform: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wa-otp .wa-otp__input::placeholder { color: var(--wa-faint); opacity: 1; }

.wa-otp .wa-otp__input:hover { border-color: #c5d0cc; }

.wa-otp .wa-otp__input:focus {
	border-color: var(--wa-accent);
	box-shadow: 0 0 0 4px var(--wa-accent-ring);
}

/* Phone: country code joined to the input */
.wa-otp .wa-otp__phone {
	display: flex;
	align-items: stretch;
	height: 52px;
	background: #fff;
	border: 1.5px solid var(--wa-line);
	border-radius: var(--wa-radius);
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wa-otp .wa-otp__phone:hover { border-color: #c5d0cc; }

.wa-otp .wa-otp__phone:focus-within {
	border-color: var(--wa-accent);
	box-shadow: 0 0 0 4px var(--wa-accent-ring);
}

.wa-otp .wa-otp__cc {
	display: flex;
	align-items: center;
	padding: 0 14px;
	background: var(--wa-surface);
	border-right: 1.5px solid var(--wa-line);
	font-size: 16px;
	font-weight: 600;
	color: var(--wa-muted);
	font-variant-numeric: tabular-nums;
}

.wa-otp .wa-otp__phone .wa-otp__input {
	height: 100%;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-variant-numeric: tabular-nums;
	letter-spacing: .02em;
}

/* OTP code */
.wa-otp .wa-otp__code {
	height: 64px;
	padding: 0 10px 0 calc(10px + .5em);
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 28px;
	font-weight: 600;
	letter-spacing: .5em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.wa-otp .wa-otp__code::placeholder { color: #cdd6d3; letter-spacing: .5em; }

.wa-otp .wa-otp__code.is-shake { animation: waShake .36s ease; border-color: var(--wa-error); }

/* "Code sent to" strip */
.wa-otp .wa-otp__sent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 18px;
	padding: 8px 8px 8px 14px;
	background: var(--wa-surface);
	border-radius: var(--wa-radius);
	font-size: 14.5px;
	color: var(--wa-muted);
}

.wa-otp .wa-otp__sent strong {
	color: var(--wa-ink);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wa-otp .wa-otp__edit {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: none;
	min-height: 36px;
	margin: 0;
	padding: 0 10px;
	background: transparent;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--wa-accent);
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.wa-otp .wa-otp__edit:hover { background: var(--wa-accent-soft); }
.wa-otp .wa-otp__edit .wa-otp__icon { width: 15px; height: 15px; }

/* ---------- Buttons ---------- */

.wa-otp .wa-otp__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 52px;
	min-height: 0;
	margin: 4px 0 0;
	padding: 0 20px;
	background: var(--wa-accent);
	border: 0;
	border-radius: var(--wa-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .15s ease, transform .1s ease;
}

.wa-otp .wa-otp__btn:hover { background: var(--wa-accent-hover); color: #fff; }
.wa-otp .wa-otp__btn:active { transform: scale(.99); }

.wa-otp .wa-otp__btn:focus-visible,
.wa-otp .wa-otp__edit:focus-visible,
.wa-otp .wa-otp__link:focus-visible {
	outline: 2px solid var(--wa-accent);
	outline-offset: 3px;
}

.wa-otp .wa-otp__btn:disabled { opacity: .6; cursor: default; transform: none; }

.wa-otp .wa-otp__btn.is-loading { opacity: .9; }

.wa-otp .wa-otp__btn.is-loading::before {
	content: "";
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: waSpin .7s linear infinite;
}

.wa-otp .wa-otp__btn--ghost {
	background: transparent;
	border: 1.5px solid var(--wa-line);
	box-shadow: none;
	color: var(--wa-ink);
}

.wa-otp .wa-otp__btn--ghost:hover { background: var(--wa-surface); color: var(--wa-ink); }

/* Resend row */
.wa-otp .wa-otp__row {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 6px;
	margin: 16px 0 0;
	font-size: 14px;
	color: var(--wa-muted);
}

.wa-otp .wa-otp__link {
	margin: 0;
	padding: 4px 2px;
	background: none;
	border: 0;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wa-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-transform: none;
	letter-spacing: 0;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.wa-otp .wa-otp__link:hover { background: none; color: var(--wa-accent-hover); }
.wa-otp .wa-otp__link:disabled { color: var(--wa-faint); text-decoration: none; cursor: default; }

/* ---------- Messages ---------- */

.wa-otp .wa-otp__msg {
	margin: 16px 0 0;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.45;
	background: var(--wa-accent-soft);
	color: var(--wa-accent-hover);
}

.wa-otp .wa-otp__msg.is-error {
	background: var(--wa-error-bg);
	color: var(--wa-error);
}

/* ---------- Success ---------- */

.wa-otp .wa-otp__done {
	padding: 8px 0 4px;
	text-align: center;
}

.wa-otp .wa-otp__done > .wa-otp__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto;
	padding: 17px;
	border-radius: 50%;
	background: var(--wa-accent);
	color: #fff;
	stroke-width: 2.4;
	animation: waPop .4s cubic-bezier(.2, .9, .3, 1.3);
}

.wa-otp .wa-otp__done-title {
	margin: 18px 0 4px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wa-ink);
}

.wa-otp .wa-otp__done-text {
	margin: 0;
	font-size: 15px;
	color: var(--wa-muted);
}

.wa-otp .wa-otp__done .wa-otp__btn { margin-top: 22px; }

/* ---------- Footer ---------- */

.wa-otp .wa-otp__foot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 24px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid #eef2f0;
	font-size: 12.5px;
	color: var(--wa-faint);
	text-align: center;
}

.wa-otp .wa-otp__foot .wa-otp__icon { width: 14px; height: 14px; }

/* ---------- Exam dropdown + consent checkbox ---------- */

.wa-otp .wa-otp__select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6e6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	cursor: pointer;
}
.wa-otp .wa-otp__select:invalid { color: var(--wa-faint); }
.wa-otp .wa-otp__select option { color: var(--wa-ink); }

.wa-otp .wa-otp__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 2px 0 16px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--wa-muted);
	cursor: pointer;
}
.wa-otp .wa-otp__check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--wa-accent);
	cursor: pointer;
}

/* ---------- Honeypot, Turnstile, account page ---------- */

.wa-otp .wa-otp__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.wa-otp .wa-otp__turnstile { margin: 0 0 14px; min-height: 0; }

.wa-otp-account .wa-otp__sent { justify-content: flex-start; }
.wa-otp-account .wa-otp__foot { justify-content: center; }
.wa-otp-account .wa-otp__foot .wa-otp__link { font-weight: 600; }

/* ---------- Motion ---------- */

.wa-otp .wa-otp__step:not([hidden]),
.wa-otp .wa-otp__done:not([hidden]) { animation: waIn .24s ease both; }

@keyframes waIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes waSpin { to { transform: rotate(360deg); } }
@keyframes waPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes waShake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
	.wa-otp *,
	.wa-otp *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
	.wa-otp .wa-otp__btn.is-loading::before { animation: waSpin 1.4s linear infinite !important; }
}

/* ---------- Mobile (about 20% more compact) ----------
   Input text stays at 16px: anything smaller makes iPhones zoom the page on focus. */

@media (max-width: 520px) {
	.wa-otp {
		--wa-radius: 10px;
		margin: 10px auto;
		padding: 20px 16px 14px;
		border-radius: 14px;
		font-size: 13px;
		box-shadow: 0 1px 2px rgba(16, 32, 28, .04), 0 6px 18px -10px rgba(16, 32, 28, .12);
	}
	.wa-otp .wa-otp__badge { width: 36px; height: 36px; border-radius: 10px; }
	.wa-otp .wa-otp__badge .wa-otp__icon { width: 19px; height: 19px; }
	.wa-otp .wa-otp__title { margin: 12px 0 4px; font-size: 18px; }
	.wa-otp .wa-otp__sub { font-size: 13px; line-height: 1.45; }
	.wa-otp .wa-otp__progress { gap: 5px; margin: 14px 0 16px; }
	.wa-otp .wa-otp__bar { height: 3px; }

	.wa-otp .wa-otp__field { margin-bottom: 12px; }
	.wa-otp .wa-otp__label { margin-bottom: 5px; font-size: 12px; }
	.wa-otp .wa-otp__input { height: 42px; padding: 0 12px; }
	.wa-otp .wa-otp__phone { height: 42px; }
	.wa-otp .wa-otp__cc { padding: 0 11px; font-size: 14px; }
	.wa-otp .wa-otp__input:focus,
	.wa-otp .wa-otp__phone:focus-within { box-shadow: 0 0 0 3px var(--wa-accent-ring); }

	.wa-otp .wa-otp__code { height: 50px; font-size: 22px; letter-spacing: .4em; padding-left: calc(10px + .4em); }
	.wa-otp .wa-otp__code::placeholder { letter-spacing: .4em; }

	.wa-otp .wa-otp__sent { margin-bottom: 14px; padding: 6px 6px 6px 11px; font-size: 12.5px; }
	.wa-otp .wa-otp__edit { min-height: 30px; padding: 0 8px; font-size: 12.5px; }
	.wa-otp .wa-otp__edit .wa-otp__icon { width: 13px; height: 13px; }

	.wa-otp .wa-otp__btn { height: 44px; margin-top: 2px; font-size: 14.5px; gap: 8px; }
	.wa-otp .wa-otp__select { padding-right: 34px; background-position: right 12px center; }
	.wa-otp .wa-otp__check { gap: 8px; margin-bottom: 12px; font-size: 12px; }
	.wa-otp .wa-otp__check input { width: 16px; height: 16px; }
	.wa-otp .wa-otp__btn.is-loading::before { width: 15px; height: 15px; }
	.wa-otp .wa-otp__row { margin-top: 12px; font-size: 12.5px; }
	.wa-otp .wa-otp__link { font-size: 12.5px; }
	.wa-otp .wa-otp__msg { margin-top: 12px; padding: 9px 12px; font-size: 12.5px; border-radius: 8px; }

	.wa-otp .wa-otp__done > .wa-otp__icon { width: 50px; height: 50px; padding: 13px; }
	.wa-otp .wa-otp__done-title { margin: 14px 0 3px; font-size: 17px; }
	.wa-otp .wa-otp__done-text { font-size: 13px; }
	.wa-otp .wa-otp__done .wa-otp__btn { margin-top: 16px; }

	.wa-otp .wa-otp__foot { gap: 5px; margin-top: 16px; padding-top: 12px; font-size: 11px; }
	.wa-otp .wa-otp__foot .wa-otp__icon { width: 12px; height: 12px; }
}

@media (max-width: 360px) {
	.wa-otp { padding: 18px 14px 12px; }
	.wa-otp .wa-otp__sent { flex-wrap: wrap; }
	.wa-otp .wa-otp__code { font-size: 20px; letter-spacing: .3em; padding-left: calc(10px + .3em); }
	.wa-otp .wa-otp__code::placeholder { letter-spacing: .3em; }
}
