/* ================================================================ دکمه تماس شناور و چت آنلاین */
.uz-fab { position: fixed; left: 18px; bottom: 18px; z-index: 125; font-family: inherit; }
.uz-fab [hidden] { display: none !important; }
.uz-fab__btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--gold, #d6a54e); color: var(--green-950, #0b201b); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 28px rgba(11, 32, 27, .35); transition: transform .2s, box-shadow .2s; }
.uz-fab__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(11, 32, 27, .4); }
.uz-fab__btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(214, 165, 78, .55); animation: uz-fab-pulse 2.6s infinite; pointer-events: none; }
.uz-fab.is-open .uz-fab__btn::before { animation: none; }
@keyframes uz-fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(214, 165, 78, .5); } 70% { box-shadow: 0 0 0 14px rgba(214, 165, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(214, 165, 78, 0); } }
.uz-fab__ico svg { width: 26px; height: 26px; display: block; }
.uz-fab__badge { position: absolute; top: -4px; left: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #d93025; color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.uz-fab__panel { position: absolute; left: 0; bottom: 70px; display: flex; flex-direction: column; width: 370px; height: min(600px, calc(100vh - 110px)); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(11, 32, 27, .35); animation: uz-fab-in .2s ease-out; }
@keyframes uz-fab-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.uz-fab__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: linear-gradient(135deg, #0f2d27, #1d4a3f); color: #fff; }
.uz-fab__avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--gold, #d6a54e); color: #0b201b; }
.uz-fab__avatar svg { width: 22px; height: 22px; }
.uz-fab__who { flex: 1; display: grid; gap: 2px; min-width: 0; }
.uz-fab__who b { font-size: 14.5px; }
.uz-fab__status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, .75); }
.uz-fab__status em { font-style: normal; }
.uz-fab__status i { width: 8px; height: 8px; border-radius: 50%; background: #b9c3be; }
.uz-fab__status.is-on i { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
.uz-fab__x { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.uz-fab__x svg { width: 18px; height: 18px; }
.uz-fab__quick { display: grid; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #eceee9; background: #f8f9f6; }
.uz-fab__call { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #e5e8e2; color: inherit; text-decoration: none; }
.uz-fab__call:hover { border-color: var(--gold, #d6a54e); }
.uz-fab__call > svg { width: 20px; height: 20px; color: var(--gold, #d6a54e); flex: none; }
.uz-fab__call span { flex: 1; display: grid; line-height: 1.35; }
.uz-fab__call b { font-size: 14.5px; color: #0f2d27; text-align: right; }
.uz-fab__call small { font-size: 11.5px; color: #66716c; }
.uz-fab__call em { font-style: normal; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: #0f2d27; color: #fff; }
.uz-fab__soc { display: flex; gap: 6px; }
.uz-fab__soc a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; border-radius: 10px; border: 1px solid #e5e8e2; background: #fff; color: #0f2d27; font-size: 13px; font-weight: 700; text-decoration: none; }
.uz-fab__soc svg { width: 17px; height: 17px; }
.uz-fab__chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.uz-fab__msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fbfbf9; overscroll-behavior: contain; }
.uz-fab__hello, .uz-fab__m.is-s { align-self: center; max-width: 92%; padding: 8px 12px; border-radius: 12px; background: #eef2ee; color: #3d4944; font-size: 12.5px; line-height: 1.8; text-align: center; }
.uz-fab__m { max-width: 82%; }
.uz-fab__m p { margin: 0; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.8; overflow-wrap: anywhere; }
.uz-fab__m time { display: block; margin-top: 2px; font-size: 10.5px; color: #8a938f; }
.uz-fab__m.is-u { align-self: flex-start; }
.uz-fab__m.is-u p { background: var(--gold, #d6a54e); color: #0b201b; border-bottom-right-radius: 4px; }
.uz-fab__m.is-a { align-self: flex-end; }
.uz-fab__m.is-a p { background: #fff; border: 1px solid #e5e8e2; color: #1c2723; border-bottom-left-radius: 4px; }
.uz-fab__m.is-a time { text-align: left; }
.uz-fab__m.is-s p { padding: 0; background: none; font-size: 12.5px; }
.uz-fab__form { padding: 10px; border-top: 1px solid #eceee9; background: #fff; display: grid; gap: 6px; }
.uz-fab__form.is-busy { opacity: .6; pointer-events: none; }
.uz-fab__who-in { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.uz-fab__form input, .uz-fab__form textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1.5px solid #e2e5df; border-radius: 10px; background: #fbfbf9; font: inherit; font-size: 14px; color: #1c2723; box-sizing: border-box; }
.uz-fab__form input:focus, .uz-fab__form textarea:focus { outline: none; border-color: var(--gold, #d6a54e); background: #fff; }
.uz-fab__send { display: flex; gap: 6px; align-items: flex-end; }
.uz-fab__send textarea { resize: none; max-height: 110px; line-height: 1.6; }
.uz-fab__send button { flex: none; display: grid; place-items: center; width: 44px; height: 42px; border: 0; border-radius: 12px; background: #0f2d27; color: #fff; cursor: pointer; }
.uz-fab__send button svg { width: 20px; height: 20px; transform: scaleX(-1); }
.uz-fab__err { margin: 0; font-size: 12.5px; color: #b3261e; }
.uz-fab .uz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 600px) {
	.uz-fab { left: 12px; bottom: 12px; }
	.uz-fab__btn { width: 56px; padding: 0; justify-content: center; }
	.uz-fab__lbl { display: none; }
	.uz-fab__panel { position: fixed; left: 8px; right: 8px; bottom: 78px; width: auto; height: min(78vh, 620px); }
	.uz-fab__form input, .uz-fab__form textarea { font-size: 16px; }
}
/* ویرایشگر طراحی: در گوشی جای نوار ابزار است؛ در کامپیوتر کنار پنل */
@media (max-width: 900px), (orientation: landscape) and (max-height: 520px) { body.uz-designer-page .uz-fab { display: none; } }
/* میز طراحی کامپیوتر: فقط آیکون، گوشه پایین میز (کنار پنل مشخصات) */
@media (min-width: 901px) and (min-height: 521px) {
	body.uz-designer-page .uz-fab { left: 346px; bottom: 14px; z-index: 160; }
	body.uz-designer-page .uz-fab__btn { width: 48px; height: 48px; padding: 0; justify-content: center; }
	body.uz-designer-page .uz-fab__lbl { display: none; }
	body.uz-designer-page .uz-fab__btn::before { animation: none; }
}

/* ================================================================ پیشخوان */
.uz-cha__lead { max-width: 900px; color: #50575e; }
.uz-cha__grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; margin-top: 12px; height: calc(100vh - 230px); min-height: 460px; }
.uz-cha__list { overflow-y: auto; border: 1px solid #dcdcde; border-radius: 10px; background: #fff; }
.uz-cha__empty { padding: 16px; color: #646970; line-height: 1.9; }
.uz-cha__item { position: relative; display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #f0f0f1; background: #fff; text-align: right; font: inherit; cursor: pointer; }
.uz-cha__item:hover { background: #f6f7f7; }
.uz-cha__item.is-on { background: #f0f6fc; box-shadow: inset 3px 0 0 #2271b1; }
.uz-cha__item b { font-size: 13.5px; }
.uz-cha__item small { color: #50575e; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uz-cha__item time { color: #8c8f94; font-size: 11px; }
.uz-cha__item em { position: absolute; left: 10px; top: 10px; min-width: 20px; height: 20px; border-radius: 10px; background: #d63638; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.uz-cha__item.is-new b { color: #135e96; }
.uz-cha__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #00a32a; }
.uz-cha__thread { display: flex; flex-direction: column; min-height: 0; border: 1px solid #dcdcde; border-radius: 10px; background: #fff; overflow: hidden; }
.uz-cha__top { padding: 12px 14px; border-bottom: 1px solid #f0f0f1; font-size: 13px; line-height: 1.9; }
.uz-cha__live { color: #00a32a; font-weight: 600; }
.uz-cha__off, .uz-cha__sms { color: #8a6d00; }
.uz-cha__sms { color: #00a32a; }
.uz-cha__del { color: #b32d2e !important; margin-right: 8px; }
.uz-cha__msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f6f7f7; }
.uz-cha__m { max-width: 70%; }
.uz-cha__m p { margin: 0; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.8; overflow-wrap: anywhere; }
.uz-cha__m time { font-size: 10.5px; color: #8c8f94; }
.uz-cha__m.is-u { align-self: flex-start; }
.uz-cha__m.is-u p { background: #fff; border: 1px solid #dcdcde; }
.uz-cha__m.is-a { align-self: flex-end; }
.uz-cha__m.is-a p { background: #2271b1; color: #fff; }
.uz-cha__m.is-a time { display: block; text-align: left; }
.uz-cha__m.is-s { align-self: center; max-width: 85%; }
.uz-cha__m.is-s p { background: #fcf9e8; color: #646970; font-size: 12px; text-align: center; }
.uz-cha__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #f0f0f1; }
.uz-cha__form textarea { flex: 1; resize: vertical; min-height: 44px; }
@media (max-width: 782px) { .uz-cha__grid { grid-template-columns: 1fr; height: auto; } .uz-cha__list { max-height: 240px; } .uz-cha__thread { height: 70vh; } }
.uz-fab__m.is-pending p { opacity: .7; }
.uz-fab__m.is-failed p { background: #fde5e3; color: #8a1f17; }
.uz-fab__retry { border: 0; background: none; color: #b3261e; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 0; }
.uz-fab__note { align-self: center; max-width: 92%; font-size: 11.5px; color: #66716c; text-align: center; line-height: 1.8; }

/* وقتی منوی «بیشتر» طراحی باز است، دکمه چت رویش نیفتد */
body.uz-designer-page:has(#dz-more:not([hidden])) .uz-fab { display: none; }
