/* =====================================================================
   ویجت چت‌بات هوشمند سایت — سه مدل نمایش (شناور/تب‌کناری/نوار پایین)
   و سه تم (مدرن/مینیمال/تیره).

   دو اصل طراحی این فایل:
   ۱) استحکام در برابر CSS قالب‌های وردپرس: از آنجا که این ویجت باید روی
      هزاران قالب متفاوت درست کار کند، خصوصیات حیاتی (موقعیت، نمایش،
      z-index) با !important محافظت شده‌اند — دقیقاً همان روشی که
      ابزارهای چت حرفه‌ای (Intercom/Crisp/Tawk.to) استفاده می‌کنند،
      چون قالب‌ها اغلب قوانین بسیار کلی و پراولویت دارند.
   ۲) ریسپانسیو واقعی: رفع اشکال کلاسیک flexbox (min-height:0)، عدم
      تکیه بر ویژگی hidden (که با display تداخل می‌کند)، واحد ارتفاع
      پویای ویوپورت برای موبایل، و پرهیز از transform روی عنصر ریشه
      (که باعث می‌شود عناصر position:fixed داخلش به‌جای صفحه، به‌همان
      عنصر کوچک محدود شوند).
   ===================================================================== */

:root {
	--noya-vh: 1vh; /* توسط جاوااسکریپت برای مرورگرهای بدون پشتیبانی dvh به‌روزرسانی می‌شود */
}

@media (max-width: 640px) {
	body.noya-chat-locked { overflow: hidden !important; }
}

.noya-chat-widget {
	--noya-chat-color: #4f46e5;
	--noya-chat-color-dark: #4338ca;
	--noya-chat-color-light: #818cf8;
	--noya-chat-margin: 20px;
	--noya-chat-size: 62px;
	--noya-chat-icon-size: 27px;
	--noya-bg: #ffffff;
	--noya-bg-soft: #f7f8fc;
	--noya-text: #1f2937;
	--noya-text-soft: #667085;
	--noya-border: #e9eaf3;
	--noya-bubble-bot-bg: #ffffff;
	--noya-bubble-bot-text: #1f2937;
	--noya-header-text: #ffffff;
	--noya-radius: 20px;
	--noya-shadow: 0 20px 56px -12px rgba(17, 24, 39, .28), 0 4px 16px rgba(17, 24, 39, .12);
	font-family: 'Vazirmatn', Tahoma, Arial, sans-serif !important;
	direction: rtl !important;
	box-sizing: border-box !important;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-align: start;
	letter-spacing: normal;
	text-transform: none;
	white-space: normal;
}
.noya-chat-widget,
.noya-chat-widget *,
.noya-chat-widget *::before,
.noya-chat-widget *::after {
	box-sizing: border-box !important;
	margin: 0;
	padding: 0;
	border: 0;
	font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
	-webkit-tap-highlight-color: transparent;
}
/* محافظت هدفمند در برابر ریست‌های تهاجمی قالب‌های وردپرس روی button/input —
   دقیقاً همان الگویی که اکثر قالب‌ها با انتخابگرهای کلی و !important
   استفاده می‌کنند (مثلاً «button { border-radius:0 !important }») و بدون
   این محافظت، شکل دکمه‌ی شناور و ورودی چت را کاملاً خراب می‌کند. */
.noya-chat-widget button,
.noya-chat-widget input {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	outline: none !important;
	text-shadow: none !important;
	letter-spacing: normal !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	line-height: normal !important;
	text-transform: none !important;
	font-weight: normal !important;
}
.noya-chat-widget button {
	font: inherit;
	color: inherit;
	background: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}
.noya-chat-widget a { text-decoration: none; color: inherit; }
.noya-chat-widget img { display: block; max-width: 100%; }
.noya-chat-widget input { font: inherit; color: inherit; }

/* ---------- اندازه‌ی دکمه‌ی شناور ---------- */
.noya-chat-widget.noya-size-small  { --noya-chat-size: 52px; --noya-chat-icon-size: 22px; }
.noya-chat-widget.noya-size-medium { --noya-chat-size: 62px; --noya-chat-icon-size: 27px; }
.noya-chat-widget.noya-size-large  { --noya-chat-size: 74px; --noya-chat-icon-size: 32px; }

/* ---------- تم: مینیمال (تخت، تضاد بالا، بدون گرادیان) ---------- */
.noya-chat-widget.noya-theme-minimal {
	--noya-radius: 12px;
	--noya-shadow: 0 14px 38px -8px rgba(17, 24, 39, .2);
}

/* ---------- تم: تیره ---------- */
.noya-chat-widget.noya-theme-dark {
	--noya-bg: #191926;
	--noya-bg-soft: #131320;
	--noya-text: #eef0f7;
	--noya-text-soft: #9a9cb5;
	--noya-border: #2e2e42;
	--noya-bubble-bot-bg: #23233a;
	--noya-bubble-bot-text: #eef0f7;
}

