/* ============================================
   فقط پیامک (Just SMS) - Frontend Styles
   Version: 1.1.0 — Premium UI
   ============================================ */

/* ===== Base ===== */
.justsms-otp-wrapper {
	max-width: 420px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Vazirmatn", sans-serif;
	direction: rtl;
	-webkit-font-smoothing: antialiased;
}

.justsms-otp-form {
	position: relative;
	background: #ffffff;
	border-radius: 24px;
	padding: 40px 32px 32px;
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.9);
	box-shadow:
		0 4px 6px -1px rgba(15, 23, 42, 0.04),
		0 20px 50px -12px rgba(15, 23, 42, 0.12);
	transition: box-shadow 0.3s ease;
}

/* نوار گرادیان بالای فرم */
.justsms-otp-form::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
	border-radius: 24px 24px 0 0;
}

/* ===== Layouts ===== */
.justsms-layout-compact .justsms-otp-form {
	padding: 32px 24px 24px;
	border-radius: 20px;
}

.justsms-layout-minimal .justsms-otp-form {
	padding: 24px 20px 20px;
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	border: 1px solid #e2e8f0;
}

.justsms-layout-minimal .justsms-otp-form::before {
	height: 3px;
}

/* ===== Header ===== */
.justsms-form-header {
	text-align: center;
	margin-bottom: 28px;
}

.justsms-form-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
	font-size: 26px;
	margin: 0 auto 14px;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.justsms-form-title {
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 6px 0;
	line-height: 1.35;
	letter-spacing: -0.02em;
}

.justsms-form-subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.6;
}

/* ===== Steps ===== */
.justsms-step {
	transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.justsms-step-phone {
	display: block;
}

.justsms-step-code {
	display: none;
	animation: justsmsFadeSlide 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes justsmsFadeSlide {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.justsms-step-header {
	text-align: center;
	margin-bottom: 22px;
}

.justsms-step-title {
	font-size: 17px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 4px 0;
}

.justsms-step-subtitle {
	font-size: 13px;
	color: #94a3b8;
	margin: 0;
	line-height: 1.5;
}

/* ===== Labels ===== */
.justsms-field-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 8px;
	letter-spacing: 0.01em;
}

/* ===== Inputs ===== */
.justsms-input-group {
	position: relative;
	margin-bottom: 16px;
}

.justsms-input-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	line-height: 1;
	pointer-events: none;
	z-index: 2;
	filter: grayscale(0.2);
	opacity: 0.9;
}

.justsms-input-group input[type="text"],
.justsms-input-group input[type="tel"] {
	width: 100%;
	padding: 15px 48px 15px 16px;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	box-sizing: border-box;
	font-size: 15px;
	font-family: inherit;
	background: #f8fafc;
	transition: all 0.22s ease;
	color: #0f172a;
	direction: ltr;
	text-align: left;
	outline: none;
	-webkit-appearance: none;
}

.justsms-input-group input[type="text"]:hover,
.justsms-input-group input[type="tel"]:hover {
	border-color: #cbd5e1;
	background: #f1f5f9;
}

.justsms-input-group input[type="text"]:focus,
.justsms-input-group input[type="tel"]:focus {
	border-color: #6366f1;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.justsms-input-group input::placeholder {
	color: #94a3b8;
	font-size: 14px;
	font-weight: 400;
}

.justsms-input-group input.justsms-code {
	letter-spacing: 0.35em;
	font-weight: 700;
	font-size: 22px;
	text-align: center;
	padding: 16px 16px;
	font-variant-numeric: tabular-nums;
}

/* ===== Primary Button ===== */
.justsms-btn-primary {
	width: 100%;
	padding: 15px 20px;
	border: none;
	border-radius: 14px;
	background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
	color: #ffffff;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	overflow: hidden;
	box-shadow:
		0 4px 14px rgba(99, 102, 241, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
	letter-spacing: 0.01em;
	line-height: 1.4;
}

.justsms-btn-primary::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.justsms-btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow:
		0 8px 24px rgba(99, 102, 241, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
}

.justsms-btn-primary:hover:not(:disabled)::after {
	opacity: 1;
}

.justsms-btn-primary:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.justsms-btn-primary:disabled {
	background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
	opacity: 0.75;
}

.justsms-btn-primary .btn-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: justsmsSpin 0.65s linear infinite;
	vertical-align: middle;
	margin-left: 10px;
}

@keyframes justsmsSpin {
	to { transform: rotate(360deg); }
}

/* ===== Secondary actions ===== */
.justsms-actions {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.justsms-actions-extra {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding-top: 4px;
}

.justsms-back-link,
.justsms-resend-link {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	font-size: 12.5px;
	font-weight: 500;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 8px 14px;
	font-family: inherit;
	text-decoration: none;
	border-radius: 10px;
	line-height: 1.4;
}

.justsms-back-link:hover,
.justsms-resend-link:hover {
	color: #4f46e5;
	background: #eef2ff;
	border-color: #c7d2fe;
}

.justsms-resend-link:disabled {
	color: #94a3b8;
	cursor: not-allowed;
	background: #f1f5f9;
	border-color: #e2e8f0;
	opacity: 0.85;
}

/* ===== Divider ===== */
.justsms-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 22px 0 0;
	color: #94a3b8;
	font-size: 12px;
}

.justsms-divider::before,
.justsms-divider::after {
	content: "";
	flex: 1;
	border-bottom: 1px solid #e2e8f0;
}

.justsms-divider::before { margin-left: 14px; }
.justsms-divider::after { margin-right: 14px; }

.justsms-divider span {
	padding: 0 6px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

/* ===== Messages ===== */
.justsms-message {
	margin-top: 16px;
	font-size: 13.5px;
	color: #475569;
	padding: 12px 16px;
	border-radius: 12px;
	background: #f1f5f9;
	transition: all 0.3s ease;
	min-height: 0;
	line-height: 1.6;
	display: none;
	font-weight: 500;
}

.justsms-message:not(:empty) {
	display: block;
}

.justsms-message.success {
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.justsms-message.error {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	color: #334155;
	border: 1px solid #cbd5e1;
}

.justsms-message.info {
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

/* ===== Loading Overlay ===== */
.justsms-loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 100;
	border-radius: 24px;
}

.justsms-loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #e2e8f0;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: justsmsSpin 0.75s linear infinite;
}

.justsms-loading-text {
	margin-top: 14px;
	font-size: 13px;
	color: #64748b;
	font-weight: 500;
}

/* ===== Success state ===== */
.justsms-form-success {
	text-align: center;
	padding: 24px 0 8px;
}

.justsms-form-success .success-icon {
	font-size: 48px;
	margin-bottom: 12px;
	display: block;
}

.justsms-form-success .success-title {
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 6px 0;
}

.justsms-form-success .success-message {
	font-size: 14px;
	color: #64748b;
	margin: 0;
}

/* ===== Modal — Premium ===== */
.justsms-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
	padding: 16px;
	box-sizing: border-box;
}

.justsms-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.justsms-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
}

.justsms-modal-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	animation: justsmsModalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes justsmsModalIn {
	from {
		opacity: 0;
		transform: translateY(24px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* دکمه بستن — شیک و واضح */
.justsms-modal-close {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 10;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 12px;
	background: rgba(241, 245, 249, 0.95);
	color: #64748b;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	font-family: inherit;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	backdrop-filter: blur(4px);
}

.justsms-modal-close:hover {
	background: #e0e7ff;
	color: #4338ca;
	transform: scale(1.06);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.18);
}

.justsms-modal-close:active {
	transform: scale(0.96);
}

.justsms-modal-body .justsms-otp-form {
	margin: 0;
	box-shadow:
		0 25px 50px -12px rgba(15, 23, 42, 0.25),
		0 0 0 1px rgba(255, 255, 255, 0.1);
}

.justsms-modal-body .justsms-form-header {
	padding-left: 28px; /* جا برای دکمه بستن */
}

body.justsms-modal-open {
	overflow: hidden;
}

/* ===== Lock page ===== */
.justsms-lock-page {
	width: 100%;
	max-width: 420px;
	padding: 20px;
}

.justsms-lock-page .lock-icon {
	text-align: center;
	font-size: 48px;
	margin-bottom: 10px;
	line-height: 1;
	filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.25));
}

.justsms-lock-page .lock-title {
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 6px;
	letter-spacing: -0.02em;
}

.justsms-lock-page .lock-subtitle {
	text-align: center;
	font-size: 14px;
	color: #64748b;
	margin-bottom: 24px;
	line-height: 1.6;
}

.justsms-lock-page .lock-back {
	text-align: center;
	margin-top: 20px;
}

.justsms-lock-page .lock-back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #64748b;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: 10px;
	transition: all 0.2s ease;
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(226, 232, 240, 0.8);
}

