/* SmartSMS – فرم لاگین یکپارچه. کاملاً ریسپانسیو و RTL. */
.smartsms-card,
.smartsms-card * {
	box-sizing: border-box;
}

.smartsms-card {
	--_p: var(--smartsms-primary, #6d5efc);
	--_card: var(--smartsms-card, #ffffff);
	--_r: var(--smartsms-radius, 14px);
	position: relative;
	overflow: hidden;
	direction: rtl;
	font-family: inherit;
	width: 100%;
	max-width: 380px;
	margin: 0 auto;
	padding: 28px 26px;
	background: var(--_card);
	border-radius: var(--_r);
	text-align: right;
	color: #1f2430;
}

/* لایه‌ی تزئینی (فقط برخی پوسته‌ها از آن استفاده می‌کنند). */
.smartsms-skin-deco { display: none; }

.smartsms-title {
	margin: 0 0 18px;
	font-size: 19px;
	font-weight: 700;
}

.smartsms-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	color: #6b7280;
}

.smartsms-input {
	width: 100%;
	padding: 13px 14px;
	font-size: 16px; /* جلوگیری از زوم موبایل. */
	border: 1.5px solid #e3e4ea;
	border-radius: calc(var(--_r) - 4px);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	background: #fbfbfd;
	direction: ltr;
	text-align: center;
	letter-spacing: 2px;
}

.smartsms-input:focus {
	border-color: var(--_p);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--_p) 18%, transparent);
	background: #fff;
}

.smartsms-btn {
	width: 100%;
	margin-top: 14px;
	padding: 13px 16px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	color: #fff;
	background: var(--_p);
	border: none;
	border-radius: calc(var(--_r) - 4px);
	cursor: pointer;
	transition: transform .08s ease, filter .15s ease;
}

.smartsms-btn:hover { filter: brightness(1.06); }
.smartsms-btn:active { transform: translateY(1px); }
.smartsms-btn[disabled] { opacity: .6; cursor: default; }