/* ---------- تم: کلی‌مورفیسم (نرم و برجسته‌ی «رسی» با سایه‌ی دوطرفه) ---------- */
.noya-chat-widget.noya-theme-claymorphism {
	--noya-bg: #eef0f7;
	--noya-bg-soft: #e6e9f3;
	--noya-text: #33334a;
	--noya-text-soft: #6b6f8a;
	--noya-border: transparent;
	--noya-bubble-bot-bg: #eef0f7;
	--noya-bubble-bot-text: #33334a;
	--noya-radius: 26px;
	--noya-clay-light: rgba(255, 255, 255, .9);
	--noya-clay-dark: rgba(163, 177, 198, .55);
	--noya-shadow: 12px 12px 28px var(--noya-clay-dark), -12px -12px 28px var(--noya-clay-light);
}

/* =====================================================================
   عناصر مشترک: حباب‌های پیام، پیشنهادها، محصولات، فرم رضایت، نوار ورودی
   ===================================================================== */

.noya-chat-messages {
	flex: 1 1 auto;
	min-height: 0; /* رفع اشکال معروف flexbox: بدون این خط، این ناحیه از اسکرول‌شدن سر باز می‌زند و نوار ارسال پیام را از صفحه بیرون می‌راند */
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 18px 16px;
	background: var(--noya-bg-soft);
	display: flex;
	flex-direction: column;
	gap: 12px;
	scrollbar-width: thin;
}
.noya-chat-messages::-webkit-scrollbar { width: 6px; }
.noya-chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .14); border-radius: 10px; }
.noya-chat-messages::-webkit-scrollbar-track { background: transparent; }

