/**
 * Phone OTP auth — Bizto Mahoor
 */

/* Prevent horizontal rubber-band / swipe scroll on mobile. */
html:has(body.bizto-auth-page) {
	overflow-x: hidden;
}

body.bizto-auth-page {
	overflow-x: hidden;
	max-width: 100%;
}

.bizto-auth-page .site,
.bizto-auth-page .site-content,
.bizto-auth-page .site-main,
.bizto-auth-page .site-main > .container,
.bizto-auth-page .page-article,
.bizto-auth-page .entry-content,
.bizto-auth-page .woocommerce {
	max-width: 100%;
	overflow-x: hidden;
}

.bizto-auth-page .entry-content {
	max-width: none;
	width: 100%;
	box-sizing: border-box;
}

.bizto-auth-page .page-article > .entry-header {
	display: none;
}

.bizto-auth-page .site-main {
	padding-top: 1.75rem;
	padding-bottom: 3rem;
}

.bizto-auth-page .site-main > .container {
	width: min(100% - 1.5rem, 1180px);
	padding-inline: 0;
	box-sizing: border-box;
}

.bizto-auth-page .woocommerce {
	max-width: none;
	float: none;
	width: 100%;
}

.bizto-auth {
	position: relative;
	width: min(100%, 440px);
	max-width: 100%;
	margin: 0 auto;
	padding: 0.5rem 0 1rem;
	box-sizing: border-box;
	overflow: hidden; /* clip decorative glow */
}

.bizto-auth__glow {
	position: absolute;
	inset: -8% 0 auto;
	left: 50%;
	right: auto;
	width: min(100%, 360px);
	height: 180px;
	transform: translateX(-50%);
	background:
		radial-gradient(closest-side, rgba(15, 107, 92, 0.16), transparent 70%),
		radial-gradient(closest-side, rgba(30, 58, 95, 0.1), transparent 72%);
	filter: blur(8px);
	pointer-events: none;
	z-index: 0;
}

.bizto-auth__card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	padding: 1.75rem 1.5rem 1.6rem;
	border-radius: 22px;
	border: 1px solid var(--bizto-border);
	background:
		linear-gradient(165deg, rgba(255, 254, 251, 0.98) 0%, #f7f4ef 100%);
	box-shadow: var(--bizto-shadow);
	overflow: hidden;
	box-sizing: border-box;
}

.bizto-auth__card.is-busy {
	pointer-events: none;
	user-select: none;
}

.bizto-auth__overlay {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(247, 244, 239, 0.72);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.bizto-auth__overlay:not([hidden]) {
	opacity: 1;
	visibility: visible;
}

.bizto-auth__overlay-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	text-align: center;
}

.bizto-auth__loader {
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 50%;
	border: 2px solid rgba(30, 58, 95, 0.14);
	border-top-color: #1e3a5f;
	border-right-color: var(--bizto-accent);
	animation: bizto-auth-spin 0.75s linear infinite;
	box-shadow: 0 0 0 6px rgba(15, 107, 92, 0.06);
}

.bizto-auth__overlay-text {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--bizto-ink);
	letter-spacing: -0.01em;
}

.bizto-auth__card::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-inline-end: 0;
	top: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--bizto-accent), #1e3a5f);
}

.bizto-auth__head {
	text-align: center;
	margin-bottom: 1.35rem;
}

.bizto-auth__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 0.85rem;
	border-radius: 16px;
	color: var(--bizto-accent);
	background: rgba(15, 107, 92, 0.1);
	border: 1px solid rgba(15, 107, 92, 0.14);
}

.bizto-auth__title {
	margin: 0 0 0.45rem;
	font-size: clamp(1.35rem, 3vw, 1.65rem);
	font-weight: 800;
	color: var(--bizto-ink);
	letter-spacing: -0.02em;
}

.bizto-auth__subtitle {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.65;
	color: var(--bizto-ink-muted);
}

.bizto-auth__notice {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	border-radius: 12px;
	border: 1px solid rgba(30, 58, 95, 0.16);
	background: rgba(30, 58, 95, 0.06);
	color: #1e3a5f;
	font-size: 0.86rem;
	line-height: 1.55;
}

.bizto-auth__alert {
	margin: 0 0 1rem;
	padding: 0.7rem 0.85rem;
	border-radius: 12px;
	font-size: 0.86rem;
	line-height: 1.5;
}

.bizto-auth__alert.is-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.bizto-auth__alert.is-success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.bizto-auth__step[hidden] {
	display: none !important;
}

.bizto-auth__label {
	display: block;
	margin: 0 0 0.45rem;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--bizto-ink);
}

.bizto-auth__phone-wrap {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--bizto-border);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	transition: border-color var(--bizto-transition), box-shadow var(--bizto-transition);
}

