/**
 * SMS OTP Login styles.
 * Kept theme-agnostic and lightweight; inherits fonts/colors from the theme.
 */

.sms-otp-widget {
	--sms-otp-radius: 6px;
	--sms-otp-border: rgba(0, 0, 0, 0.15);
	--sms-otp-accent: currentColor;
	margin: 1em 0;
	font-size: 14px;
	line-height: 1.5;
}

.sms-otp-widget .sms-otp-step {
	display: none;
}

.sms-otp-widget .sms-otp-step.--active {
	display: block;
}

.sms-otp-field {
	margin-bottom: 14px;
}

.sms-otp-label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.75;
}

.sms-otp-input,
.sms-otp-country {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid var(--sms-otp-border);
	border-radius: var(--sms-otp-radius);
	background: transparent;
	color: inherit;
	font: inherit;
}

.sms-otp-input:focus,
.sms-otp-country:focus {
	outline: none;
	border-color: var(--sms-otp-accent);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.sms-otp-phoneRow {
	display: flex;
	gap: 8px;
}

.sms-otp-phoneRow .sms-otp-country {
	flex: 0 0 auto;
	width: auto;
	min-width: 110px;
}

.sms-otp-phoneRow .sms-otp-input--phone {
	flex: 1 1 auto;
}

.sms-otp-input--code {
	letter-spacing: 0.5em;
	text-align: center;
	font-size: 20px;
	font-variant-numeric: tabular-nums;
}

.sms-otp-hint {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	opacity: 0.7;
}

.sms-otp-btn {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	border: 1px solid var(--sms-otp-accent);
	border-radius: var(--sms-otp-radius);
	background: var(--sms-otp-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.sms-otp-btn:hover {
	opacity: 0.88;
}

.sms-otp-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

.sms-otp-btn--line {
	background: transparent;
	color: inherit;
}

.sms-otp-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 12px 0;
	flex-wrap: wrap;
}

.sms-otp-link {
	background: none;
	border: none;
	padding: 4px 0;
	color: inherit;
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.85;
}

.sms-otp-link:disabled {
	opacity: 0.5;
	cursor: default;
	text-decoration: none;
}

.sms-otp-link:hover:not(:disabled) {
	opacity: 1;
}

.sms-otp-back {
	display: inline-block;
	margin-top: 6px;
}

.sms-otp-status {
	margin: 0 0 14px;
	font-size: 13px;
	opacity: 0.85;
}

.sms-otp-status[data-hint="ok"] {
	color: #1a7f37;
	opacity: 1;
}

.sms-otp-status[data-hint="warn"] {
	color: #9a6700;
	opacity: 1;
}

.sms-otp-notice {
	display: none;
	margin-bottom: 12px;
	padding: 10px 12px;
	border-radius: var(--sms-otp-radius);
	font-size: 13px;
}

.sms-otp-notice.--error {
	display: block;
	background: rgba(200, 30, 30, 0.08);
	color: #b91c1c;
	border: 1px solid rgba(200, 30, 30, 0.25);
}

.sms-otp-notice.--ok {
	display: block;
	background: rgba(26, 127, 55, 0.08);
	color: #1a7f37;
	border: 1px solid rgba(26, 127, 55, 0.25);
}

.sms-otp-widget.--loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Panel integration */
.sms-otp-sep {
	position: relative;
	text-align: center;
	margin: 18px 0 14px;
	opacity: 0.6;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.sms-otp-sep::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--sms-otp-border);
}

.sms-otp-sep span {
	position: relative;
	display: inline-block;
	padding: 0 10px;
	background: var(--body-bg-color, #fff);
}

.sms-otp-panel--collapsed .sms-otp-widget {
	display: none;
}

.sms-otp-panel--open .sms-otp-sep {
	display: none;
}

/* "Back to login with password" — below the widget, only while SMS flow is open. */
.sms-otp-panelBack {
	display: none;
	width: 100%;
	margin-top: 22px;
	text-align: center;
}

.sms-otp-panel--open .sms-otp-panelBack {
	display: block;
}

.sms-otp-panel--collapsed .sms-otp-panelBack {
	display: none;
}

/* When SMS mode is active inside the Rey panel, hide the standard forms. */
.rey-accountForms.sms-otp-mode > .rey-accountPanel-form,
.rey-accountForms.sms-otp-mode > form {
	display: none !important;
}
