/* =========================================================================
   ویجت شناور پشتیبانی شاورمو — روی صفحات معمولی سایت (تم روشن برند)
   ========================================================================= */

#shvai-widget-root { position: fixed; bottom: 22px; left: 22px; z-index: 99990; font-family: sc_iranyekan, 'IRANYekan', Vazirmatn, Tahoma, sans-serif; }
/* فونت فارسی روی همه فرزندان ویجت — گزینه‌های select در ویندوز فونت والد را نمی‌گیرند (مورد ۱۳) */
#shvai-widget-root input, #shvai-widget-root select, #shvai-widget-root textarea,
#shvai-widget-root button, #shvai-widget-root option {
	font-family: sc_iranyekan, 'IRANYekan', Vazirmatn, Tahoma, sans-serif;
}
/* اسکرول‌بار باریک و یکدست داخل ویجت (مورد ۵) */
#shvai-widget-root * { scrollbar-width: thin; scrollbar-color: #c4c7e0 transparent; }
#shvai-widget-root ::-webkit-scrollbar { width: 6px; height: 6px; }
#shvai-widget-root ::-webkit-scrollbar-track { background: transparent; }
#shvai-widget-root ::-webkit-scrollbar-thumb { background: #c4c7e0; border-radius: 999px; }
#shvai-widget-root ::-webkit-scrollbar-thumb:hover { background: #8a88a8; }

.shvw-fab {
	width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
	background: linear-gradient(135deg, #302076, #4b3ab8);
	color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 26px rgba(48, 32, 118, .45);
	transition: transform .2s cubic-bezier(.22,.8,.36,1), box-shadow .2s;
	position: relative;
}
.shvw-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 32px rgba(48, 32, 118, .55); }
.shvw-fab .shvw-dot {
	position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%;
	background: #d3122c; border: 2px solid #fff; display: none;
}
.shvw-fab.has-unread .shvw-dot { display: block; }

.shvw-panel {
	position: absolute; bottom: 72px; left: 0; width: 350px; max-width: calc(100vw - 44px);
	background: #fff; border-radius: 18px; overflow: hidden;
	box-shadow: 0 18px 60px rgba(28, 26, 61, .3);
	border: 1px solid #e8eaf5;
	display: none; flex-direction: column;
	animation: shvw-in .22s cubic-bezier(.22,.8,.36,1);
}
.shvw-panel.open { display: flex; }
@keyframes shvw-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.shvw-head {
	background: linear-gradient(135deg, #302076, #4b3ab8);
	color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 11px;
}
.shvw-head .h-ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; flex: 0 0 38px; }
.shvw-head b { font-size: 14.5px; display: block; }
.shvw-head span { font-size: 11.5px; opacity: .8; }

.shvw-tabs { display: flex; border-bottom: 1px solid #e8eaf5; background: #f7f8fd; }
.shvw-tab {
	flex: 1; padding: 10px 4px; background: transparent; border: 0; cursor: pointer;
	font-family: inherit; font-size: 12.5px; font-weight: 700; color: #56547a;
	border-bottom: 2px solid transparent; transition: all .18s;
}
.shvw-tab.on { color: #302076; border-bottom-color: #302076; background: #fff; }

.shvw-body { height: 320px; overflow-y: auto; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 9px; }
.shvw-msg { max-width: 85%; padding: 9px 13px; border-radius: 13px; font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; }
.shvw-msg.user { align-self: flex-start; background: #302076; color: #fff; border-bottom-right-radius: 4px; }
.shvw-msg.ai, .shvw-msg.admin { align-self: flex-end; background: #f0f1fa; color: #1c1a3d; border-bottom-left-radius: 4px; }

.shvw-foot { display: flex; gap: 7px; padding: 11px; border-top: 1px solid #e8eaf5; background: #fff; }
.shvw-foot textarea {
	flex: 1; border: 1px solid #d9dcee; border-radius: 11px; padding: 8px 12px;
	font-family: inherit; font-size: 12.5px; resize: none; height: 40px; line-height: 1.7; color: #1c1a3d;
	/* بدون اسکرول‌بار داخل باکس «سوال خود را بنویسید» (مورد ۱۲) */
	overflow: hidden; scrollbar-width: none;
}
.shvw-foot textarea::-webkit-scrollbar { display: none; }
.shvw-foot textarea:focus { outline: none; border-color: #302076; }
.shvw-foot button {
	background: #302076; color: #fff; border: 0; border-radius: 11px; width: 42px; cursor: pointer;
	display: flex; align-items: center; justify-content: center; transition: opacity .18s;
}
.shvw-foot button:disabled { opacity: .5; }

/* فرم تیکت داخل ویجت */
.shvw-form { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.shvw-form input, .shvw-form select, .shvw-form textarea {
	border: 1px solid #d9dcee; border-radius: 10px; padding: 8px 12px;
	font-family: inherit; font-size: 12.5px; color: #1c1a3d; width: 100%;
}
.shvw-form textarea { min-height: 80px; resize: vertical; }
.shvw-form input:focus, .shvw-form select:focus, .shvw-form textarea:focus { outline: none; border-color: #302076; }
.shvw-form .f-send {
	background: #302076; color: #fff; border: 0; border-radius: 10px; padding: 10px;
	font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.shvw-form .f-ok { background: #e6f8ee; color: #14804a; border-radius: 10px; padding: 10px 13px; font-size: 12.5px; }
.shvw-link { display: block; text-align: center; padding: 9px; font-size: 12px; color: #302076 !important; font-weight: 700; border-top: 1px solid #e8eaf5; background: #f7f8fd; text-decoration: none !important; }
.shvw-link:hover { background: #eeecf8; }

/* بج منو */
.shv-menu-badge {
	display: inline-block; background: linear-gradient(135deg, #02bbdc, #0795b0); color: #fff !important;
	font-size: 9.5px; font-weight: 800; border-radius: 6px; padding: 1px 6px; margin-right: 4px; vertical-align: 3px;
}

@media (max-width: 480px) {
	#shvai-widget-root { bottom: 14px; left: 14px; }
	.shvw-panel { width: calc(100vw - 28px); }
}
@media print { #shvai-widget-root { display: none !important; } }