.noya-chat-bubble {
	max-width: 82%;
	padding: 11px 15px;
	border-radius: 18px;
	font-size: 13.5px;
	line-height: 1.85;
	word-wrap: break-word;
	flex-shrink: 0;
	animation: noya-chat-bubble-in .22s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes noya-chat-bubble-in {
	from { opacity: 0; transform: translateY(6px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
.noya-chat-bubble-assistant {
	align-self: flex-start;
	background: var(--noya-bubble-bot-bg);
	border: 1px solid var(--noya-border);
	color: var(--noya-bubble-bot-text);
	border-start-start-radius: 5px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
.noya-chat-bubble-user {
	align-self: flex-end;
	background: linear-gradient(135deg, var(--noya-chat-color), var(--noya-chat-color-dark));
	color: #fff;
	border-start-end-radius: 5px;
	box-shadow: 0 4px 14px -4px rgba(79, 70, 229, .45);
}

.noya-chat-typing { display: flex; gap: 4px; padding: 13px 16px; align-items: center; flex-shrink: 0; }
.noya-chat-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--noya-text-soft);
	animation: noya-chat-blink 1.2s infinite ease-in-out;
}
.noya-chat-typing span:nth-child(2) { animation-delay: .2s; }
.noya-chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes noya-chat-blink {
	0%, 80%, 100% { opacity: .3; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

.noya-chat-quickreplies { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; flex-shrink: 0; }
.noya-chat-widget .noya-chat-quickreply {
	background: var(--noya-bg) !important;
	border: 1.5px solid var(--noya-chat-color) !important;
	color: var(--noya-chat-color);
	border-radius: 20px !important;
	padding: 6px 14px !important;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .12s ease;
}
.noya-chat-widget .noya-chat-quickreply:hover { background: var(--noya-chat-color) !important; color: #fff; transform: translateY(-1px); }
.noya-chat-widget .noya-chat-quickreply:active { transform: translateY(0); }

.noya-chat-products { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; width: 100%; flex-shrink: 0; }
.noya-chat-product {
	display: flex;
	gap: 10px;
	background: var(--noya-bg);
	border: 1px solid var(--noya-border);
	border-radius: 14px;
	padding: 9px;
	color: inherit;
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.noya-chat-product:hover { box-shadow: 0 8px 22px -6px rgba(17, 24, 39, .18); transform: translateY(-2px); border-color: var(--noya-chat-color-light); }
.noya-chat-product img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--noya-bg-soft); }
.noya-chat-product-info { flex: 1; min-width: 0; }
.noya-chat-product-title { font-size: 12.5px; font-weight: 700; color: var(--noya-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noya-chat-product-price { font-size: 12.5px; color: var(--noya-chat-color); font-weight: 700; margin-top: 3px; }
.noya-chat-product-stock { font-size: 10.5px; margin-top: 3px; font-weight: 600; }
.noya-chat-product-stock.ok { color: #16a34a; }
.noya-chat-product-stock.no { color: #dc2626; }

.noya-chat-checkout {
	align-self: stretch;
	display: flex;
	gap: 12px;
	align-items: center;
	background: linear-gradient(135deg, var(--noya-chat-color) 0%, var(--noya-chat-color-dark) 100%);
	border-radius: 16px;
	padding: 15px;
	flex-shrink: 0;
	box-shadow: 0 10px 28px -8px rgba(79, 70, 229, .5);
}
.noya-chat-checkout-icon { font-size: 30px; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2)); }
.noya-chat-checkout-body { flex: 1; min-width: 0; }
.noya-chat-checkout-title { color: #fff; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noya-chat-checkout-price { color: rgba(255, 255, 255, .85); font-size: 12px; margin-top: 3px; }
.noya-chat-checkout-btn {
	display: inline-block;
	margin-top: 9px;
	background: #fff;
	color: var(--noya-chat-color-dark);
	font-size: 12.5px;
	font-weight: 800;
	padding: 8px 18px;
	border-radius: 999px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.noya-chat-checkout-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .3); }

.noya-chat-consent {
	align-self: stretch;
	background: var(--noya-bg);
	border: 1.5px dashed var(--noya-chat-color);
	border-radius: 14px;
	padding: 13px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-shrink: 0;
}
.noya-chat-consent-text { font-size: 12.5px; color: var(--noya-text-soft); margin: 0 0 2px; line-height: 1.7; }
.noya-chat-widget .noya-chat-consent-input {
	border: 1.5px solid var(--noya-border) !important;
	border-radius: 10px !important;
	padding: 9px 12px !important;
	font-size: 13px;
	direction: rtl;
	background: var(--noya-bg) !important;
	color: var(--noya-text);
	transition: border-color .15s ease, box-shadow .15s ease;
	outline: none;
	width: 100%;
	display: block;
}
.noya-chat-widget .noya-chat-consent-input:focus { border-color: var(--noya-chat-color) !important; box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.noya-chat-consent-actions { display: flex; gap: 8px; margin-top: 4px; }
.noya-chat-widget .noya-chat-consent-submit, .noya-chat-widget .noya-chat-consent-skip {
	flex: 1;
	border-radius: 10px !important;
	padding: 9px 10px !important;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease, transform .12s ease;
}
.noya-chat-widget .noya-chat-consent-submit { background: var(--noya-chat-color) !important; color: #fff; }
.noya-chat-widget .noya-chat-consent-submit:hover { filter: brightness(1.08); }
.noya-chat-widget .noya-chat-consent-skip { background: var(--noya-bg-soft) !important; color: var(--noya-text-soft); }
.noya-chat-widget .noya-chat-consent-skip:hover { filter: brightness(.97); }

.noya-chat-inputbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	padding-bottom: max(12px, env(safe-area-inset-bottom));
	border-top: 1px solid var(--noya-border);
	background: var(--noya-bg);
	flex-shrink: 0; /* هرگز فشرده نشود؛ همیشه در پایین کادر باقی می‌ماند */
}
.noya-chat-widget .noya-chat-input {
	flex: 1;
	min-width: 0;
	border: 1.5px solid var(--noya-border) !important;
	border-radius: 24px !important;
	padding: 11px 17px !important;
	font-size: 13.5px;
	direction: rtl;
	outline: none;
	background: var(--noya-bg-soft) !important;
	color: var(--noya-text);
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	width: 100%;
	display: block;
}
.noya-chat-widget .noya-chat-input:focus { border-color: var(--noya-chat-color) !important; background: var(--noya-bg) !important; box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.noya-chat-widget .noya-chat-input::placeholder { color: var(--noya-text-soft); opacity: .8; }
.noya-chat-widget .noya-chat-send {
	width: 42px;
	height: 42px;
	min-width: 42px;
	border-radius: 50% !important;
	background: linear-gradient(135deg, var(--noya-chat-color), var(--noya-chat-color-dark)) !important;
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 15px;
	transform: scaleX(-1);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: filter .15s ease, transform .12s ease;
	box-shadow: 0 4px 12px -3px rgba(79, 70, 229, .5) !important;
}
.noya-chat-widget .noya-chat-send:hover:not(:disabled) { filter: brightness(1.08); }
.noya-chat-widget .noya-chat-send:active:not(:disabled) { transform: scaleX(-1) scale(.94); }
.noya-chat-widget .noya-chat-send:disabled { opacity: .5; cursor: default; }

.noya-chat-header {
	background: linear-gradient(120deg, var(--noya-chat-color) 0%, var(--noya-chat-color-dark) 100%);
	color: var(--noya-header-text);
	padding: 16px;
	display: flex;
	align-items: center;
	gap: 11px;
	flex-shrink: 0;
}
.noya-theme-minimal .noya-chat-header { background: var(--noya-chat-color); }
.noya-chat-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: rgba(255, 255, 255, .22);
	flex-shrink: 0;
	border: 2px solid rgba(255, 255, 255, .35);
}
.noya-chat-avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 17px;
}
.noya-chat-header-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; gap: 2px; }
.noya-chat-header-info strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.noya-chat-status { font-size: 11.5px; opacity: .9; display: flex; align-items: center; }
.noya-chat-status::before {
	content: '';
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #4ade80;
	margin-inline-end: 5px;
	box-shadow: 0 0 0 rgba(74, 222, 128, .6);
	animation: noya-chat-status-pulse 2s infinite;
}
@keyframes noya-chat-status-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); }
	70%  { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
	100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.noya-chat-widget .noya-chat-close {
	background: rgba(255, 255, 255, .16) !important;
	color: #fff;
	width: 30px;
	height: 30px;
	min-width: 30px;
	border-radius: 50% !important;
	cursor: pointer;
	font-size: 13px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, transform .12s ease;
}
.noya-chat-widget .noya-chat-close:hover { background: rgba(255, 255, 255, .3) !important; transform: rotate(90deg); }

/* ساختار داخلی مشترک هر سه مدل: هدر + پیام‌ها (کشسان) + نوار ورودی (ثابت) */
.noya-chat-body {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

/* =====================================================================
   مدل ۱: شناور (Bubble) — دکمه‌ی گرد در گوشه، پنجره‌ی شناور کنار آن
   ===================================================================== */

.noya-chat-widget.noya-model-bubble {
	display: block !important;
	position: fixed !important;
	bottom: max(var(--noya-chat-margin), env(safe-area-inset-bottom)) !important;
	z-index: 2147483000 !important;
}
.noya-chat-widget.noya-model-bubble.noya-chat-right { right: var(--noya-chat-margin) !important; left: auto !important; }
.noya-chat-widget.noya-model-bubble.noya-chat-left { left: var(--noya-chat-margin) !important; right: auto !important; }

.noya-chat-widget .noya-bubble-launcher {
	width: var(--noya-chat-size);
	height: var(--noya-chat-size);
	border-radius: 50% !important;
	background: linear-gradient(140deg, var(--noya-chat-color-light) 0%, var(--noya-chat-color) 45%, var(--noya-chat-color-dark) 100%) !important;
	box-shadow: 0 10px 30px -6px rgba(79, 70, 229, .55), 0 3px 8px rgba(17, 24, 39, .15), inset 0 1px 1px rgba(255, 255, 255, .25) !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	transition: transform .22s cubic-bezier(.34, 1.4, .64, 1), box-shadow .22s ease;
}
.noya-chat-widget.noya-theme-minimal .noya-bubble-launcher { background: var(--noya-chat-color) !important; }
.noya-chat-widget .noya-bubble-launcher:hover { transform: scale(1.07) translateY(-2px); box-shadow: 0 14px 34px -6px rgba(79, 70, 229, .6), 0 4px 10px rgba(17, 24, 39, .18) !important; }
.noya-bubble-launcher-icon { font-size: var(--noya-chat-icon-size); line-height: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .15)); }
.noya-bubble-launcher-icon-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.noya-chat-widget.noya-model-bubble.is-open .noya-bubble-launcher { transform: scale(.9) rotate(-8deg); }

.noya-chat-badge {
	position: absolute;
	top: -3px;
	inset-inline-end: -3px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 20px;
	height: 20px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
	border: 2px solid var(--noya-bg);
	box-shadow: 0 2px 6px rgba(239, 68, 68, .5);
}

.noya-bubble-panel {
	position: fixed !important;
	bottom: calc(var(--noya-chat-margin) + var(--noya-chat-size) + 16px) !important;
	width: 380px;
	max-width: calc(100vw - 28px);
	height: min(620px, calc(100 * var(--noya-vh) - 140px));
	background: var(--noya-bg);
	border-radius: var(--noya-radius);
	box-shadow: var(--noya-shadow);
	display: flex !important;
	flex-direction: column;
	overflow: hidden;
	z-index: 2147483000 !important;
	/* نمایش/پنهانی بر پایه‌ی کلاس (نه ویژگی hidden) تا هیچ‌گاه با قوانین display این کلاس تداخل نکند */
	opacity: 0;
	transform: translateY(16px) scale(.96);
	pointer-events: none;
	visibility: hidden;
	transition: opacity .24s cubic-bezier(.22, 1, .36, 1), transform .24s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .24s;
}
.noya-model-bubble.is-open .noya-bubble-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
	visibility: visible;
	transition: opacity .24s cubic-bezier(.22, 1, .36, 1), transform .24s cubic-bezier(.22, 1, .36, 1);
}
@supports (height: 100dvh) {
	.noya-bubble-panel { height: min(620px, calc(100dvh - 140px)); }
}
.noya-chat-widget.noya-chat-right .noya-bubble-panel { right: var(--noya-chat-margin) !important; left: auto !important; }
.noya-chat-widget.noya-chat-left .noya-bubble-panel { left: var(--noya-chat-margin) !important; right: auto !important; }

/* =====================================================================
   مدل ۲: تب کناری (Side Tab) — زبانه‌ی عمودی چسبیده به لبه، پنل کشویی
   ===================================================================== */

.noya-chat-widget.noya-model-side_tab {
	display: block !important;
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
	pointer-events: none !important; /* فقط عناصر تعاملی داخل آن کلیک‌پذیرند؛ خود این پوسته اندازه‌ای ندارد */
}

.noya-chat-widget .noya-tab-launcher {
	position: fixed !important;
	top: 50% !important;
	transform: translateY(-50%);
	pointer-events: auto !important;
	writing-mode: vertical-rl;
	background: linear-gradient(180deg, var(--noya-chat-color-light), var(--noya-chat-color) 50%, var(--noya-chat-color-dark)) !important;
	color: #fff;
	border-radius: 16px 0 0 16px !important;
	padding: 20px 11px !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
	font-weight: 700;
	box-shadow: -6px 6px 24px -4px rgba(79, 70, 229, .4) !important;
	transition: padding .18s ease, box-shadow .18s ease;
}
.noya-chat-widget .noya-tab-launcher:hover { padding-inline-end: 15px !important; }
.noya-chat-widget.noya-theme-minimal .noya-tab-launcher { background: var(--noya-chat-color) !important; }
.noya-chat-widget.noya-model-side_tab.noya-chat-right .noya-tab-launcher { right: 0 !important; left: auto !important; }
.noya-chat-widget.noya-model-side_tab.noya-chat-left .noya-tab-launcher { left: 0 !important; right: auto !important; border-radius: 0 16px 16px 0; box-shadow: 6px 6px 24px -4px rgba(79, 70, 229, .4); }
.noya-tab-launcher-icon { font-size: 19px; writing-mode: horizontal-tb; }
.noya-tab-launcher-icon-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; writing-mode: horizontal-tb; }
.noya-chat-widget .noya-tab-launcher .noya-chat-badge { top: -6px; inset-inline-end: 50%; transform: translateX(50%); writing-mode: horizontal-tb; }

.noya-tab-panel {
	position: fixed !important;
	pointer-events: auto !important;
	top: 0 !important;
	bottom: 0 !important;
	width: 390px;
	max-width: 92vw;
	height: 100%;
	background: var(--noya-bg);
	box-shadow: var(--noya-shadow);
	display: flex !important;
	flex-direction: column;
	overflow: hidden;
	transition: transform .26s cubic-bezier(.22, 1, .36, 1);
}
.noya-chat-widget.noya-model-side_tab.noya-chat-right .noya-tab-panel { right: 0 !important; left: auto !important; border-radius: 22px 0 0 22px; transform: translateX(100%); }
.noya-chat-widget.noya-model-side_tab.noya-chat-left .noya-tab-panel { left: 0 !important; right: auto !important; border-radius: 0 22px 22px 0; transform: translateX(-100%); }
.noya-model-side_tab.is-open .noya-tab-panel { transform: translateX(0) !important; }

/* =====================================================================
   مدل ۳: نوار پایین (Bottom Dock) — نوار داکِ پایین صفحه، بازشونده به‌بالا
   ===================================================================== */

.noya-chat-widget.noya-model-bottom_dock {
	display: flex !important;
	position: fixed !important;
	right: 0 !important;
	left: 0 !important;
	bottom: 0 !important;
	z-index: 2147483000 !important;
	justify-content: center;
	pointer-events: none !important;
}
.noya-chat-widget.noya-model-bottom_dock.noya-chat-right { justify-content: flex-end; }
.noya-chat-widget.noya-model-bottom_dock.noya-chat-left { justify-content: flex-start; }

.noya-chat-widget .noya-dock-launcher {
	pointer-events: auto !important;
	margin: 0 var(--noya-chat-margin) max(var(--noya-chat-margin), env(safe-area-inset-bottom)) !important;
	background: var(--noya-bg) !important;
	border: 1px solid var(--noya-border) !important;
	border-radius: 999px !important;
	padding: 9px 20px 9px 9px !important;
	display: flex;
	align-items: center;
	gap: 11px;
	cursor: pointer;
	box-shadow: 0 12px 30px -8px rgba(17, 24, 39, .22), 0 2px 8px rgba(17, 24, 39, .08) !important;
	max-width: calc(100vw - 32px);
	position: relative;
	transition: transform .18s ease, box-shadow .18s ease;
}
.noya-chat-widget .noya-dock-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(17, 24, 39, .26), 0 3px 10px rgba(17, 24, 39, .1) !important; }
.noya-chat-widget .noya-dock-launcher-icon {
	width: 38px;
	height: 38px;
	min-width: 38px;
	border-radius: 50%;
	background: linear-gradient(140deg, var(--noya-chat-color-light), var(--noya-chat-color) 50%, var(--noya-chat-color-dark));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	overflow: hidden;
	box-shadow: 0 3px 8px -2px rgba(79, 70, 229, .5);
}
.noya-dock-launcher-icon-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.noya-dock-launcher-text { font-size: 13.5px; font-weight: 700; color: var(--noya-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noya-chat-widget .noya-dock-launcher .noya-chat-badge { top: -2px; inset-inline-end: -2px; }

.noya-dock-panel {
	pointer-events: auto !important;
	position: fixed !important;
	right: 0 !important;
	left: 0 !important;
	bottom: 0 !important;
	margin: 0 auto;
	width: 100%;
	max-width: 430px;
	height: min(620px, calc(100 * var(--noya-vh) - 40px));
	background: var(--noya-bg);
	border-radius: var(--noya-radius) var(--noya-radius) 0 0;
	box-shadow: var(--noya-shadow);
	display: flex !important;
	flex-direction: column;
	overflow: hidden;
	z-index: 2147483000 !important;
	transition: transform .26s cubic-bezier(.22, 1, .36, 1);
	transform: translateY(100%);
}
@supports (height: 100dvh) {
	.noya-dock-panel { height: min(620px, calc(100dvh - 40px)); }
}
.noya-model-bottom_dock.is-open .noya-dock-panel { transform: translateY(0); }
.noya-model-bottom_dock.noya-chat-right .noya-dock-panel { margin-inline-end: var(--noya-chat-margin); margin-inline-start: auto; }
.noya-model-bottom_dock.noya-chat-left .noya-dock-panel { margin-inline-start: var(--noya-chat-margin); margin-inline-end: auto; }

/* =====================================================================
   پس‌زمینه‌ی تیره‌ی پشت پنل هنگام بازبودن (برای تب کناری و داک پایین)
   ===================================================================== */
.noya-chat-overlay {
	position: fixed !important;
	inset: 0 !important;
	background: rgba(15, 17, 32, .4);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease;
	z-index: 2147482999 !important;
}
.noya-chat-overlay.is-visible { opacity: 1; pointer-events: auto; }

/* =====================================================================
   انیمیشن جلب‌توجه دکمه (فقط وقتی بسته است)
   ===================================================================== */
@keyframes noya-chat-anim-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.09); }
}
@keyframes noya-chat-anim-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}
@keyframes noya-chat-anim-shake {
	0%, 100% { transform: rotate(0deg); }
	20% { transform: rotate(-9deg); }
	40% { transform: rotate(8deg); }
	60% { transform: rotate(-5deg); }
	80% { transform: rotate(4deg); }
}
/* نسخه‌ی مخصوص تب کناری: چون این عنصر برای وسط‌چینی عمودی از transform:translateY(-50%)
   استفاده می‌کند، انیمیشن باید همان مقدار پایه را همراه خودش حفظ کند؛ در غیر این صورت
   انیمیشن، مقدار transform وسط‌چینی را کاملاً بازنویسی و موقعیت تب را خراب می‌کند. */