.smartsms-msg {
	margin: 12px 0 0;
	min-height: 18px;
	font-size: 13px;
}
.smartsms-msg.is-error { color: #dc2626; }
.smartsms-msg.is-ok { color: #16a34a; }

.smartsms-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 12px;
}

.smartsms-link {
	background: none;
	border: none;
	color: var(--_p);
	font-family: inherit;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
}
.smartsms-link[disabled] { color: #9ca3af; cursor: default; }

.smartsms-timer { font-size: 13px; color: #9ca3af; }

.smartsms-loggedin { margin: 0; text-align: center; }

/* دکمه‌ی شناور. */
.smartsms-trigger {
	position: fixed;
	inset-inline-end: 20px;
	inset-block-end: 20px;
	z-index: 99998;
	padding: 12px 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: var(--smartsms-primary, #6d5efc);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* لایه و پاپ‌آپ. */
.smartsms-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000; /* بالاتر از نوارها/منوی چسبان قالب. */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
	background: rgba(17,20,32,.55);
	backdrop-filter: blur(2px);
}
/* مخفی‌سازی قطعی تا وقتی بسته است هیچ تاچی نگیرد. */
.smartsms-overlay[hidden] { display: none !important; }

.smartsms-modal {
	position: relative;
	margin: auto;
	max-width: 100%;
	animation: smartsms-fade .18s ease; /* بدون transform تا فوکوس ورودی روی iOS خراب نشود. */
}
@keyframes smartsms-fade { from { opacity: 0; } to { opacity: 1; } }

/* ورودی‌ها همیشه بالای لایه‌ی تزئینی و قابل‌تپ. */
.smartsms-card .smartsms-step,
.smartsms-card .smartsms-title { position: relative; z-index: 2; }

.smartsms-card .smartsms-close {
	position: absolute !important;
	inset-block-start: 12px !important;
	inset-inline-end: 12px !important;
	inset-inline-start: auto !important;
	z-index: 5 !important;
	width: 30px !important;
	height: 30px !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	font-size: 17px !important;
	line-height: 1 !important;
	color: #9096a6 !important;
	background: rgba(140, 146, 165, .12) !important;
	border: none !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	cursor: pointer !important;
	transition: background .15s ease, color .15s ease;
}
.smartsms-card .smartsms-close:hover { background: rgba(140, 146, 165, .24) !important; color: #4b5563 !important; }

/* حالت کشویی از کنار. */
.smartsms-display-slide { justify-content: flex-start; }
.smartsms-display-slide .smartsms-modal {
	margin: 0;
	height: 100%;
	display: flex;
	align-items: center;
	animation: smartsms-slide .22s ease;
}
.smartsms-display-slide .smartsms-card {
	height: 100%;
	max-width: 360px;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

@keyframes smartsms-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes smartsms-slide { from { transform: translateX(-40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ پوسته‌ها (۱۱ طرح منتخب) ============ */

/* ۱) مینیمال: کارت تمیز با سایه‌ی نرم. */
.smartsms-skin-minimal { box-shadow: 0 20px 55px rgba(17,20,32,.14); border: 1px solid rgba(17,20,32,.04); }

/* ۲) شیشه‌ای: گلاسمورفیسم روی هاله‌ی رنگی داخلی. */
.smartsms-skin-glass {
	background: color-mix(in srgb, var(--_card) 30%, transparent);
	backdrop-filter: blur(20px) saturate(150%);
	-webkit-backdrop-filter: blur(20px) saturate(150%);
	border: 1px solid rgba(255,255,255,.55);
	box-shadow: 0 24px 55px rgba(17,20,32,.28);
}
.smartsms-skin-glass .smartsms-skin-deco {
	display: block; position: absolute; inset: 0; z-index: -1; opacity: .9;
	background: linear-gradient(135deg, var(--_p), color-mix(in srgb, var(--_p) 45%, #00d4ff));
}

/* ۳) نئون تیره: هاله‌ی نئونی رنگ دکمه. */
.smartsms-skin-neon {
	background: #0f1020;
	border: 1px solid transparent;
	color: #eef0f7;
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--_p) 50%, transparent), 0 0 40px color-mix(in srgb, var(--_p) 45%, transparent);
}
.smartsms-skin-neon .smartsms-title { color: #fff; }
.smartsms-skin-neon .smartsms-label { color: #8b90b5; }
.smartsms-skin-neon .smartsms-input { background: #171833; border-color: #2a2c53; color: #fff; }
.smartsms-skin-neon .smartsms-input:focus { border-color: var(--_p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_p) 35%, transparent); }
.smartsms-skin-neon .smartsms-btn { box-shadow: 0 0 20px color-mix(in srgb, var(--_p) 60%, transparent); }

/* ۹) بلند با آواتار: عمودی و وسط‌چین. */
.smartsms-skin-tall { max-width: 300px; text-align: center; padding-top: 34px; box-shadow: 0 22px 55px rgba(17,20,32,.16); border: 1px solid rgba(17,20,32,.04); }
.smartsms-skin-tall .smartsms-skin-deco {
	display: block; width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
	background: linear-gradient(135deg, var(--_p), color-mix(in srgb, var(--_p) 40%, #00d4ff));
	box-shadow: 0 8px 20px color-mix(in srgb, var(--_p) 40%, transparent);
}
.smartsms-skin-tall .smartsms-label { text-align: center; }

/* ۱۲) نئومورفیسم: سطوح نرم برجسته/فرورفته. */
.smartsms-skin-neumorph {
	background: #e8ebf3;
	border: none;
	box-shadow: 14px 14px 28px #c5c9d6, -14px -14px 28px #ffffff;
}
.smartsms-skin-neumorph .smartsms-input { background: #e8ebf3; border: none; box-shadow: inset 5px 5px 10px #c9cdd9, inset -5px -5px 10px #ffffff; }
.smartsms-skin-neumorph .smartsms-btn { background: #e8ebf3; color: var(--_p); box-shadow: 6px 6px 14px #c5c9d6, -6px -6px 14px #ffffff; }

/* ۱۳) لوکس طلایی: تیره با لهجه‌ی طلایی. */
.smartsms-skin-luxe {
	background: #17171c;
	border: 1px solid #33333c;
	color: #f4efe2;
	box-shadow: 0 22px 55px rgba(0,0,0,.5);
}
.smartsms-skin-luxe .smartsms-title { color: #e9cf8f; }
.smartsms-skin-luxe .smartsms-label { color: #9a927f; }
.smartsms-skin-luxe .smartsms-input { background: #1f1f26; border-color: #3a3a44; color: #fff; }
.smartsms-skin-luxe .smartsms-btn { background: linear-gradient(135deg, #e9cf8f, #b8912f); color: #1a1a1a; }

/* ۱۴) پاستیلی: ورودی و دکمه‌ی قرصی. */
.smartsms-skin-pastel {
	border: 1px solid rgba(0,0,0,.04);
	box-shadow: 0 18px 44px color-mix(in srgb, var(--_p) 18%, transparent);
}
.smartsms-skin-pastel .smartsms-input { border-radius: 999px; }
.smartsms-skin-pastel .smartsms-btn { border-radius: 999px; }

/* ۱۵) خط‌دار رنگی: نوار بالای کارت. */
.smartsms-skin-bar {
	border: 1px solid rgba(17,20,32,.06);
	border-top: 5px solid var(--_p);
	box-shadow: 0 14px 34px rgba(17,20,32,.1);
}

/* ۱۷ و ۱۸) کارت تمیز؛ تکسچر روی بک‌گراند (wrapper) اعمال می‌شود. */
.smartsms-card.smartsms-skin-dots,
.smartsms-card.smartsms-skin-stripes {
	box-shadow: 0 18px 44px rgba(17,20,32,.12);
	border: 1px solid rgba(17,20,32,.05);
}

/* تکسچر نقطه‌ای روی بک‌گراند. */
.smartsms-inline.smartsms-skin-dots,
.smartsms-overlay.smartsms-skin-dots {
	background-color: var(--smartsms-bg, #eef0f7);
	background-image: radial-gradient(rgba(17,20,32,.14) 1.5px, transparent 1.5px);
	background-size: 18px 18px;
}

/* تکسچر خطوط روی بک‌گراند. */
.smartsms-inline.smartsms-skin-stripes,
.smartsms-overlay.smartsms-skin-stripes {
	background-color: var(--smartsms-bg, #eceefb);
	background-image: repeating-linear-gradient(45deg, rgba(17,20,32,.05) 0 10px, transparent 10px 20px);
}

/* در حالت پاپ‌آپ، تکسچر جای دیم تیره را می‌گیرد. */
.smartsms-overlay.smartsms-skin-dots,
.smartsms-overlay.smartsms-skin-stripes { backdrop-filter: none; }

/* ۱۹) آئروگلس: بلور رنگی iOS. */
.smartsms-skin-aero {
	background: color-mix(in srgb, var(--_card) 32%, transparent);
	backdrop-filter: blur(24px) saturate(170%);
	-webkit-backdrop-filter: blur(24px) saturate(170%);
	border: 1px solid rgba(255,255,255,.5);
	box-shadow: 0 24px 55px rgba(17,20,32,.24);
}
.smartsms-skin-aero .smartsms-skin-deco {
	display: block; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(135deg, #ffd27f, #ff7ac6 45%, var(--_p));
}
.smartsms-skin-aero .smartsms-btn { background: rgba(255,255,255,.92); color: color-mix(in srgb, var(--_p) 80%, #000); }

/* حالت صفحه‌ی جدا (شورت‌کد): زمینه‌ی صفحه هم‌رنگ پس‌زمینه‌ی انتخابی. */
.smartsms-inline {
	background: var(--smartsms-bg, transparent);
	padding: 40px 16px;
	border-radius: 18px;
}

/* ریسپانسیو. */
@media (max-width: 480px) {
	.smartsms-overlay:not(.smartsms-display-slide) { align-items: center; }
	.smartsms-overlay:not(.smartsms-display-slide) .smartsms-modal { width: 100%; margin: auto; }
	.smartsms-overlay:not(.smartsms-display-slide) .smartsms-card {
		max-width: 100%;
		animation: smartsms-fade .2s ease;
	}
	.smartsms-display-slide .smartsms-card { max-width: 86vw; }
}

@keyframes smartsms-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   مقاوم‌سازی در برابر CSS قالب (تا طرح کامل و بدون تداخل بیاید)
   ============================================================ */
.smartsms-card, .smartsms-card * { box-sizing: border-box; }

.smartsms-card .smartsms-input {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: block !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 13px 14px !important;
	font: inherit !important;
	font-size: 16px !important;
	line-height: 1.4 !important;
	color: #1f2430 !important;
	background: #fbfbfd !important;
	border: 1.5px solid #e3e4ea !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	text-align: center !important;
	letter-spacing: 2px !important;
	direction: ltr !important;
	outline: none !important;
}

.smartsms-card .smartsms-btn {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: block !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 14px 0 0 !important;
	padding: 13px 16px !important;
	font: inherit !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	color: #fff !important;
	background: var(--_p) !important;
	border: none !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	cursor: pointer !important;
	transition: filter .15s ease, transform .08s ease;
}
.smartsms-card .smartsms-btn:hover { filter: brightness(1.06); }

.smartsms-card .smartsms-label { display: block !important; text-align: right; margin-bottom: 8px !important; }
.smartsms-card .smartsms-title { margin: 0 0 16px !important; }

/* بازتعریف رنگ‌های اختصاصی هر پوسته با اولویت بالا. */
.smartsms-card.smartsms-skin-neon { background: #0f1020 !important; }
.smartsms-card.smartsms-skin-luxe { background: #17171c !important; }
.smartsms-card.smartsms-skin-neumorph { background: #e8ebf3 !important; }

.smartsms-skin-neon .smartsms-input { background: #171833 !important; border-color: #2a2c53 !important; color: #fff !important; }
.smartsms-skin-luxe .smartsms-input { background: #1f1f26 !important; border-color: #3a3a44 !important; color: #fff !important; }
.smartsms-skin-neumorph .smartsms-input { background: #e8ebf3 !important; border: none !important; box-shadow: inset 5px 5px 10px #c9cdd9, inset -5px -5px 10px #fff !important; }

.smartsms-skin-neon .smartsms-title { color: #fff !important; }
.smartsms-skin-luxe .smartsms-title { color: #e9cf8f !important; }

.smartsms-skin-neumorph .smartsms-btn { background: #e8ebf3 !important; color: var(--_p) !important; box-shadow: 6px 6px 14px #c5c9d6, -6px -6px 14px #fff !important; }
.smartsms-skin-luxe .smartsms-btn { background: linear-gradient(135deg, #e9cf8f, #b8912f) !important; color: #1a1a1a !important; }
.smartsms-skin-aero .smartsms-btn { background: rgba(255,255,255,.92) !important; color: color-mix(in srgb, var(--_p) 80%, #000) !important; }
.smartsms-skin-gradient .smartsms-btn { background: linear-gradient(135deg, var(--_p), color-mix(in srgb, var(--_p) 55%, #00d4ff)) !important; }

.smartsms-skin-pastel .smartsms-input, .smartsms-skin-pastel .smartsms-btn { border-radius: 999px !important; }
.smartsms-skin-soft .smartsms-input, .smartsms-skin-soft .smartsms-btn { border-radius: 999px !important; }

/* ============================================================
   لایه‌ی نهایی با اولویت بسیار بالا (تکرار کلاس) تا قالب‌های سرسخت
   نتوانند دکمه/ورودی را override کنند (مخصوصاً border-radius در سافاری).
   ============================================================ */
.smartsms-card .smartsms-btn.smartsms-btn {
	-webkit-appearance: none !important; appearance: none !important;
	border: 0 !important; border-radius: 12px !important; box-shadow: none !important;
	background: var(--_p) !important; color: #fff !important; width: 100% !important;
}
.smartsms-card .smartsms-input.smartsms-input {
	-webkit-appearance: none !important; appearance: none !important;
	border-radius: 12px !important;
}
.smartsms-card.smartsms-skin-pastel .smartsms-btn.smartsms-btn,
.smartsms-card.smartsms-skin-soft .smartsms-btn.smartsms-btn { border-radius: 999px !important; }
.smartsms-card.smartsms-skin-luxe .smartsms-btn.smartsms-btn { background: linear-gradient(135deg, #e9cf8f, #b8912f) !important; color: #1a1a1a !important; }
.smartsms-card.smartsms-skin-neumorph .smartsms-btn.smartsms-btn { background: #e8ebf3 !important; color: var(--_p) !important; box-shadow: 6px 6px 14px #c5c9d6, -6px -6px 14px #fff !important; }
.smartsms-card.smartsms-skin-aero .smartsms-btn.smartsms-btn { background: rgba(255,255,255,.92) !important; color: color-mix(in srgb, var(--_p) 80%, #000) !important; }

/* ---------- مربع‌های کد (OTP) ---------- */
.smartsms-card .smartsms-otp {
	display: flex !important;
	gap: 8px;
	direction: ltr;
	justify-content: center;
	margin: 4px 0 2px;
}
.smartsms-card .smartsms-otp .smartsms-otp-box {
	-webkit-appearance: none !important; appearance: none !important;
	width: 48px !important;
	height: 56px !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	text-align: center !important;
	font: inherit !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	color: #1f2430 !important;
	background: #fbfbfd !important;
	border: 1.5px solid #e3e4ea !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	letter-spacing: 0 !important;
	transition: border-color .12s ease, box-shadow .12s ease;
}
.smartsms-card .smartsms-otp .smartsms-otp-box:focus {
	border-color: var(--_p) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--_p) 20%, transparent) !important;
	outline: none !important;
}
.smartsms-skin-neon .smartsms-otp .smartsms-otp-box,
.smartsms-skin-luxe .smartsms-otp .smartsms-otp-box { background: #1f1f2e !important; border-color: #33344f !important; color: #fff !important; }
.smartsms-skin-neumorph .smartsms-otp .smartsms-otp-box { background: #e8ebf3 !important; border: none !important; box-shadow: inset 4px 4px 8px #c9cdd9, inset -4px -4px 8px #fff !important; }

@media (max-width: 420px) {
	.smartsms-card .smartsms-otp .smartsms-otp-box { width: 42px !important; height: 50px !important; font-size: 19px !important; }
}
@media (max-width: 340px) {
	.smartsms-card .smartsms-otp { gap: 6px; }
	.smartsms-card .smartsms-otp .smartsms-otp-box { width: 36px !important; height: 44px !important; font-size: 17px !important; }
}

/* ---------- لینک‌ها (ویرایش شماره / ارسال مجدد) به‌صورت متن هایپرلینک ---------- */
.smartsms-card a.smartsms-link,
.smartsms-card .smartsms-link {
	display: inline !important;
	width: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--_p) !important;
	font: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	text-decoration: none !important;
}
.smartsms-card a.smartsms-link:hover,
.smartsms-card .smartsms-link:hover { text-decoration: underline !important; }
.smartsms-skin-neon .smartsms-link, .smartsms-skin-luxe .smartsms-link { color: color-mix(in srgb, var(--_p) 85%, #fff) !important; }

.smartsms-card .smartsms-actions { display: flex !important; align-items: center; justify-content: space-between; margin-top: 12px; }
.smartsms-card .smartsms-timer { font-size: 13px; color: #9ca3af; }
.smartsms-card .smartsms-timer.smartsms-timer-resend { color: var(--_p) !important; cursor: pointer; text-decoration: underline; }
.smartsms-skin-neon .smartsms-timer, .smartsms-skin-luxe .smartsms-timer { color: #8b90b5; }

/* ============================================================
   لایه‌ی فوق‌قوی (html body) برای قالب‌های بسیار سرسخت — مخصوصاً سافاری.
   ============================================================ */
html body .smartsms-card .smartsms-btn {
	-webkit-appearance: none !important; appearance: none !important;
	border: 0 !important; border-radius: 12px !important; box-shadow: none !important;
	background: var(--_p) !important; color: #fff !important;
	width: 100% !important; min-height: 0 !important; height: auto !important;
}
html body .smartsms-card.smartsms-skin-pastel .smartsms-btn,
html body .smartsms-card.smartsms-skin-soft .smartsms-btn { border-radius: 999px !important; }
html body .smartsms-card.smartsms-skin-luxe .smartsms-btn { background: linear-gradient(135deg, #e9cf8f, #b8912f) !important; color: #1a1a1a !important; }
html body .smartsms-card.smartsms-skin-neumorph .smartsms-btn { background: #e8ebf3 !important; color: var(--_p) !important; }
html body .smartsms-card.smartsms-skin-aero .smartsms-btn { background: rgba(255,255,255,.92) !important; }
html body .smartsms-card .smartsms-input,
html body .smartsms-card .smartsms-otp-box {
	-webkit-appearance: none !important; appearance: none !important; border-radius: 12px !important;
}

/* ============================================================
   حذف فرم لاگین/ثبت‌نام پیش‌فرض ووکامرس در صفحه‌ی تسویه‌حساب
   (به‌جای آن پاپ‌آپ ما با کلیک روی «برای ورود اینجا کلیک کنید» باز می‌شود).
   ============================================================ */
body.woocommerce-checkout form.woocommerce-form-login,
body.woocommerce-checkout .woocommerce-form-login {
	display: none !important;
}

/* ============================================================
   اطمینان از تعامل‌پذیری روی موبایل (تاچ و z-index)
   ============================================================ */
.smartsms-trigger { z-index: 2147482000 !important; }
html body .smartsms-overlay,
html body .smartsms-modal,
html body .smartsms-card,
html body .smartsms-card .smartsms-input,
html body .smartsms-card .smartsms-otp-box,
html body .smartsms-card .smartsms-btn,
html body .smartsms-card a.smartsms-link {
	pointer-events: auto !important;
	touch-action: manipulation;
}
html body .smartsms-card .smartsms-input,
html body .smartsms-card .smartsms-otp-box {
	-webkit-user-select: text !important;
	user-select: text !important;
	opacity: 1 !important;
	visibility: visible !important;
}