.bizto-auth__phone-wrap:focus-within {
	border-color: rgba(15, 107, 92, 0.55);
	box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.12);
}

.bizto-auth__phone-prefix {
	display: inline-flex;
	align-items: center;
	padding: 0 0.85rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--bizto-ink-muted);
	background: #f3f0ea;
	border-inline-end: 1px solid var(--bizto-border);
	direction: ltr;
	user-select: none;
}

.bizto-auth__input {
	flex: 1;
	width: 100%;
	min-width: 0;
	border: 0;
	outline: none;
	padding: 0.95rem 1rem;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	background: transparent;
	color: var(--bizto-ink);
}

.bizto-auth__hint {
	margin: 0.55rem 0 1.15rem;
	font-size: 0.8rem;
	color: var(--bizto-ink-muted);
}

.bizto-auth__otp-hint {
	margin: 0 0 1rem;
	padding: 0.65rem 0.8rem;
	border-radius: 12px;
	background: rgba(15, 107, 92, 0.07);
	color: var(--bizto-accent-hover);
	font-size: 0.86rem;
	line-height: 1.5;
	text-align: center;
}

.bizto-auth__otp {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: nowrap;
	gap: clamp(0.25rem, 1.8vw, 0.45rem);
	margin: 0 0 1.25rem;
	width: 100%;
	max-width: 100%;
	direction: ltr;
	box-sizing: border-box;
}

.bizto-auth__otp-digit {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	max-width: 2.75rem;
	height: 3.1rem;
	border: 1px solid var(--bizto-border);
	border-radius: 12px;
	background: #fff;
	text-align: center;
	font-size: clamp(1rem, 4.2vw, 1.25rem);
	font-weight: 800;
	font-family: inherit;
	color: var(--bizto-ink);
	transition: border-color var(--bizto-transition), box-shadow var(--bizto-transition);
	box-sizing: border-box;
}

.bizto-auth__otp-digit:focus {
	outline: none;
	border-color: rgba(15, 107, 92, 0.55);
	box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.12);
}

.bizto-auth__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 3.1rem;
	padding: 0.85rem 1.25rem;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, #1e3a5f 0%, #16304f 100%);
	color: #fff;
	font-family: inherit;
	font-size: 0.98rem;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	box-shadow: 0 10px 22px rgba(30, 58, 95, 0.22);
}

.bizto-auth__btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 14px 26px rgba(30, 58, 95, 0.28);
}

.bizto-auth__btn:disabled {
	opacity: 0.72;
	cursor: wait;
}

.bizto-auth__btn.is-loading .bizto-auth__btn-text {
	opacity: 0;
}

.bizto-auth__btn-spinner {
	display: none;
	position: absolute;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bizto-auth-spin 0.7s linear infinite;
}

.bizto-auth__btn.is-loading .bizto-auth__btn-spinner {
	display: block;
}

@keyframes bizto-auth-spin {
	to {
		transform: rotate(360deg);
	}
}

.bizto-auth__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	margin-top: 1rem;
}

.bizto-auth__link {
	border: 0;
	background: none;
	padding: 0.25rem 0;
	font-family: inherit;
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--bizto-accent);
	cursor: pointer;
}

.bizto-auth__link:disabled {
	color: var(--bizto-ink-muted);
	cursor: default;
}

.bizto-auth__link--muted {
	font-weight: 600;
	color: var(--bizto-ink-muted);
}

.bizto-auth__countdown {
	font-weight: 600;
	color: var(--bizto-ink-muted);
}

@media (max-width: 480px) {
	.bizto-auth-page .site-main {
		padding-top: 1.25rem;
		padding-bottom: 2rem;
	}

	.bizto-auth-page .site-main > .container {
		width: min(100% - 1rem, 1180px);
	}

	.bizto-auth {
		width: 100%;
		padding-inline: 0;
	}

	.bizto-auth__card {
		padding: 1.35rem 1rem 1.2rem;
		border-radius: 18px;
	}

	.bizto-auth__otp-digit {
		height: 2.85rem;
		max-width: 2.5rem;
		border-radius: 10px;
	}

	.bizto-auth__phone-prefix {
		padding: 0 0.65rem;
		font-size: 0.84rem;
	}

	.bizto-auth__input {
		padding: 0.85rem 0.75rem;
		font-size: 1rem;
	}

	.bizto-auth__actions {
		gap: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bizto-auth__btn,
	.bizto-auth__btn-spinner,
	.bizto-auth__loader,
	.bizto-auth__overlay,
	.bizto-auth__phone-wrap,
	.bizto-auth__otp-digit {
		transition: none;
		animation: none;
	}

	.bizto-auth__btn:hover:not(:disabled) {
		transform: none;
	}

	.bizto-auth__loader {
		border-top-color: #1e3a5f;
		opacity: 0.85;
	}
}