.justsms-lock-page .lock-back a:hover {
	color: #4f46e5;
	background: #ffffff;
	border-color: #c7d2fe;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
	.justsms-otp-form {
		padding: 32px 20px 24px;
		border-radius: 20px;
		margin: 0 4px;
	}

	.justsms-form-title {
		font-size: 19px;
	}

	.justsms-form-badge {
		width: 48px;
		height: 48px;
		font-size: 22px;
		border-radius: 14px;
	}

	.justsms-input-group input[type="text"],
	.justsms-input-group input[type="tel"] {
		font-size: 14px;
		padding: 14px 44px 14px 14px;
		border-radius: 12px;
	}

	.justsms-btn-primary {
		font-size: 14.5px;
		padding: 14px 16px;
		border-radius: 12px;
	}

	.justsms-actions-extra {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.justsms-back-link,
	.justsms-resend-link {
		text-align: center;
		width: 100%;
		box-sizing: border-box;
	}

	.justsms-input-group input.justsms-code {
		letter-spacing: 0.25em;
		font-size: 20px;
	}

	.justsms-modal {
		padding: 12px;
	}

	.justsms-modal-close {
		top: 12px;
		left: 12px;
		width: 34px;
		height: 34px;
	}

	.justsms-layout-compact .justsms-otp-form {
		padding: 28px 18px 20px;
	}
}

/* ===== Dark Mode ===== */
@media (prefers-color-scheme: dark) {
	.justsms-otp-form {
		background: #1e293b;
		border-color: #334155;
		box-shadow:
			0 4px 6px -1px rgba(0, 0, 0, 0.2),
			0 20px 50px -12px rgba(0, 0, 0, 0.4);
	}

	.justsms-form-badge {
		background: linear-gradient(135deg, #1e3a5f 0%, #312e81 100%);
		box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
	}

	.justsms-form-title,
	.justsms-step-title {
		color: #f1f5f9;
	}

	.justsms-form-subtitle,
	.justsms-step-subtitle {
		color: #94a3b8;
	}

	.justsms-field-label {
		color: #e2e8f0;
	}

	.justsms-input-group input[type="text"],
	.justsms-input-group input[type="tel"] {
		background: #0f172a;
		border-color: #334155;
		color: #f1f5f9;
	}

	.justsms-input-group input:hover {
		background: #1e293b;
		border-color: #475569;
	}

	.justsms-input-group input:focus {
		background: #0f172a;
		border-color: #6366f1;
		box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
	}

	.justsms-back-link,
	.justsms-resend-link {
		background: #0f172a;
		border-color: #334155;
		color: #94a3b8;
	}

	.justsms-back-link:hover,
	.justsms-resend-link:hover {
		background: #312e81;
		border-color: #4f46e5;
		color: #c7d2fe;
	}

	.justsms-divider::before,
	.justsms-divider::after {
		border-bottom-color: #334155;
	}

	.justsms-message {
		background: #0f172a;
		color: #cbd5e1;
	}

	.justsms-message.success {
		background: linear-gradient(135deg, #052e16 0%, #14532d 100%);
		color: #86efac;
		border-color: #166534;
	}

	.justsms-message.error {
		background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
		color: #cbd5e1;
		border-color: #475569;
	}

	.justsms-message.info {
		background: linear-gradient(135deg, #1e3a5f 0%, #1e3a8a 100%);
		color: #93c5fd;
		border-color: #1e40af;
	}

	.justsms-loading-overlay {
		background: rgba(15, 23, 42, 0.9);
	}

	.justsms-modal-backdrop {
		background: rgba(0, 0, 0, 0.7);
	}

	.justsms-modal-close {
		background: rgba(30, 41, 59, 0.95);
		color: #94a3b8;
	}

	.justsms-modal-close:hover {
		background: #312e81;
		color: #c7d2fe;
	}

	.justsms-lock-page .lock-title {
		color: #f1f5f9;
	}

	.justsms-lock-page .lock-back a {
		background: rgba(30, 41, 59, 0.8);
		border-color: #334155;
		color: #94a3b8;
	}

	.justsms-lock-page .lock-back a:hover {
		color: #a5b4fc;
		border-color: #4f46e5;
	}

	.justsms-form-success .success-title {
		color: #f1f5f9;
	}
}

/* ===== OTP Digit Boxes ===== */
.justsms-phone-hint {
	text-align: center;
	font-size: 13px;
	color: var(--jsms-subtitle, #64748b);
	margin: 0 0 16px;
	line-height: 1.5;
	font-weight: 500;
}

.justsms-otp-digits {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	direction: ltr;
}

.justsms-otp-digit {
	width: 48px;
	height: 56px;
	border: 1.5px solid var(--jsms-input-border, #e2e8f0);
	border-radius: 12px;
	background: var(--jsms-input-bg, #f8fafc);
	color: var(--jsms-input-text, #0f172a);
	font-size: 22px;
	font-weight: 700;
	text-align: center;
	font-variant-numeric: tabular-nums;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.15s ease;
	-webkit-appearance: none;
	caret-color: var(--jsms-focus, #6366f1);
	padding: 0;
	box-sizing: border-box;
}

.justsms-otp-digit:hover {
	border-color: #cbd5e1;
}

.justsms-otp-digit:focus {
	border-color: var(--jsms-focus, #6366f1);
	background: #ffffff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--jsms-focus, #6366f1) 18%, transparent);
}

.justsms-otp-digit.is-filled {
	border-color: var(--jsms-primary, #6366f1);
	background: #ffffff;
}

.justsms-otp-digit.is-error {
	border-color: #94a3b8;
	animation: justsmsDigitPulse 0.35s ease;
}

.justsms-otp-digits.is-shake {
	animation: justsmsShake 0.4s ease;
}

@keyframes justsmsShake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

@keyframes justsmsDigitPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}

@media (max-width: 420px) {
	.justsms-otp-digits {
		gap: 6px;
	}
	.justsms-otp-digit {
		width: 40px;
		height: 48px;
		font-size: 18px;
		border-radius: 10px;
	}
}

@media (prefers-color-scheme: dark) {
	.justsms-otp-digit {
		background: #0f172a;
		border-color: #334155;
		color: #f1f5f9;
	}
	.justsms-otp-digit:focus,
	.justsms-otp-digit.is-filled {
		background: #1e293b;
	}
	.justsms-phone-hint {
		color: #94a3b8;
	}
}

/* ===== Circular Resend Timer ===== */
.justsms-resend-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 4px 0 8px;
}

.justsms-timer {
	position: relative;
	width: 52px;
	height: 52px;
	display: none;
	align-items: center;
	justify-content: center;
	contain: layout style;
}

.justsms-timer[data-active="1"] {
	display: flex;
	animation: justsmsTimerIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes justsmsTimerIn {
	from { opacity: 0; transform: scale(0.8); }
	to { opacity: 1; transform: scale(1); }
}

.justsms-timer-svg {
	position: absolute;
	inset: 0;
	width: 52px;
	height: 52px;
	transform: scaleX(-1);
	overflow: visible;
}

.justsms-timer-track {
	stroke: var(--jsms-input-border, #e2e8f0);
	opacity: 0.9;
}

.justsms-timer-progress {
	stroke: var(--jsms-primary, #6366f1);
	/* بدون transition تا rAF نرم باشد */
	transition: none;
	will-change: stroke-dashoffset;
}

.justsms-timer.is-ending .justsms-timer-progress {
	stroke: var(--jsms-primary-end, #3b82f6);
}

.justsms-timer-text {
	position: relative;
	z-index: 1;
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--jsms-title, #0f172a);
	line-height: 1;
	direction: ltr;
	min-width: 1.5em;
	text-align: center;
	transition: color 0.2s ease;
}

.justsms-timer-text.is-tick {
	animation: justsmsSecTick 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes justsmsSecTick {
	0% { transform: scale(1.18); opacity: 0.65; }
	100% { transform: scale(1); opacity: 1; }
}

.justsms-timer.is-ending .justsms-timer-text {
	color: var(--jsms-primary, #6366f1);
	animation: justsmsSecPulse 0.9s ease-in-out infinite;
}

@keyframes justsmsSecPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

.justsms-resend-link {
	background: transparent;
	border: none;
	color: var(--jsms-link, #475569);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 12px;
	border-radius: 8px;
	transition: color 0.2s, background 0.2s, opacity 0.2s;
	font-family: inherit;
}

.justsms-resend-link:hover:not(:disabled) {
	color: var(--jsms-link-hover, #4f46e5);
	background: color-mix(in srgb, var(--jsms-link-hover, #4f46e5) 8%, transparent);
}

.justsms-resend-link:disabled,
.justsms-resend-link.is-waiting {
	opacity: 0.55;
	cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
	.justsms-timer[data-active="1"],
	.justsms-timer-text.is-tick,
	.justsms-timer.is-ending .justsms-timer-text {
		animation: none;
	}
	.justsms-timer-progress {
		will-change: auto;
	}
}

@media (prefers-color-scheme: dark) {
	.justsms-timer-track {
		stroke: #334155;
	}
	.justsms-timer-text {
		color: #e2e8f0;
	}
}

/* ===== Compact form (less vertical length) ===== */
.justsms-otp-form {
	padding: 28px 24px 20px !important;
}

.justsms-form-header {
	margin-bottom: 16px !important;
}

.justsms-form-badge {
	margin-bottom: 8px !important;
	font-size: 28px !important;
}

.justsms-form-logo img {
	margin-bottom: 8px !important;
}

.justsms-form-title {
	font-size: 20px !important;
	margin-bottom: 4px !important;
}

.justsms-form-subtitle {
	font-size: 13px !important;
}

/* در مرحله کد: هدر اصلی جمع، زیرعنوان مخفی */
.justsms-otp-form.is-code-step .justsms-form-subtitle {
	display: none !important;
}

.justsms-otp-form.is-code-step .justsms-form-header {
	margin-bottom: 10px !important;
}

.justsms-otp-form.is-code-step .justsms-form-title {
	font-size: 17px !important;
}

.justsms-otp-form.is-code-step .justsms-divider {
	display: none !important;
}

.justsms-otp-form.is-code-step .justsms-form-badge,
.justsms-otp-form.is-code-step .justsms-form-logo {
	display: none !important;
}

.justsms-step-header {
	margin-bottom: 10px !important;
}

.justsms-step-title {
	font-size: 15px !important;
	margin-bottom: 2px !important;
}

.justsms-step-subtitle {
	font-size: 12.5px !important;
}

.justsms-phone-hint {
	font-size: 12px !important;
	margin: 0 0 10px !important;
	color: var(--jsms-primary, #6366f1) !important;
	font-weight: 600 !important;
}

.justsms-otp-digits {
	gap: 8px !important;
	margin: 0 0 14px !important;
}

.justsms-otp-digit {
	width: 44px !important;
	height: 48px !important;
	font-size: 20px !important;
	border-radius: 10px !important;
}

.justsms-btn-primary {
	padding: 12px 16px !important;
	font-size: 14.5px !important;
	margin-bottom: 0 !important;
}

.justsms-actions {
	gap: 10px !important;
}

.justsms-resend-wrap {
	flex-direction: row !important;
	gap: 12px !important;
	margin: 8px 0 0 !important;
	min-height: 0;
}

.justsms-timer {
	width: 40px !important;
	height: 40px !important;
}

.justsms-timer-svg {
	width: 40px !important;
	height: 40px !important;
}

.justsms-timer-text {
	font-size: 11.5px !important;
}

.justsms-resend-link {
	font-size: 12.5px !important;
	padding: 4px 8px !important;
}

.justsms-actions-extra {
	margin-top: 4px !important;
	padding-top: 0 !important;
	justify-content: center !important;
}

.justsms-back-link {
	font-size: 12.5px !important;
	padding: 6px 10px !important;
}

.justsms-divider {
	margin: 14px 0 0 !important;
}

.justsms-message {
	margin-top: 10px !important;
	padding: 8px 12px !important;
	font-size: 12.5px !important;
}

.justsms-modal-dialog {
	max-height: 92vh;
	overflow-y: auto;
}

.justsms-modal-body {
	padding: 0 !important;
}

.justsms-modal-body .justsms-otp-wrapper {
	margin: 0;
	max-width: 100%;
}

.justsms-modal-body .justsms-otp-form {
	box-shadow: none !important;
	border: none !important;
	padding: 8px 4px 4px !important;
}

.justsms-modal-close {
	top: 10px !important;
	left: 10px !important;
	width: 36px !important;
	height: 36px !important;
}

@media (max-width: 420px) {
	.justsms-otp-digit {
		width: 38px !important;
		height: 44px !important;
		font-size: 17px !important;
	}
	.justsms-otp-form {
		padding: 22px 16px 16px !important;
	}
	.justsms-modal-body .justsms-otp-form {
		padding: 4px 0 !important;
	}
}

/* =========================================================
   UI v2 — clean compact design (reference style)
   ========================================================= */

.justsms-ui-v2.justsms-otp-form {
	background: #ffffff !important;
	border-radius: 20px !important;
	padding: 28px 24px 22px !important;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12) !important;
	border: none !important;
	max-width: 400px;
	margin: 0 auto;
}

.justsms-ui-v2.justsms-otp-form::before {
	display: none !important;
}

.justsms-ui-v2 .justsms-form-header {
	text-align: center;
	margin-bottom: 20px !important;
}

.justsms-ui-v2 .justsms-form-logo {
	margin-bottom: 10px !important;
}

.justsms-ui-v2 .justsms-form-logo img {
	margin: 0 auto 8px !important;
	max-height: 40px !important;
}

.justsms-ui-v2 .justsms-form-title {
	font-size: 22px !important;
	font-weight: 800 !important;
	color: var(--jsms-primary, #2563eb) !important;
	margin: 0 0 10px !important;
	letter-spacing: -0.02em;
}

.justsms-ui-v2 .justsms-form-subtitle {
	font-size: 12.5px !important;
	color: #94a3b8 !important;
	margin: 0 !important;
	line-height: 1.6;
	font-weight: 500;
}

/* Floating field */
.justsms-ui-v2 .justsms-field {
	position: relative;
	margin-bottom: 16px;
}

.justsms-ui-v2 .justsms-float-label {
	position: absolute;
	top: -9px;
	right: 14px;
	background: #fff;
	padding: 0 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--jsms-primary, #2563eb);
	z-index: 1;
	pointer-events: none;
}

.justsms-ui-v2 .justsms-phone {
	width: 100%;
	height: 52px;
	border: 1.5px solid var(--jsms-primary, #2563eb) !important;
	border-radius: 12px !important;
	padding: 12px 16px !important;
	font-size: 16px !important;
	font-weight: 600;
	color: #0f172a !important;
	background: #fff !important;
	box-sizing: border-box;
	outline: none;
	direction: ltr;
	text-align: left;
	transition: box-shadow 0.2s, border-color 0.2s;
}

.justsms-ui-v2 .justsms-phone:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jsms-primary, #2563eb) 20%, transparent) !important;
}

.justsms-ui-v2 .justsms-input-group,
.justsms-ui-v2 .justsms-input-icon,
.justsms-ui-v2 .justsms-field-label {
	display: none !important;
}

/* Primary button */
.justsms-ui-v2 .justsms-btn-primary {
	width: 100%;
	height: 50px;
	border: none !important;
	border-radius: 12px !important;
	background: var(--jsms-primary, #2563eb) !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	cursor: pointer;
	box-shadow: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: filter 0.2s, background 0.2s, transform 0.15s;
}

.justsms-ui-v2 .justsms-btn-primary:hover:not(:disabled) {
	filter: brightness(1.05);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px color-mix(in srgb, var(--jsms-primary, #2563eb) 30%, transparent) !important;
}

.justsms-ui-v2 .justsms-btn-primary.is-loading,
.justsms-ui-v2 .justsms-btn-primary:disabled {
	background: #1e293b !important;
	opacity: 1;
	cursor: wait;
}

/* Code step */
.justsms-ui-v2.is-code-step .justsms-form-subtitle,
.justsms-ui-v2.is-code-step .justsms-form-logo,
.justsms-ui-v2.is-code-step .justsms-divider {
	display: none !important;
}

.justsms-ui-v2.is-code-step .justsms-form-title {
	display: none !important;
}

.justsms-ui-v2 .justsms-step-header {
	text-align: center;
	margin-bottom: 8px !important;
}

.justsms-ui-v2 .justsms-step-title {
	font-size: 20px !important;
	font-weight: 800 !important;
	color: var(--jsms-primary, #2563eb) !important;
	margin: 0 !important;
}

.justsms-ui-v2 .justsms-timer-hero {
	display: flex !important;
	justify-content: center;
	margin: 12px 0 14px !important;
}

.justsms-ui-v2 .justsms-timer {
	width: 96px !important;
	height: 96px !important;
	display: none;
	align-items: center;
	justify-content: center;
	position: relative;
}

.justsms-ui-v2 .justsms-timer[data-active="1"] {
	display: flex !important;
}

.justsms-ui-v2 .justsms-timer-svg {
	width: 96px !important;
	height: 96px !important;
	transform: scaleX(-1);
}

.justsms-ui-v2 .justsms-timer-track {
	stroke: #dbeafe !important;
}

.justsms-ui-v2 .justsms-timer-progress {
	stroke: var(--jsms-primary, #2563eb) !important;
}

.justsms-ui-v2 .justsms-timer-text {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #64748b !important;
	direction: ltr;
}

.justsms-ui-v2 .justsms-phone-hint,
.justsms-ui-v2 .justsms-code-help {
	text-align: center;
	font-size: 12.5px !important;
	color: #64748b !important;
	line-height: 1.7;
	margin: 0 0 12px !important;
	font-weight: 500 !important;
}

.justsms-ui-v2 .justsms-otp-digits {
	gap: 8px !important;
	margin: 0 0 18px !important;
	justify-content: center;
}

.justsms-ui-v2 .justsms-otp-digit {
	width: 44px !important;
	height: 48px !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 10px !important;
	background: #f8fafc !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
}

.justsms-ui-v2 .justsms-otp-digit:focus,
.justsms-ui-v2 .justsms-otp-digit.is-filled {
	border-color: var(--jsms-primary, #2563eb) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jsms-primary, #2563eb) 18%, transparent) !important;
}

/* Two buttons row */
.justsms-ui-v2 .justsms-actions-row {
	display: flex !important;
	flex-direction: row !important;
	gap: 10px !important;
	align-items: stretch;
}

.justsms-ui-v2 .justsms-btn-secondary,
.justsms-ui-v2 .justsms-back-link.justsms-btn-secondary {
	flex: 1;
	height: 48px;
	border: none !important;
	border-radius: 12px !important;
	background: #dbeafe !important;
	color: var(--jsms-primary, #2563eb) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	cursor: pointer;
	padding: 0 12px !important;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: filter 0.2s, background 0.2s;
}

.justsms-ui-v2 .justsms-btn-secondary:hover {
	filter: brightness(0.96);
}

.justsms-ui-v2 .justsms-actions-row .justsms-verify-btn {
	flex: 1;
	width: auto !important;
	height: 48px;
}

.justsms-ui-v2 .justsms-resend-link {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 10px;
	font-size: 13px !important;
	color: var(--jsms-primary, #2563eb) !important;
	background: none;
	border: none;
	cursor: pointer;
	font-weight: 600;
	padding: 6px;
}

.justsms-ui-v2 .justsms-message {
	margin-top: 12px !important;
	padding: 10px 12px !important;
	font-size: 12.5px !important;
	border-radius: 10px !important;
	text-align: center;
}

/* Modal shell */
.justsms-modal-dialog {
	background: transparent !important;
	box-shadow: none !important;
	max-width: 420px !important;
	width: calc(100% - 32px) !important;
	position: relative;
}

.justsms-modal-body {
	padding: 0 !important;
}

.justsms-modal-body .justsms-otp-form {
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18) !important;
}

.justsms-modal-close {
	position: absolute !important;
	top: -12px !important;
	left: auto !important;
	right: 12px !important;
	z-index: 5;
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	height: 36px !important;
	width: auto !important;
	padding: 0 14px 0 12px !important;
	border: none !important;
	border-radius: 999px !important;
	background: #ef4444 !important;
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
	font-family: inherit;
}

.justsms-modal-close:hover {
	background: #dc2626 !important;
	color: #fff !important;
	transform: scale(1.03);
}

.justsms-modal-close svg {
	display: block;
	flex-shrink: 0;
}

@media (max-width: 420px) {
	.justsms-ui-v2.justsms-otp-form {
		padding: 22px 16px 16px !important;
	}
	.justsms-ui-v2 .justsms-otp-digit {
		width: 38px !important;
		height: 44px !important;
	}
	.justsms-ui-v2 .justsms-timer,
	.justsms-ui-v2 .justsms-timer-svg {
		width: 84px !important;
		height: 84px !important;
	}
}

/* Close button: left side, fully visible, below top edge */
.justsms-modal-dialog {
	overflow: visible !important;
	padding-top: 0 !important;
}

.justsms-modal-close,
.justsms-modal .justsms-modal-close {
	position: absolute !important;
	top: 14px !important;
	left: 14px !important;
	right: auto !important;
	z-index: 30 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	min-width: 72px !important;
	height: 36px !important;
	padding: 0 12px !important;
	border: none !important;
	border-radius: 999px !important;
	background: #ef4444 !important;
	color: #ffffff !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35) !important;
	pointer-events: auto !important;
	-webkit-tap-highlight-color: transparent;
}

.justsms-modal-close span,
.justsms-modal-close svg {
	pointer-events: none !important; /* کلیک همیشه روی دکمه ثبت شود */
}

.justsms-modal-close:hover {
	background: #dc2626 !important;
	color: #fff !important;
}

/* فاصله بالای فرم تا دکمه روی محتوا نیفتد */
.justsms-modal-body .justsms-ui-v2.justsms-otp-form,
.justsms-modal-body .justsms-otp-form {
	padding-top: 48px !important;
}

/* ===== Profile wizard ===== */
.justsms-profile-progress {
	height: 4px;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
	margin: 0 0 18px;
}

.justsms-profile-progress-bar {
	display: block;
	height: 100%;
	width: 0%;
	background: var(--jsms-primary, #2563eb);
	border-radius: 999px;
	transition: width 0.35s ease;
}

.justsms-profile-field {
	margin-bottom: 8px;
}

.justsms-profile-input {
	width: 100%;
	height: 52px;
	border: 1.5px solid var(--jsms-primary, #2563eb) !important;
	border-radius: 12px !important;
	padding: 12px 16px !important;
	font-size: 15px !important;
	font-weight: 600;
	color: #0f172a !important;
	background: #fff !important;
	box-sizing: border-box;
	outline: none;
	font-family: inherit;
}

.justsms-profile-input:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jsms-primary, #2563eb) 20%, transparent);
}

.justsms-profile-step-hint {
	text-align: center;
	font-size: 12px;
	color: #94a3b8;
	margin: 10px 0 0;
}

.justsms-req {
	color: #ef4444;
}

.justsms-ui-v2.is-profile-step .justsms-form-title,
.justsms-ui-v2.is-profile-step .justsms-form-subtitle,
.justsms-ui-v2.is-profile-step .justsms-form-logo {
	display: none !important;
}

/* =========================================================
   UI 2026 polish — sheet, quiet close, OTP states, profile
   ========================================================= */

/* Soft modal backdrop */
.justsms-modal-backdrop {
	background: rgba(15, 23, 42, 0.45) !important;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.justsms-modal.is-open .justsms-modal-dialog {
	animation: justsmsDialogIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes justsmsDialogIn {
	from { opacity: 0; transform: translateY(16px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Quiet close button */
.justsms-modal-close,
.justsms-modal .justsms-modal-close {
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	min-width: auto !important;
	height: 34px !important;
	padding: 0 12px !important;
	gap: 5px !important;
	background: #f1f5f9 !important;
	color: #64748b !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	box-shadow: none !important;
	border: 1px solid #e2e8f0 !important;
}

.justsms-modal-close:hover {
	background: #e2e8f0 !important;
	color: #334155 !important;
	transform: none !important;
}

.justsms-modal-close svg path {
	stroke: currentColor;
}

/* Card quieter */
.justsms-ui-v2.justsms-otp-form {
	border-radius: 28px !important;
	padding: 32px 26px 24px !important;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 16px 40px rgba(15, 23, 42, 0.1) !important;
}

.justsms-ui-v2 .justsms-form-title,
.justsms-ui-v2 .justsms-step-title {
	font-size: 22px !important;
	font-weight: 750 !important;
	letter-spacing: -0.03em !important;
}

/* Phone field refined */
.justsms-ui-v2 .justsms-phone {
	height: 54px !important;
	border-radius: 14px !important;
	border-width: 1.5px !important;
	font-size: 17px !important;
	letter-spacing: 0.02em;
}

.justsms-ui-v2 .justsms-btn-primary {
	height: 52px !important;
	border-radius: 14px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em;
}

/* OTP digits — empty / filled / focus */
.justsms-ui-v2 .justsms-otp-digits {
	gap: 10px !important;
	margin: 4px 0 18px !important;
}

.justsms-ui-v2 .justsms-otp-digit {
	width: 48px !important;
	height: 54px !important;
	border-radius: 14px !important;
	border: 1.5px solid #e8edf3 !important;
	background: #f4f6f9 !important;
	color: #0f172a !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease !important;
	box-shadow: none !important;
}

.justsms-ui-v2 .justsms-otp-digit:hover {
	border-color: #cbd5e1 !important;
	background: #f8fafc !important;
}

.justsms-ui-v2 .justsms-otp-digit:focus {
	border-color: var(--jsms-primary, #2563eb) !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--jsms-primary, #2563eb) 16%, transparent) !important;
	transform: translateY(-1px);
}

.justsms-ui-v2 .justsms-otp-digit.is-filled {
	border-color: color-mix(in srgb, var(--jsms-primary, #2563eb) 55%, #cbd5e1) !important;
	background: #ffffff !important;
	color: var(--jsms-primary, #2563eb) !important;
}

.justsms-ui-v2 .justsms-otp-digit.is-error {
	border-color: #94a3b8 !important;
	background: #f8fafc !important;
}

/* Profile progress thin */
.justsms-profile-progress {
	height: 3px !important;
	background: #eef2f7 !important;
	border-radius: 999px !important;
	margin: 0 0 22px !important;
	overflow: hidden;
}

.justsms-profile-progress-bar {
	background: var(--jsms-primary, #2563eb) !important;
	transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Profile question title */
.justsms-ui-v2.is-profile-step .justsms-step-title {
	font-size: 20px !important;
	text-align: center;
	margin-bottom: 6px !important;
	color: #0f172a !important;
}

.justsms-ui-v2.is-profile-step .justsms-step-subtitle {
	text-align: center;
	font-size: 12.5px !important;
	color: #94a3b8 !important;
	margin-bottom: 8px !important;
}

/* Profile input — premium */
.justsms-ui-v2 .justsms-profile-input {
	height: 56px !important;
	border-radius: 16px !important;
	border: 1.5px solid #e8edf3 !important;
	background: #f7f9fc !important;
	padding: 14px 18px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: #0f172a !important;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

.justsms-ui-v2 .justsms-profile-input:hover {
	border-color: #cbd5e1 !important;
	background: #ffffff !important;
}

.justsms-ui-v2 .justsms-profile-input:focus {
	border-color: var(--jsms-primary, #2563eb) !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--jsms-primary, #2563eb) 14%, transparent) !important;
}

.justsms-ui-v2 .justsms-profile-input::placeholder {
	color: #94a3b8;
	font-weight: 500;
	opacity: 1;
}

.justsms-ui-v2 .justsms-profile-field {
	margin-bottom: 6px !important;
}

.justsms-ui-v2.is-profile-step .justsms-actions-row {
	margin-top: 18px !important;
}

.justsms-ui-v2.is-profile-step .justsms-btn-secondary,
.justsms-ui-v2.is-profile-step .justsms-btn-primary {
	border-radius: 14px !important;
	height: 50px !important;
}

/* Secondary quieter */
.justsms-ui-v2 .justsms-btn-secondary,
.justsms-ui-v2 .justsms-back-link.justsms-btn-secondary {
	background: #f1f5f9 !important;
	color: #475569 !important;
	font-weight: 600 !important;
}

.justsms-ui-v2 .justsms-btn-secondary:hover {
	background: #e2e8f0 !important;
}

/* Timer softer track */
.justsms-ui-v2 .justsms-timer-track {
	stroke: #e8edf3 !important;
}

.justsms-ui-v2 .justsms-timer-text {
	font-size: 15px !important;
	font-weight: 650 !important;
	color: #64748b !important;
}

/* ===== Mobile bottom sheet ===== */
@media (max-width: 640px) {
	.justsms-modal {
		align-items: flex-end !important;
		justify-content: center !important;
		padding: 0 !important;
	}

	.justsms-modal-dialog {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		border-radius: 24px 24px 0 0 !important;
	}

	.justsms-modal.is-open .justsms-modal-dialog {
		animation: justsmsSheetUp 0.36s cubic-bezier(0.22, 1, 0.36, 1);
	}

	@keyframes justsmsSheetUp {
		from { transform: translateY(100%); opacity: 0.6; }
		to { transform: translateY(0); opacity: 1; }
	}

	.justsms-modal-body .justsms-ui-v2.justsms-otp-form,
	.justsms-modal-body .justsms-otp-form {
		border-radius: 24px 24px 0 0 !important;
		padding: 28px 20px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
		box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.12) !important;
		max-width: 100% !important;
	}

	/* sheet handle */
	.justsms-modal-body .justsms-ui-v2.justsms-otp-form::after {
		content: '';
		display: block;
		position: absolute;
		top: 10px;
		left: 50%;
		transform: translateX(-50%);
		width: 40px;
		height: 4px;
		border-radius: 999px;
		background: #e2e8f0;
	}

	.justsms-modal-body .justsms-otp-form {
		position: relative;
	}

	.justsms-modal-close {
		top: 16px !important;
		left: 16px !important;
	}

	.justsms-ui-v2 .justsms-otp-digit {
		width: 42px !important;
		height: 50px !important;
		font-size: 18px !important;
	}

	.justsms-ui-v2 .justsms-otp-digits {
		gap: 7px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.justsms-modal.is-open .justsms-modal-dialog {
		animation: none !important;
	}
}

/* =========================================================
   Login/Register polish pack (6 items)
   ========================================================= */

/* 5) Narrower desktop card + spacing */
.justsms-ui-v2.justsms-otp-form {
	max-width: 380px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 28px 24px 22px !important;
}

.justsms-modal-body .justsms-ui-v2.justsms-otp-form {
	max-width: 380px !important;
}

.justsms-ui-v2 .justsms-form-header {
	margin-bottom: 20px !important;
	text-align: center;
}

.justsms-ui-v2 .justsms-form-title {
	font-size: 20px !important;
	font-weight: 750 !important;
	letter-spacing: -0.03em !important;
	margin: 0 0 6px !important;
	color: #0f172a !important;
}

.justsms-ui-v2 .justsms-form-subtitle {
	font-size: 13px !important;
	line-height: 1.5 !important;
	color: #94a3b8 !important;
	margin: 0 !important;
	font-weight: 500 !important;
}

/* Hide redundant inner titles when form header drives the story */
.justsms-ui-v2.is-code-step .justsms-step-code .justsms-step-header {
	display: none !important;
}

.justsms-ui-v2.is-profile-step .justsms-form-title,
.justsms-ui-v2.is-profile-step .justsms-form-subtitle {
	display: block !important;
}

/* 2) Masked phone as primary hint under OTP */
.justsms-ui-v2 .justsms-phone-hint {
	display: block;
	text-align: center;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	color: #0f172a !important;
	margin: 0 0 14px !important;
	direction: ltr;
}

/* 3) Compact timer — secondary */
.justsms-ui-v2 .justsms-timer-hero {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	margin: 0 0 10px !important;
}

.justsms-ui-v2 .justsms-timer {
	width: 56px !important;
	height: 56px !important;
	position: relative;
	margin: 0 0 6px !important;
}

.justsms-ui-v2 .justsms-timer-svg {
	width: 56px !important;
	height: 56px !important;
}

.justsms-ui-v2 .justsms-timer-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px !important;
	font-weight: 650 !important;
	color: #64748b !important;
	font-variant-numeric: tabular-nums;
}

.justsms-ui-v2 .justsms-timer-track {
	stroke: #e8edf3 !important;
	stroke-width: 5 !important;
}

.justsms-ui-v2 .justsms-timer-progress {
	stroke-width: 5 !important;
}

/* Messages clean, no emoji noise */
.justsms-ui-v2 .justsms-message {
	font-size: 13px !important;
	font-weight: 600 !important;
	text-align: center;
	border-radius: 10px !important;
	padding: 10px 12px !important;
	margin-top: 12px !important;
}

.justsms-ui-v2 .justsms-message.success,
.justsms-ui-v2 .justsms-message.is-success {
	background: #f0fdf4 !important;
	color: #166534 !important;
	border: 1px solid #bbf7d0 !important;
}

.justsms-ui-v2 .justsms-message.error,
.justsms-ui-v2 .justsms-message.is-error {
	background: #f8fafc !important;
	color: #334155 !important;
	border: 1px solid #e2e8f0 !important;
}

.justsms-ui-v2 .justsms-message.info,
.justsms-ui-v2 .justsms-message.is-info {
	background: #f8fafc !important;
	color: #475569 !important;
	border: 1px solid #e2e8f0 !important;
}

/* Resend as quiet link */
.justsms-ui-v2 .justsms-resend-link {
	font-size: 12.5px !important;
	font-weight: 600 !important;
	color: var(--jsms-primary, #2563eb) !important;
	text-decoration: none !important;
}

.justsms-ui-v2 .justsms-resend-link.is-disabled {
	color: #94a3b8 !important;
	pointer-events: none;
}

@media (max-width: 640px) {
	.justsms-modal-body .justsms-ui-v2.justsms-otp-form {
		max-width: 100% !important;
	}
}

/* =========================================================
   3D Depth UI — login / register
   ========================================================= */

.justsms-otp-wrapper {
	perspective: 1200px;
	perspective-origin: 50% 40%;
}

.justsms-ui-v2.justsms-otp-form {
	position: relative !important;
	transform-style: preserve-3d;
	transform: rotateX(4deg) translateZ(0);
	background:
		linear-gradient(165deg, rgba(255,255,255,0.97) 0%, rgba(248,250,252,0.94) 100%) !important;
	border: 1px solid rgba(255,255,255,0.7) !important;
	border-radius: 28px !important;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.9) inset,
		0 -1px 0 rgba(15,23,42,0.04) inset,
		0 2px 4px rgba(15,23,42,0.04),
		0 12px 24px rgba(15,23,42,0.08),
		0 28px 56px rgba(15,23,42,0.12),
		0 48px 80px -20px rgba(37,99,235,0.18) !important;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	overflow: visible !important;
}

/* Soft 3D edge glow */
.justsms-ui-v2.justsms-otp-form::before {
	content: '' !important;
	display: block !important;
	position: absolute !important;
	inset: -1px !important;
	border-radius: 28px !important;
	background: linear-gradient(
		145deg,
		rgba(255,255,255,0.9) 0%,
		rgba(255,255,255,0) 40%,
		rgba(37,99,235,0.12) 100%
	) !important;
	z-index: -1 !important;
	pointer-events: none !important;
	height: auto !important;
	opacity: 1 !important;
}

/* Floating ambient blob behind card */
.justsms-otp-wrapper::before {
	content: '';
	position: absolute;
	width: 70%;
	height: 50%;
	top: 20%;
	left: 15%;
	background: radial-gradient(circle, color-mix(in srgb, var(--jsms-primary, #2563eb) 35%, transparent) 0%, transparent 70%);
	filter: blur(40px);
	z-index: 0;
	pointer-events: none;
	transform: translateZ(-40px);
}

.justsms-otp-wrapper .justsms-ui-v2 {
	position: relative;
	z-index: 1;
}

/* Modal 3D */
.justsms-modal-backdrop {
	background: radial-gradient(ellipse at 50% 30%, rgba(30,58,95,0.55), rgba(15,23,42,0.7)) !important;
	backdrop-filter: blur(16px) !important;
	-webkit-backdrop-filter: blur(16px) !important;
}

.justsms-modal-dialog {
	perspective: 1400px;
	transform-style: preserve-3d;
}

.justsms-modal.is-open .justsms-modal-dialog {
	animation: justsms3dIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@keyframes justsms3dIn {
	from {
		opacity: 0;
		transform: rotateX(12deg) translateY(40px) scale(0.94);
	}
	to {
		opacity: 1;
		transform: rotateX(0deg) translateY(0) scale(1);
	}
}

.justsms-modal-body .justsms-ui-v2.justsms-otp-form {
	transform: rotateX(0deg) !important;
}

/* Inputs extruded */
.justsms-ui-v2 .justsms-phone,
.justsms-ui-v2 .justsms-profile-input {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
	border: 1.5px solid rgba(226,232,240,0.95) !important;
	box-shadow:
		0 1px 0 rgba(255,255,255,1) inset,
		0 2px 4px rgba(15,23,42,0.04),
		0 6px 16px rgba(15,23,42,0.06) !important;
	transform: translateZ(8px);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.justsms-ui-v2 .justsms-phone:focus,
.justsms-ui-v2 .justsms-profile-input:focus {
	transform: translateZ(12px) translateY(-1px);
	box-shadow:
		0 1px 0 rgba(255,255,255,1) inset,
		0 0 0 4px color-mix(in srgb, var(--jsms-primary, #2563eb) 16%, transparent),
		0 8px 24px rgba(37,99,235,0.15) !important;
}

/* OTP digits as raised tiles */
.justsms-ui-v2 .justsms-otp-digit {
	background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
	border: 1.5px solid #e2e8f0 !important;
	box-shadow:
		0 1px 0 #fff inset,
		0 3px 6px rgba(15,23,42,0.06),
		0 8px 16px rgba(15,23,42,0.05) !important;
	transform: translateZ(10px);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease !important;
}

.justsms-ui-v2 .justsms-otp-digit:focus {
	transform: translateZ(16px) translateY(-2px) scale(1.04);
	border-color: var(--jsms-primary, #2563eb) !important;
	background: #fff !important;
	box-shadow:
		0 1px 0 #fff inset,
		0 0 0 4px color-mix(in srgb, var(--jsms-primary, #2563eb) 18%, transparent),
		0 10px 28px rgba(37,99,235,0.2) !important;
}

.justsms-ui-v2 .justsms-otp-digit.is-filled {
	background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
	border-color: color-mix(in srgb, var(--jsms-primary, #2563eb) 50%, #93c5fd) !important;
	color: var(--jsms-primary, #2563eb) !important;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.8) inset,
		0 4px 12px rgba(37,99,235,0.18) !important;
	transform: translateZ(12px);
}

/* Primary button — 3D pressable */
.justsms-ui-v2 .justsms-btn-primary {
	position: relative;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--jsms-primary, #2563eb) 100%, #fff 12%) 0%,
		var(--jsms-primary, #2563eb) 45%,
		color-mix(in srgb, var(--jsms-primary, #2563eb) 80%, #000 12%) 100%
	) !important;
	border: none !important;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.25) inset,
		0 4px 0 color-mix(in srgb, var(--jsms-primary, #2563eb) 55%, #0f172a),
		0 8px 20px rgba(37,99,235,0.35) !important;
	transform: translateY(0) translateZ(14px);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}

.justsms-ui-v2 .justsms-btn-primary:hover {
	filter: brightness(1.05);
	transform: translateY(-2px) translateZ(16px);
	box-shadow:
		0 1px 0 rgba(255,255,255,0.3) inset,
		0 5px 0 color-mix(in srgb, var(--jsms-primary, #2563eb) 55%, #0f172a),
		0 14px 28px rgba(37,99,235,0.4) !important;
}

.justsms-ui-v2 .justsms-btn-primary:active {
	transform: translateY(3px) translateZ(8px);
	box-shadow:
		0 1px 0 rgba(255,255,255,0.15) inset,
		0 1px 0 color-mix(in srgb, var(--jsms-primary, #2563eb) 55%, #0f172a),
		0 4px 10px rgba(37,99,235,0.25) !important;
}

/* Secondary — soft raised */
.justsms-ui-v2 .justsms-btn-secondary {
	background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%) !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow:
		0 1px 0 #fff inset,
		0 2px 4px rgba(15,23,42,0.05),
		0 4px 0 #e2e8f0 !important;
	transform: translateZ(8px);
	transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.justsms-ui-v2 .justsms-btn-secondary:hover {
	transform: translateY(-1px) translateZ(10px);
}

.justsms-ui-v2 .justsms-btn-secondary:active {
	transform: translateY(2px) translateZ(4px);
	box-shadow:
		0 1px 0 #fff inset,
		0 1px 0 #e2e8f0 !important;
}

/* Timer disc with depth */
.justsms-ui-v2 .justsms-timer {
	background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
	border-radius: 50%;
	box-shadow:
		0 1px 0 #fff inset,
		0 4px 12px rgba(15,23,42,0.08),
		0 10px 24px rgba(15,23,42,0.06);
	transform: translateZ(12px);
}

/* Close button floating */
.justsms-modal-close {
	box-shadow:
		0 1px 0 #fff inset,
		0 4px 12px rgba(15,23,42,0.1) !important;
	transform: translateZ(20px);
	backdrop-filter: blur(8px);
}

/* Logo float */
.justsms-ui-v2 .justsms-form-logo img {
	filter: drop-shadow(0 8px 16px rgba(15,23,42,0.12));
	transform: translateZ(18px);
}

/* Locked page background depth */
.justsms-locked-page {
	perspective: 1600px;
}

.justsms-locked-page .justsms-otp-wrapper {
	transform-style: preserve-3d;
}

/* Mobile: reduce 3D tilt for usability */
@media (max-width: 640px) {
	.justsms-ui-v2.justsms-otp-form {
		transform: none !important;
		border-radius: 24px 24px 0 0 !important;
	}

	.justsms-modal.is-open .justsms-modal-dialog {
		animation: justsmsSheetUp 0.36s cubic-bezier(0.22, 1, 0.36, 1) !important;
	}

	.justsms-otp-wrapper::before {
		filter: blur(28px);
		opacity: 0.7;
	}
}

@media (prefers-reduced-motion: reduce) {
	.justsms-ui-v2.justsms-otp-form,
	.justsms-ui-v2 .justsms-phone,
	.justsms-ui-v2 .justsms-otp-digit,
	.justsms-ui-v2 .justsms-btn-primary {
		transform: none !important;
	}
	.justsms-modal.is-open .justsms-modal-dialog {
		animation: none !important;
	}
}

/* ===== Close: icon only, red ===== */
.justsms-modal-close,
.justsms-modal .justsms-modal-close {
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	background: #ef4444 !important;
	color: #fff !important;
	border: none !important;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0 !important;
}

.justsms-modal-close:hover {
	background: #dc2626 !important;
	color: #fff !important;
}

.justsms-modal-close span {
	display: none !important;
}

.justsms-modal-close svg {
	width: 12px;
	height: 12px;
	pointer-events: none;
}

/* ===== Numbered profile steps ===== */
.justsms-profile-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0 0 20px;
	flex-wrap: nowrap;
}

.justsms-step-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	background: #f1f5f9;
	color: #94a3b8;
	border: 1.5px solid #e2e8f0;
	flex-shrink: 0;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.justsms-step-dot.is-active {
	background: var(--jsms-primary, #2563eb);
	border-color: var(--jsms-primary, #2563eb);
	color: #fff;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--jsms-primary, #2563eb) 35%, transparent);
}

.justsms-step-dot.is-done {
	background: color-mix(in srgb, var(--jsms-primary, #2563eb) 14%, #fff);
	border-color: color-mix(in srgb, var(--jsms-primary, #2563eb) 45%, #cbd5e1);
	color: var(--jsms-primary, #2563eb);
}

.justsms-step-line {
	width: 22px;
	height: 2px;
	background: #e2e8f0;
	flex-shrink: 0;
	margin: 0 4px;
	border-radius: 2px;
}

.justsms-step-line.is-done {
	background: color-mix(in srgb, var(--jsms-primary, #2563eb) 55%, #e2e8f0);
}

/* ===== Unified professional field box ===== */
.justsms-ui-v2 .justsms-field-box {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
	padding: 14px 16px;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border: 1.5px solid #e8edf3;
	border-radius: 16px;
	box-shadow:
		0 1px 0 rgba(255,255,255,1) inset,
		0 2px 6px rgba(15,23,42,0.04);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.justsms-ui-v2 .justsms-field-box:focus-within {
	border-color: var(--jsms-primary, #2563eb);
	box-shadow:
		0 1px 0 rgba(255,255,255,1) inset,
		0 0 0 4px color-mix(in srgb, var(--jsms-primary, #2563eb) 14%, transparent),
		0 6px 18px rgba(37,99,235,0.1);
}

.justsms-ui-v2 .justsms-field-label {
	display: block !important;
	position: static !important;
	font-size: 12px !important;
	font-weight: 650 !important;
	color: #64748b !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.3 !important;
	transform: none !important;
	pointer-events: auto !important;
	background: transparent !important;
}

.justsms-ui-v2 .justsms-field-label .justsms-opt {
	font-weight: 500;
	color: #94a3b8;
	font-size: 11px;
}

/* Input inside field-box: flat, no double frame */
.justsms-ui-v2 .justsms-field-box .justsms-phone,
.justsms-ui-v2 .justsms-field-box .justsms-profile-input {
	height: 40px !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	padding: 0 !important;
	font-size: 16px !important;
	font-weight: 650 !important;
	color: #0f172a !important;
	transform: none !important;
}

.justsms-ui-v2 .justsms-field-box .justsms-phone:focus,
.justsms-ui-v2 .justsms-field-box .justsms-profile-input:focus {
	box-shadow: none !important;
	transform: none !important;
	outline: none !important;
}

.justsms-ui-v2 .justsms-field-box .justsms-phone::placeholder,
.justsms-ui-v2 .justsms-field-box .justsms-profile-input::placeholder {
	color: #cbd5e1;
	font-weight: 500;
}

/* Hide old float label if any remains */
.justsms-ui-v2 .justsms-float-label {
	display: none !important;
}

/* Hide old progress bar */
.justsms-profile-progress {
	display: none !important;
}

/* ===== Close icon INSIDE the form card ===== */
.justsms-modal-dialog {
	position: relative !important;
	overflow: visible !important;
}

.justsms-modal-body .justsms-ui-v2.justsms-otp-form,
.justsms-modal-body .justsms-otp-form {
	position: relative !important;
	padding-top: 48px !important;
}

/* Position close over the card, inside top-left of form area */
.justsms-modal-dialog > .justsms-modal-close {
	position: absolute !important;
	top: 18px !important;
	left: 18px !important;
	right: auto !important;
	z-index: 40 !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	border-radius: 10px !important;
	background: #ef4444 !important;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

@media (max-width: 640px) {
	.justsms-modal-dialog > .justsms-modal-close {
		top: 22px !important;
		left: 16px !important;
	}
}

/* ===== Professional step indicator (segments, no big 1234) ===== */
.justsms-profile-steps {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0 0 22px;
}

.justsms-steps-track {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	max-width: 220px;
}

.justsms-step-seg {
	flex: 1;
	height: 4px;
	border-radius: 999px;
	background: #e8edf3;
	transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
	min-width: 28px;
}

.justsms-step-seg.is-done {
	background: color-mix(in srgb, var(--jsms-primary, #2563eb) 55%, #93c5fd);
}

.justsms-step-seg.is-active {
	background: var(--jsms-primary, #2563eb);
	box-shadow: 0 2px 8px color-mix(in srgb, var(--jsms-primary, #2563eb) 40%, transparent);
	transform: scaleY(1.35);
}

.justsms-steps-meta {
	display: flex;
	align-items: baseline;
	gap: 2px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.justsms-steps-current {
	font-size: 13px;
	font-weight: 750;
	color: var(--jsms-primary, #2563eb);
}

.justsms-steps-sep {
	font-size: 12px;
	color: #cbd5e1;
	margin: 0 1px;
}

.justsms-steps-total {
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
}

/* Hide old numbered dots if any leftover */
.justsms-step-dot,
.justsms-step-line {
	display: none !important;
}

/* =========================================================
   Responsive Mobile — comprehensive
   ========================================================= */

@media (max-width: 640px) {
	/* Full-bleed bottom sheet */
	.justsms-modal {
		align-items: flex-end !important;
		justify-content: stretch !important;
		padding: 0 !important;
	}

	.justsms-modal-backdrop {
		background: rgba(15, 23, 42, 0.55) !important;
	}

	.justsms-modal-dialog {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		border-radius: 20px 20px 0 0 !important;
		max-height: min(92vh, 100%);
		display: flex;
		flex-direction: column;
	}

	.justsms-modal-body {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		max-height: min(92vh, 100%);
		padding: 0 !important;
	}

	.justsms-modal-body .justsms-otp-wrapper {
		padding: 0 !important;
		margin: 0 !important;
		max-width: 100% !important;
	}

	.justsms-modal-body .justsms-ui-v2.justsms-otp-form,
	.justsms-modal-body .justsms-otp-form {
		max-width: 100% !important;
		width: 100% !important;
		margin: 0 !important;
		border-radius: 20px 20px 0 0 !important;
		padding: 44px 18px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
		box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.14) !important;
		transform: none !important;
		min-height: auto;
	}

	/* Sheet handle */
	.justsms-modal-body .justsms-ui-v2.justsms-otp-form::after {
		content: '';
		position: absolute;
		top: 10px;
		left: 50%;
		transform: translateX(-50%);
		width: 36px;
		height: 4px;
		border-radius: 999px;
		background: #e2e8f0;
		z-index: 2;
	}

	.justsms-modal-dialog > .justsms-modal-close {
		top: 14px !important;
		left: 14px !important;
		width: 34px !important;
		height: 34px !important;
		min-width: 34px !important;
		border-radius: 10px !important;
	}

	/* Typography scale */
	.justsms-ui-v2 .justsms-form-title {
		font-size: 18px !important;
	}

	.justsms-ui-v2 .justsms-form-subtitle {
		font-size: 12.5px !important;
	}

	.justsms-ui-v2 .justsms-form-logo img {
		max-height: 40px !important;
	}

	/* Field boxes tighter */
	.justsms-ui-v2 .justsms-field-box {
		padding: 12px 14px !important;
		border-radius: 14px !important;
		margin-bottom: 14px !important;
	}

	.justsms-ui-v2 .justsms-field-box .justsms-phone,
	.justsms-ui-v2 .justsms-field-box .justsms-profile-input {
		font-size: 16px !important; /* prevent iOS zoom */
		height: 38px !important;
	}

	/* Buttons full-width friendly */
	.justsms-ui-v2 .justsms-btn-primary,
	.justsms-ui-v2 .justsms-send-btn,
	.justsms-ui-v2 .justsms-verify-btn {
		width: 100% !important;
		height: 50px !important;
		border-radius: 14px !important;
		font-size: 15px !important;
	}

	.justsms-ui-v2 .justsms-actions-row {
		display: flex !important;
		flex-direction: row !important;
		gap: 10px !important;
		width: 100%;
	}

	.justsms-ui-v2 .justsms-actions-row .justsms-btn-secondary,
	.justsms-ui-v2 .justsms-actions-row .justsms-btn-primary {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
		height: 48px !important;
		font-size: 13.5px !important;
		padding: 0 10px !important;
	}

	/* OTP digits fit small screens */
	.justsms-ui-v2 .justsms-otp-digits {
		gap: 6px !important;
		justify-content: center !important;
		flex-wrap: nowrap !important;
		margin: 4px 0 16px !important;
	}

	.justsms-ui-v2 .justsms-otp-digit {
		width: clamp(36px, 12vw, 46px) !important;
		height: 48px !important;
		font-size: 17px !important;
		border-radius: 12px !important;
		flex: 0 0 auto !important;
	}

	/* Timer compact */
	.justsms-ui-v2 .justsms-timer {
		width: 48px !important;
		height: 48px !important;
	}

	.justsms-ui-v2 .justsms-timer-svg {
		width: 48px !important;
		height: 48px !important;
	}

	.justsms-ui-v2 .justsms-timer-text {
		font-size: 11px !important;
	}

	.justsms-ui-v2 .justsms-phone-hint {
		font-size: 14px !important;
		margin-bottom: 10px !important;
	}

	/* Profile steps */
	.justsms-profile-steps {
		margin-bottom: 16px !important;
	}

	.justsms-steps-track {
		max-width: 180px !important;
		gap: 5px !important;
	}

	.justsms-ui-v2.is-profile-step .justsms-step-title {
		font-size: 17px !important;
	}

	/* Resend */
	.justsms-ui-v2 .justsms-resend-link {
		display: block;
		text-align: center;
		padding: 8px;
		margin-top: 4px;
	}

	/* Standalone page (not modal) */
	.justsms-otp-wrapper:not(.justsms-modal-body *) {
		padding: 16px 12px !important;
	}

	body.justsms-modal-open {
		overflow: hidden !important;
		position: fixed !important;
		width: 100% !important;
	}

	/* Locked page */
	.justsms-locked-page {
		padding: 12px !important;
		min-height: 100dvh;
		align-items: flex-end !important;
	}

	.justsms-locked-page .justsms-otp-wrapper {
		width: 100%;
		max-width: 100%;
	}

	.justsms-locked-page .justsms-ui-v2.justsms-otp-form {
		max-width: 100% !important;
		border-radius: 20px !important;
		transform: none !important;
	}
}

/* Very small phones */
@media (max-width: 380px) {
	.justsms-ui-v2 .justsms-otp-digit {
		width: 34px !important;
		height: 44px !important;
		font-size: 15px !important;
		border-radius: 10px !important;
	}

	.justsms-ui-v2 .justsms-otp-digits {
		gap: 4px !important;
	}

	.justsms-modal-body .justsms-ui-v2.justsms-otp-form {
		padding-left: 14px !important;
		padding-right: 14px !important;
	}

	.justsms-ui-v2 .justsms-actions-row .justsms-btn-secondary,
	.justsms-ui-v2 .justsms-actions-row .justsms-btn-primary {
		font-size: 12.5px !important;
	}
}

/* Landscape phones */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
	.justsms-modal {
		align-items: center !important;
	}

	.justsms-modal-dialog {
		max-height: 96vh !important;
		border-radius: 16px !important;
		width: min(420px, 94vw) !important;
		margin: 8px auto !important;
	}

	.justsms-modal-body .justsms-ui-v2.justsms-otp-form {
		border-radius: 16px !important;
		padding: 36px 16px 14px !important;
		max-height: 94vh;
		overflow-y: auto;
	}

	.justsms-ui-v2 .justsms-timer {
		width: 40px !important;
		height: 40px !important;
	}
}

/* Tablet */
@media (min-width: 641px) and (max-width: 900px) {
	.justsms-ui-v2.justsms-otp-form {
		max-width: 400px !important;
	}

	.justsms-modal-dialog {
		width: min(420px, 92vw) !important;
	}
}

/* =========================================================
   UI Refresh — Login / Register (clean professional)
   ========================================================= */

.justsms-otp-wrapper {
	perspective: none !important;
}

.justsms-ui-v2.justsms-otp-form {
	max-width: 400px !important;
	margin: 0 auto !important;
	padding: 28px 24px 22px !important;
	border-radius: 20px !important;
	background: #ffffff !important;
	border: 1px solid #eef1f5 !important;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 32px rgba(15, 23, 42, 0.08) !important;
	transform: none !important;
	backdrop-filter: none !important;
	overflow: hidden !important;
}

.justsms-ui-v2.justsms-otp-form::before,
.justsms-otp-wrapper::before {
	display: none !important;
	content: none !important;
}

/* Header */
.justsms-ui-v2 .justsms-form-header {
	text-align: center !important;
	margin: 0 0 22px !important;
	padding: 0 !important;
}

.justsms-ui-v2 .justsms-form-logo {
	margin: 0 auto 12px !important;
}

.justsms-ui-v2 .justsms-form-logo img {
	max-height: 44px !important;
	filter: none !important;
	transform: none !important;
}

.justsms-ui-v2 .justsms-form-title {
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	letter-spacing: -0.02em !important;
	margin: 0 0 6px !important;
	line-height: 1.35 !important;
}

.justsms-ui-v2 .justsms-form-subtitle {
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
	color: #64748b !important;
	margin: 0 !important;
	line-height: 1.5 !important;
}

/* Field box — single clean surface */
.justsms-ui-v2 .justsms-field-box {
	padding: 12px 14px !important;
	margin-bottom: 14px !important;
	border-radius: 14px !important;
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: none !important;
	gap: 6px !important;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.justsms-ui-v2 .justsms-field-box:focus-within {
	background: #fff !important;
	border-color: var(--jsms-primary, #2563eb) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jsms-primary, #2563eb) 14%, transparent) !important;
}

.justsms-ui-v2 .justsms-field-label {
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	color: #64748b !important;
	letter-spacing: 0.01em !important;
}

.justsms-ui-v2 .justsms-field-box .justsms-phone,
.justsms-ui-v2 .justsms-field-box .justsms-profile-input {
	height: 36px !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: #0f172a !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	transform: none !important;
}

/* Primary button — flat modern */
.justsms-ui-v2 .justsms-btn-primary,
.justsms-ui-v2 .justsms-send-btn,
.justsms-ui-v2 .justsms-verify-btn,
.justsms-ui-v2 .justsms-profile-next {
	height: 48px !important;
	border-radius: 12px !important;
	font-size: 0.9375rem !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em !important;
	background: var(--jsms-primary, #2563eb) !important;
	border: none !important;
	color: #fff !important;
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2) !important;
	transform: none !important;
	transition: background 0.15s ease, opacity 0.15s ease !important;
}

.justsms-ui-v2 .justsms-btn-primary:hover {
	filter: none !important;
	background: color-mix(in srgb, var(--jsms-primary, #2563eb) 88%, #000) !important;
	transform: none !important;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28) !important;
}

.justsms-ui-v2 .justsms-btn-primary:active {
	transform: none !important;
	opacity: 0.92;
	box-shadow: none !important;
}

.justsms-ui-v2 .justsms-btn-secondary,
.justsms-ui-v2 .justsms-back-link.justsms-btn-secondary,
.justsms-ui-v2 .justsms-profile-prev {
	height: 48px !important;
	border-radius: 12px !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	background: #f1f5f9 !important;
	color: #475569 !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: none !important;
	transform: none !important;
}

.justsms-ui-v2 .justsms-btn-secondary:hover {
	background: #e2e8f0 !important;
	transform: none !important;
}

/* OTP digits — calm grid */
.justsms-ui-v2 .justsms-otp-digits {
	gap: 8px !important;
	margin: 8px 0 16px !important;
	justify-content: center !important;
}

.justsms-ui-v2 .justsms-otp-digit {
	width: 48px !important;
	height: 52px !important;
	border-radius: 12px !important;
	border: 1px solid #e2e8f0 !important;
	background: #f8fafc !important;
	font-size: 1.125rem !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	box-shadow: none !important;
	transform: none !important;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.justsms-ui-v2 .justsms-otp-digit:focus {
	border-color: var(--jsms-primary, #2563eb) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jsms-primary, #2563eb) 16%, transparent) !important;
	transform: none !important;
}

.justsms-ui-v2 .justsms-otp-digit.is-filled {
	background: #fff !important;
	border-color: color-mix(in srgb, var(--jsms-primary, #2563eb) 45%, #cbd5e1) !important;
	color: var(--jsms-primary, #2563eb) !important;
	box-shadow: none !important;
	transform: none !important;
}

/* Timer — small secondary */
.justsms-ui-v2 .justsms-timer-hero {
	margin: 0 0 8px !important;
}

.justsms-ui-v2 .justsms-timer {
	width: 52px !important;
	height: 52px !important;
	background: #f8fafc !important;
	box-shadow: none !important;
	border: 1px solid #eef1f5 !important;
	transform: none !important;
}

.justsms-ui-v2 .justsms-timer-svg {
	width: 52px !important;
	height: 52px !important;
}

.justsms-ui-v2 .justsms-timer-text {
	font-size: 0.75rem !important;
	font-weight: 650 !important;
	color: #64748b !important;
}

.justsms-ui-v2 .justsms-phone-hint {
	font-size: 0.9375rem !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	margin: 0 0 12px !important;
	letter-spacing: 0.03em;
}

/* Messages */
.justsms-ui-v2 .justsms-message {
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
	padding: 10px 12px !important;
	border-radius: 10px !important;
	margin-top: 12px !important;
	border-width: 1px !important;
}

/* Close — inside card, minimal red icon */
.justsms-modal-dialog > .justsms-modal-close,
.justsms-modal-close {
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	border-radius: 10px !important;
	background: #fee2e2 !important;
	color: #dc2626 !important;
	border: none !important;
	box-shadow: none !important;
	top: 14px !important;
	left: 14px !important;
}

.justsms-modal-close:hover {
	background: #fecaca !important;
	color: #b91c1c !important;
}

/* Modal */
.justsms-modal-backdrop {
	background: rgba(15, 23, 42, 0.5) !important;
	backdrop-filter: blur(8px) !important;
}

.justsms-modal.is-open .justsms-modal-dialog {
	animation: justsmsFadeUp 0.28s ease !important;
}

@keyframes justsmsFadeUp {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Profile steps */
.justsms-profile-steps {
	margin-bottom: 18px !important;
}

.justsms-step-seg {
	height: 3px !important;
	border-radius: 999px !important;
}

.justsms-ui-v2.is-profile-step .justsms-step-title {
	font-size: 1.0625rem !important;
	text-align: center;
	margin-bottom: 4px !important;
}

/* Resend */
.justsms-ui-v2 .justsms-resend-link {
	display: block;
	text-align: center;
	margin-top: 10px;
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
}

@media (max-width: 640px) {
	.justsms-modal-body .justsms-ui-v2.justsms-otp-form,
	.justsms-modal-body .justsms-otp-form {
		border-radius: 18px 18px 0 0 !important;
		padding: 40px 18px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
		box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.1) !important;
		max-width: 100% !important;
	}

	.justsms-ui-v2 .justsms-otp-digit {
		width: clamp(38px, 11vw, 46px) !important;
		height: 48px !important;
	}

	.justsms-modal.is-open .justsms-modal-dialog {
		animation: justsmsSheetUp 0.32s ease !important;
	}
}

/* Phone field: icon + number in one row */
.justsms-ui-v2 .justsms-field-phone-row {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 10px 14px !important;
	direction: ltr;
}

.justsms-ui-v2 .justsms-phone-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	height: 36px !important;
	flex-shrink: 0 !important;
	border-radius: 10px !important;
	background: color-mix(in srgb, var(--jsms-primary, #2563eb) 10%, #f8fafc) !important;
	color: var(--jsms-primary, #2563eb) !important;
	margin: 0 !important;
	padding: 0 !important;
	cursor: text !important;
}

.justsms-ui-v2 .justsms-phone-icon svg {
	display: block;
}

.justsms-ui-v2 .justsms-field-phone-row .justsms-phone {
	flex: 1 1 auto !important;
	width: 100% !important;
	height: 40px !important;
	font-size: 1.0625rem !important;
	font-weight: 650 !important;
	letter-spacing: 0.04em !important;
	text-align: left !important;
	direction: ltr !important;
}

.justsms-ui-v2 .justsms-field-phone-row .justsms-field-label {
	display: none !important;
}

/* Keep title/subtitle; remove redundant middle label feel */
.justsms-ui-v2.is-code-step .justsms-field-phone-row {
	display: none !important;
}