@keyframes noya-chat-anim-pulse-tab {
	0%, 100% { transform: translateY(-50%) scale(1); }
	50% { transform: translateY(-50%) scale(1.09); }
}
@keyframes noya-chat-anim-bounce-tab {
	0%, 100% { transform: translateY(-50%); }
	50% { transform: translateY(calc(-50% - 10px)); }
}
@keyframes noya-chat-anim-shake-tab {
	0%, 100% { transform: translateY(-50%) rotate(0deg); }
	20% { transform: translateY(-50%) rotate(-9deg); }
	40% { transform: translateY(-50%) rotate(8deg); }
	60% { transform: translateY(-50%) rotate(-5deg); }
	80% { transform: translateY(-50%) rotate(4deg); }
}
.noya-chat-widget.noya-anim-pulse:not(.is-open) .noya-bubble-launcher,
.noya-chat-widget.noya-anim-pulse:not(.is-open) .noya-dock-launcher-icon {
	animation: noya-chat-anim-pulse 2.2s ease-in-out infinite;
}
.noya-chat-widget.noya-anim-pulse:not(.is-open) .noya-tab-launcher {
	animation: noya-chat-anim-pulse-tab 2.2s ease-in-out infinite;
}
.noya-chat-widget.noya-anim-bounce:not(.is-open) .noya-bubble-launcher,
.noya-chat-widget.noya-anim-bounce:not(.is-open) .noya-dock-launcher-icon {
	animation: noya-chat-anim-bounce 1.9s ease-in-out infinite;
}
.noya-chat-widget.noya-anim-bounce:not(.is-open) .noya-tab-launcher {
	animation: noya-chat-anim-bounce-tab 1.9s ease-in-out infinite;
}
.noya-chat-widget.noya-anim-shake:not(.is-open) .noya-bubble-launcher,
.noya-chat-widget.noya-anim-shake:not(.is-open) .noya-dock-launcher-icon {
	animation: noya-chat-anim-shake 4.5s ease-in-out infinite;
}
.noya-chat-widget.noya-anim-shake:not(.is-open) .noya-tab-launcher {
	animation: noya-chat-anim-shake-tab 4.5s ease-in-out infinite;
}

