/* HD-4848 — Guest checkout OTP popup, styled like the site /login OTP step.
   Loaded on the website so /cart has the same tokens and controls as /login.
   Colors come from the website theme (no hardcoded hex). */

.rodin-guest-otp {
	--rg-primary: var(--rodin365-primary, var(--primary-color, currentColor));
	--rg-primary-deep: var(--rodin365-primary-deep, var(--dark-primary, var(--rg-primary)));
	--rg-on-primary: var(--rodin365-primary-foreground, var(--text-on-primary, white));
	--rg-fg: var(--rodin365-foreground, var(--text-color, inherit));
	--rg-muted: var(--rodin365-muted, var(--text-muted, gray));
	--rg-border: var(--rodin365-border, var(--gray-300, var(--border-color, currentColor)));
	--rg-bg: var(--rodin365-bg, var(--card-bg, Canvas));
	--rg-radius: var(--rodin365-radius, 0.75rem);
	--rg-danger: var(--rodin365-destructive, var(--red-600, crimson));
	--rg-shadow: var(--rodin365-shadow-elevated, 0 12px 40px color-mix(in srgb, var(--rg-primary) 12%, transparent));
	position: fixed;
	inset: 0;
	z-index: 1060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: color-mix(in srgb, black 50%, transparent);
	font-family: inherit;
	color: var(--rg-fg);
}

.rodin-guest-otp[hidden] {
	display: none;
}

.rodin-guest-otp__box {
	position: relative;
	width: 100%;
	max-width: 26rem;
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: var(--rg-bg);
	color: var(--rg-fg);
	border-radius: var(--rodin365-radius-2xl, 1.25rem);
	padding: 1.75rem 1.5rem 1.5rem;
	box-shadow: var(--rg-shadow);
	text-align: start;
}

.rodin-guest-otp--rtl,
.rodin-guest-otp--rtl .rodin-guest-otp__box {
	direction: rtl;
	text-align: right;
}

.rodin-guest-otp__close {
	position: absolute;
	top: 0.65rem;
	inset-inline-end: 0.65rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.rodin-guest-otp__logo {
	display: flex;
	justify-content: center;
	margin: 0 0 1.25rem;
}

.rodin-guest-otp__logo[hidden] {
	display: none;
}

.rodin-guest-otp__logo .app-logo {
	display: block;
	height: 2.25rem;
	width: auto;
	max-width: 180px;
	object-fit: contain;
	margin: 0;
}

.rodin-guest-otp .page-card-head {
	margin-bottom: 1.25rem;
	text-align: inherit;
}

.rodin-guest-otp .page-card-head h1 {
	font-size: 1.5rem;
	font-weight: 900;
	line-height: 1.25;
	margin: 0 0 0.5rem;
	color: var(--rg-fg);
	text-align: inherit;
	padding-inline-end: 2rem;
}

@media (min-width: 640px) {
	.rodin-guest-otp .page-card-head h1 {
		font-size: 1.875rem;
	}
}

.rodin-guest-otp .otp-instructions {
	font-size: 0.875rem;
	color: var(--rg-muted);
	margin: 0;
	text-align: inherit;
	line-height: 1.6;
}

.rodin-guest-otp .login-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--rg-fg);
	margin-bottom: 0.375rem;
	text-align: inherit;
}

.rodin-guest-otp .form-control {
	width: 100%;
	height: 3rem;
	border-radius: var(--rg-radius);
	border: 1px solid var(--rg-border);
	background: var(--rg-bg);
	padding: 0 1rem;
	font-size: 0.875rem;
	color: var(--rg-fg);
	outline: none;
	box-shadow: none;
	direction: ltr;
	text-align: left;
}

.rodin-guest-otp .form-control:focus {
	border-color: var(--rg-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--rg-primary) 20%, transparent);
}

.rodin-guest-otp .mobile-display-container {
	display: flex;
	justify-content: center;
	margin: 0 0 0.75rem;
}

.rodin-guest-otp .mobile-display-number {
	direction: ltr;
	unicode-bidi: isolate;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.04em;
	color: var(--rg-fg);
}

.rodin-guest-otp .otp-input-container {
	display: flex;
	direction: ltr;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 auto;
}

.rodin-guest-otp .otp-input-wrapper {
	flex: 0 0 auto;
}

.rodin-guest-otp .otp-input {
	width: 2.75rem;
	height: 3rem;
	border-radius: var(--rg-radius);
	border: 1px solid var(--rg-border);
	background: var(--rg-bg);
	text-align: center;
	font-size: 1.25rem;
	font-weight: 700;
	direction: ltr;
	color: var(--rg-fg);
	outline: none;
	padding: 0;
}

.rodin-guest-otp .otp-input:focus {
	border-color: var(--rg-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--rg-primary) 20%, transparent);
}

.rodin-guest-otp .otp-input.filled {
	border-color: var(--rg-primary);
}

.rodin-guest-otp .otp-input.otp-invalid,
.rodin-guest-otp .otp-input.otp-invalid:focus,
.rodin-guest-otp .otp-input.otp-invalid.filled {
	border-color: var(--rg-danger);
}

.rodin-guest-otp__error {
	min-height: 1.25rem;
	font-size: 0.8125rem;
	color: var(--rg-danger);
	margin: 0.5rem 0 0;
	text-align: inherit;
}

.rodin-guest-otp__error.is-visible {
	margin-top: 0.5rem;
}

.rodin-guest-otp .btn-login-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 3rem;
	margin-top: 0.75rem;
	border: none;
	outline: none;
	border-radius: var(--rg-radius);
	background: var(--rg-primary);
	color: var(--rg-on-primary);
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.rodin-guest-otp .btn-login-submit:hover:not(:disabled) {
	background: var(--rg-primary-deep);
	color: var(--rg-on-primary);
}

.rodin-guest-otp .btn-login-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.rodin-guest-otp__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
	font-size: 0.875rem;
}

.rodin-guest-otp .btn-edit-mobile,
.rodin-guest-otp .otp-resend-link,
.rodin-guest-otp .otp-resend-link button,
.rodin-guest-otp .otp-countdown {
	border: 0;
	background: none;
	padding: 0.25rem 0;
	color: var(--rg-primary);
	cursor: pointer;
	font-size: 0.875rem;
}

.rodin-guest-otp .otp-countdown,
.rodin-guest-otp .otp-resend-link button[disabled] {
	color: var(--rg-muted);
	cursor: default;
}

@media (max-width: 575.98px) {
	.rodin-guest-otp {
		align-items: flex-end;
		padding: 0;
	}

	.rodin-guest-otp__box {
		max-width: none;
		border-radius: var(--rodin365-radius-2xl, 1.25rem) var(--rodin365-radius-2xl, 1.25rem) 0 0;
		padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
	}
}