/* =====================================================================
   حالت موبایل: تمام‌صفحه برای هر سه مدل (پایدارترین رفتار ریسپانسیو)
   ===================================================================== */
@media (max-width: 640px) {
	.noya-bubble-panel,
	.noya-tab-panel,
	.noya-dock-panel,
	.noya-chat-widget.noya-chat-right .noya-bubble-panel,
	.noya-chat-widget.noya-chat-left .noya-bubble-panel,
	.noya-chat-widget.noya-model-side_tab.noya-chat-right .noya-tab-panel,
	.noya-chat-widget.noya-model-side_tab.noya-chat-left .noya-tab-panel,
	.noya-model-bottom_dock.noya-chat-right .noya-dock-panel,
	.noya-model-bottom_dock.noya-chat-left .noya-dock-panel {
		position: fixed !important;
		inset: 0 !important;
		top: env(safe-area-inset-top) !important;
		width: 100% !important;
		max-width: 100% !important;
		height: calc(100 * var(--noya-vh) - env(safe-area-inset-top)) !important;
		border-radius: 0 !important;
		margin: 0 !important;
		right: 0 !important;
		left: 0 !important;
		bottom: 0 !important;
	}
	@supports (height: 100dvh) {
		.noya-bubble-panel, .noya-tab-panel, .noya-dock-panel {
			height: calc(100dvh - env(safe-area-inset-top)) !important;
		}
	}
	.noya-tab-panel { transform: translateX(100%); }
	.noya-chat-widget.noya-chat-left .noya-tab-panel { transform: translateX(-100%); }
	.noya-model-side_tab.is-open .noya-tab-panel { transform: translateX(0) !important; }

	.noya-dock-panel { transform: translateY(100%); }
	.noya-model-bottom_dock.is-open .noya-dock-panel { transform: translateY(0); }

	.noya-chat-widget .noya-tab-launcher { padding: 15px 9px; }
	.noya-chat-widget .noya-dock-launcher { margin: 0 10px max(10px, env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
	.noya-chat-bubble { max-width: 88%; }
}

/* =====================================================================
   تم Claymorphism — پوشش کامل اجزا. برخلاف تم‌های دیگر (که فقط چند
   متغیر رنگی را عوض می‌کنند)، این تم فنی متفاوت برای عمق‌نمایی دارد:
   بدون گرادیان/border؛ عمق فقط از سایه‌ی دوطرفه (یک سایه‌ی روشن برای
   نور، و یک سایه‌ی تیره‌تر در جهت مخالف) ساخته می‌شود.
   ===================================================================== */
.noya-theme-claymorphism .noya-chat-header {
	background: var(--noya-bg) !important;
	box-shadow: inset 0 -2px 6px var(--noya-clay-dark);
}
.noya-theme-claymorphism .noya-chat-header-info strong,
.noya-theme-claymorphism .noya-chat-status { color: var(--noya-text); }
.noya-theme-claymorphism .noya-chat-avatar-fallback,
.noya-theme-claymorphism .noya-chat-avatar { background: var(--noya-chat-color) !important; }

.noya-chat-widget.noya-theme-claymorphism .noya-chat-close {
	background: var(--noya-bg-soft) !important;
	color: var(--noya-text-soft);
	box-shadow: 3px 3px 6px var(--noya-clay-dark), -3px -3px 6px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-close:hover {
	box-shadow: inset 2px 2px 4px var(--noya-clay-dark), inset -2px -2px 4px var(--noya-clay-light) !important;
}

.noya-theme-claymorphism .noya-bubble-panel,
.noya-theme-claymorphism .noya-tab-panel,
.noya-theme-claymorphism .noya-dock-panel { border: none; }

.noya-theme-claymorphism .noya-chat-bubble-assistant {
	background: var(--noya-bg) !important;
	border: none !important;
	box-shadow: 4px 4px 10px var(--noya-clay-dark), -4px -4px 10px var(--noya-clay-light);
}
.noya-theme-claymorphism .noya-chat-bubble-user {
	background: var(--noya-chat-color) !important;
	box-shadow: 4px 4px 10px rgba(79, 70, 229, .35), -2px -2px 8px rgba(255, 255, 255, .25);
}

.noya-chat-widget.noya-theme-claymorphism .noya-chat-quickreply {
	background: var(--noya-bg) !important;
	border: none !important;
	box-shadow: 3px 3px 7px var(--noya-clay-dark), -3px -3px 7px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-quickreply:hover {
	background: var(--noya-chat-color) !important;
	box-shadow: inset 2px 2px 4px rgba(0, 0, 0, .25) !important;
}

.noya-theme-claymorphism .noya-chat-product {
	border: none !important;
	box-shadow: 4px 4px 10px var(--noya-clay-dark), -4px -4px 10px var(--noya-clay-light);
}
.noya-theme-claymorphism .noya-chat-product:hover {
	box-shadow: inset 2px 2px 6px var(--noya-clay-dark), inset -2px -2px 6px var(--noya-clay-light);
	transform: none;
}

.noya-theme-claymorphism .noya-chat-checkout {
	background: var(--noya-chat-color) !important;
	box-shadow: 6px 6px 16px rgba(79, 70, 229, .4), -3px -3px 12px rgba(255, 255, 255, .2) !important;
}

.noya-theme-claymorphism .noya-chat-consent {
	border: none !important;
	background: var(--noya-bg) !important;
	box-shadow: inset 3px 3px 7px var(--noya-clay-dark), inset -3px -3px 7px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-consent-input {
	border: none !important;
	background: var(--noya-bg-soft) !important;
	box-shadow: inset 2px 2px 5px var(--noya-clay-dark), inset -2px -2px 5px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-consent-submit {
	background: var(--noya-chat-color) !important;
	box-shadow: 3px 3px 8px rgba(79, 70, 229, .4) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-consent-skip {
	background: var(--noya-bg-soft) !important;
	box-shadow: 3px 3px 7px var(--noya-clay-dark), -3px -3px 7px var(--noya-clay-light) !important;
}

.noya-theme-claymorphism .noya-chat-inputbar { background: var(--noya-bg) !important; border-top: none !important; box-shadow: inset 0 2px 6px var(--noya-clay-dark); }
.noya-chat-widget.noya-theme-claymorphism .noya-chat-input {
	border: none !important;
	background: var(--noya-bg-soft) !important;
	box-shadow: inset 3px 3px 6px var(--noya-clay-dark), inset -3px -3px 6px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-input:focus {
	background: var(--noya-bg-soft) !important;
	box-shadow: inset 3px 3px 6px var(--noya-clay-dark), inset -3px -3px 6px var(--noya-clay-light), 0 0 0 3px rgba(79, 70, 229, .18) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-send {
	background: var(--noya-chat-color) !important;
	box-shadow: 4px 4px 10px rgba(79, 70, 229, .45), -2px -2px 8px rgba(255, 255, 255, .4) !important;
}
.noya-chat-widget.noya-theme-claymorphism .noya-chat-send:active:not(:disabled) {
	box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .3) !important;
}

/* دکمه‌های شناور: بدون گرادیان، پس‌زمینه‌ی نرم هم‌رنگ پنل + سایه‌ی دوطرفه‌ی برجسته. */
.noya-chat-widget.noya-theme-claymorphism .noya-bubble-launcher {
	background: var(--noya-bg) !important;
	box-shadow: 8px 8px 18px var(--noya-clay-dark), -8px -8px 18px var(--noya-clay-light) !important;
}
.noya-theme-claymorphism .noya-bubble-launcher-icon { filter: none; }
.noya-chat-widget.noya-theme-claymorphism .noya-bubble-launcher:hover {
	box-shadow: 10px 10px 22px var(--noya-clay-dark), -10px -10px 22px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism.noya-model-bubble.is-open .noya-bubble-launcher {
	box-shadow: inset 4px 4px 8px var(--noya-clay-dark), inset -4px -4px 8px var(--noya-clay-light) !important;
}

.noya-chat-widget.noya-theme-claymorphism .noya-tab-launcher {
	background: var(--noya-bg) !important;
	color: var(--noya-chat-color);
	box-shadow: -6px 6px 18px var(--noya-clay-dark), 6px -6px 18px var(--noya-clay-light) !important;
}
.noya-chat-widget.noya-theme-claymorphism.noya-model-side_tab.noya-chat-left .noya-tab-launcher {
	box-shadow: 6px 6px 18px var(--noya-clay-dark), -6px -6px 18px var(--noya-clay-light) !important;
}

.noya-chat-widget.noya-theme-claymorphism .noya-dock-launcher {
	background: var(--noya-bg) !important;
	border: none !important;
	box-shadow: 7px 7px 16px var(--noya-clay-dark), -7px -7px 16px var(--noya-clay-light) !important;
}
.noya-theme-claymorphism .noya-dock-launcher-icon {
	background: var(--noya-chat-color) !important;
	box-shadow: 2px 2px 6px rgba(79, 70, 229, .4);
}
.noya-theme-claymorphism .noya-dock-launcher-text { color: var(--noya-text); }
