/* ==================== ریست قوی برای خنثی کردن استایل سراسری المنتور (رنگ بنفش ناخواسته دکمه‌ها) ==================== */

#mychat-app button,
#mychat-header-menu button,
#mychat-msg-menu button,
#mychat-forward-modal button,
#mychat-forward-close,
#mychat-share-modal button,
#mychat-image-viewer button,
#mychat-back-btn,
.mychat-start-btn {
	all: unset !important;
	box-sizing: border-box !important;
	cursor: pointer !important;
	font-family: inherit !important;
}

#mychat-app,
#mychat-app * {
	box-sizing: border-box;
}

/* ==================== ساختار کلی ==================== */
#mychat-app {
	display: flex;
	height: 600px;
	max-width: 900px;
	margin: 0;
	border: none;
	border-radius: 0;
	overflow: hidden;
	font-family: inherit;
	direction: rtl;
	background: #ffffff;
}

#mychat-sidebar {
	width: 340px;
	border-left: none;
	overflow-y: auto;
	overflow-x: hidden;
	background: #ffffff;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
#mychat-sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }

#mychat-sidebar-title {
	padding: 16px 18px;
	font-weight: 700;
	font-size: 17px;
	border-bottom: 1px solid #f0f0f0;
}

/* ==================== ردیف‌های لیست مکالمات (سبک HelloTalk) ==================== */
.mychat-conv-item {
	display: flex;
	align-items: center;
	padding: 12px 18px;
	cursor: pointer;
	gap: 12px;
	position: relative;
	border-bottom: 1px solid #f4f4f4;
}

.mychat-conv-item:hover,
.mychat-conv-item.active {
	background: #fafafa;
}

.mychat-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

/* دایره‌ای بودن آواتارها را با !important تضمین می‌کنیم تا هیچ استایل سراسری تم/المنتور آن را override نکند */
.mychat-avatar,
.mychat-msg-avatar,
#mychat-header-avatar {
	border-radius: 50% !important;
	overflow: hidden !important;
	object-fit: cover !important;
	display: block !important;
	/* بعضی قالب‌ها/المنتور روی img قانون height:auto (برای ریسپانسیو بودن) می‌گذارند که باعث می‌شود
	   ارتفاع آواتار متناسب با نسبت ابعاد عکس اصلی تغییر کند و دایره را به شکل تخم‌مرغی دربیاورد.
	   با قفل‌کردن width/height با !important این مشکل کاملا برطرف می‌شود. */
	max-width: none !important;
	flex-shrink: 0 !important;
}

.mychat-avatar {
	width: 54px !important;
	height: 54px !important;
	background: #e2e2e2;
}

#mychat-header-avatar {
	width: 38px !important;
	height: 38px !important;
}

.mychat-status-dot {
	position: absolute;
	bottom: 1px;
	left: 1px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: #bdbdbd;
}

.mychat-status-dot.online {
	background: #31c76b;
}

.mychat-conv-info {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	flex: 1;
	gap: 2px;
}

.mychat-conv-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
}

.mychat-conv-top strong {
	font-size: 14.5px;
	font-weight: 800 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mychat-conv-time {
	font-size: 11px;
	color: #999;
	flex-shrink: 0;
}

.mychat-last-msg {
	font-size: 12.5px;
	color: #8e8e8e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mychat-lastseen-text {
	font-size: 11px;
	color: #b3b3b3;
}

.mychat-lastseen-text.is-online {
	color: #31c76b;
}

.mychat-badge {
	position: absolute;
	left: 16px;
	top: 14px;
	background: #ff3040;
	color: #fff;
	font-size: 13px;
	font-weight: 800 !important;
	border-radius: 50%;
	min-width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 6px;
}

/* ==================== پنجره چت ==================== */
#mychat-window {
	flex: 1;
	min-height: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	overflow: hidden;
}

#mychat-chat-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	position: relative;
}

#mychat-back-btn {
	display: none;
	align-items: center;
	justify-content: center;
	padding: 4px !important;
}

#mychat-header-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#mychat-header-name {
	font-weight: 800 !important;
	font-size: 14.5px;
}

#mychat-header-lastseen {
	font-size: 11.5px;
	color: #999;
}

#mychat-header-lastseen.is-online {
	color: #31c76b;
}

#mychat-header-menu-btn {
	font-size: 24px !important;
	line-height: 1 !important;
	color: #444 !important;
	padding: 0 6px !important;
}

#mychat-header-menu {
	display: none;
	position: absolute;
	left: 10px;
	top: 46px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	z-index: 20;
	min-width: 180px;
	overflow: hidden;
}

#mychat-header-menu button {
	display: block !important;
	width: 100% !important;
	text-align: right !important;
	padding: 10px 14px !important;
	font-size: 13px !important;
	color: #222 !important;
}

#mychat-header-menu button:hover {
	background: #fafafa !important;
}

/* ==================== پیام‌ها ==================== */
#mychat-messages {
	flex: 1;
	min-height: 0;
	min-width: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #ffffff;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
#mychat-messages::-webkit-scrollbar { display: none; width: 0; height: 0; }

.mychat-empty-hint {
	text-align: center;
	color: #999;
	margin-top: 40px;
	font-size: 13px;
}

.mychat-msg-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	max-width: 78%;
	transition: transform 0.05s linear;
}

.mychat-msg-row.mine {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.mychat-msg-row.theirs {
	align-self: flex-start;
}

.mychat-msg-avatar {
	width: 28px !important;
	height: 28px !important;
	flex-shrink: 0;
	background: #e2e2e2;
}

.mychat-msg {
	padding: 11px 15px;
	border-radius: 18px;
	font-size: 15px;
	font-weight: 700 !important;
	line-height: 1.6;
	word-break: break-word;
}

.mychat-msg-row.mine .mychat-msg {
	background: #ECE6FB;
	color: #2d2140;
	border-bottom-left-radius: 4px;
}

.mychat-msg-row.theirs .mychat-msg {
	background: #f1f1f1;
	color: #1c1c1c;
	border-bottom-right-radius: 4px;
}

.mychat-msg.deleted {
	background: transparent !important;
	border: 1px dashed #ccc;
	color: #999 !important;
	font-style: italic;
	font-size: 12px;
}

.mychat-msg-media {
	padding: 0 !important;
	background: transparent !important;
	overflow: hidden;
}

.mychat-msg-image {
	max-width: 200px;
	border-radius: 14px;
	display: block;
	cursor: zoom-in;
}

.mychat-msg-media .mychat-msg-image {
	border-radius: 16px;
}

.mychat-msg-caption {
	margin-top: 8px;
	font-size: 14px;
	font-weight: 700 !important;
	line-height: 1.6;
	white-space: pre-line;
}

.mychat-msg-voice {
	padding: 0 !important;
	background: transparent !important;
}

.mychat-reply-quote {
	border-right: 3px solid rgba(90, 60, 140, 0.35);
	padding-right: 8px;
	margin-bottom: 4px;
	font-size: 11.5px;
	opacity: 0.85;
}

.mychat-msg-row.theirs .mychat-reply-quote {
	border-right-color: #bbb;
}

.mychat-forwarded-label {
	font-size: 10.5px;
	opacity: 0.75;
	margin-bottom: 3px;
}

.mychat-msg-col {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
}

.mychat-msg-row.theirs .mychat-msg-col {
	align-items: flex-start;
}

.mychat-msg-meta {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 4px;
}

.mychat-msg-time {
	font-size: 10.5px;
	color: #b5b5b5;
}

.mychat-ticks {
	display: inline-flex;
	color: #b0b0b0;
}

.mychat-ticks.delivered {
	color: #9e9e9e;
}

.mychat-ticks.read {
	color: #6c4fd6;
}

.mychat-ticks-label {
	font-size: 10.5px;
	color: #999;
}

/* ==================== پخش‌کننده صوتی سفارشی (سبک واتساپ / ساندکلاود) ==================== */
.mychat-voice-player {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 13px;
	min-width: 210px;
	max-width: 240px;
	background: #ECE6FB;
	border-radius: 18px;
}

.mychat-msg-row.theirs .mychat-voice-player {
	background: #f1f1f1;
}

.mychat-voice-play-btn {
	flex-shrink: 0 !important;
	width: 34px !important;
	height: 34px !important;
	border-radius: 50% !important;
	background: #6c4fd6 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: transform 0.1s ease, background 0.15s ease;
}

.mychat-voice-play-btn:hover {
	background: #5c40c2 !important;
}

.mychat-voice-play-btn:active {
	transform: scale(0.93);
}

.mychat-voice-wave-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
}

.mychat-voice-wave-canvas {
	width: 100%;
	height: 32px;
	display: block;
}

.mychat-voice-duration {
	font-size: 10.5px;
	color: #6b6b78;
	font-variant-numeric: tabular-nums;
	min-width: 30px;
	text-align: left;
	direction: ltr;
	flex-shrink: 0;
}

.mychat-voice-speed {
	font-size: 10.5px;
	font-weight: 700;
	color: #6c4fd6;
	background: rgba(108, 79, 214, 0.12);
	border-radius: 8px;
	padding: 2px 6px;
	cursor: pointer;
	flex-shrink: 0;
	user-select: none;
}

.mychat-msg-row.theirs .mychat-voice-speed {
	color: #555;
	background: rgba(0, 0, 0, 0.06);
}

/* ==================== بزرگ‌نمایی عکس ==================== */
#mychat-image-viewer {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999998;
}

#mychat-image-viewer-img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 8px;
}

#mychat-image-viewer-close {
	position: absolute !important;
	top: 18px !important;
	left: 18px !important;
	background: rgba(255, 255, 255, 0.15) !important;
	color: #fff !important;
	width: 38px !important;
	height: 38px !important;
	border-radius: 50% !important;
	font-size: 18px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* ==================== پاسخ / تایپینگ / ورودی ==================== */
#mychat-reply-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 14px;
	background: #f7f5fc;
	border-top: 1px solid #f0f0f0;
	font-size: 12px;
	color: #444;
}

#mychat-reply-cancel {
	font-size: 14px !important;
	color: #888 !important;
}

#mychat-typing-indicator {
	padding: 0 16px 4px;
	font-size: 12px;
	color: #8e8e8e;
	display: none;
	font-style: italic;
}

#mychat-input-area {
	display: none;
	flex-direction: column;
	gap: 6px;
	padding: 8px 14px 12px;
	border-top: 1px solid #f0f0f0;
	background: #ffffff;
}

#mychat-input-area.active {
	display: flex;
}

#mychat-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

#mychat-input-toolbar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 2px 4px 0;
}

#mychat-input-field-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

#mychat-text-input {
	width: 100%;
	border: 1px solid #e2e2e2;
	border-radius: 22px;
	padding: 9px 16px;
	outline: none;
	font-size: 13.5px;
	font-weight: 600 !important;
	background: #fafafa;
	transition: border-color 0.15s ease;
}

#mychat-text-input:focus {
	border-color: #b0a0e0;
	background: #fff;
}

/* ==================== نوار ضبط زنده صدا داخل همان فیلد نوشتن (سبک واتساپ) ==================== */
#mychat-recording-ui {
	display: none;
	align-items: center;
	gap: 10px;
	width: 100%;
	border: 1px solid #f0c9c9;
	border-radius: 22px;
	padding: 7px 14px;
	background: linear-gradient(0deg, #fff6f6, #fffafa);
}

#mychat-input-area.mychat-recording #mychat-text-input {
	display: none;
}

#mychat-input-area.mychat-recording #mychat-recording-ui {
	display: flex;
}

#mychat-record-cancel {
	flex-shrink: 0 !important;
	width: 26px !important;
	height: 26px !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background 0.15s ease;
}

#mychat-record-cancel:hover {
	background: rgba(208, 47, 47, 0.1) !important;
}

#mychat-record-dot {
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #e0245e;
	animation: mychat-record-pulse 1.1s ease-in-out infinite;
}

@keyframes mychat-record-pulse {
	0%   { transform: scale(1);    opacity: 1; }
	50%  { transform: scale(1.35); opacity: 0.45; }
	100% { transform: scale(1);    opacity: 1; }
}

#mychat-record-timer {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 700;
	color: #444;
	font-variant-numeric: tabular-nums;
	min-width: 38px;
}

#mychat-record-wave {
	flex: 1;
	min-width: 0;
	height: 26px;
}

#mychat-send-btn,
#mychat-attach-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 4px !important;
}

#mychat-send-btn:hover,
#mychat-attach-btn:hover {
	opacity: 0.7;
}

.mychat-start-btn {
	display: inline-block !important;
	background: #6c4fd6 !important;
	color: #fff !important;
	border-radius: 10px !important;
	padding: 10px 20px !important;
	font-size: 15px !important;
	text-align: center !important;
}

/* ==================== پنل شکلک ==================== */
#mychat-emoji-panel {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 4px;
	max-height: 190px;
	overflow-y: auto;
	padding: 10px 8px;
	background: #fafafa;
	border: 1px solid #f0f0f0;
	border-radius: 12px;
	scrollbar-width: thin;
	scrollbar-color: #e2e2e2 transparent;
}
#mychat-emoji-panel::-webkit-scrollbar { width: 4px; }
#mychat-emoji-panel::-webkit-scrollbar-thumb { background: #e2e2e2; border-radius: 4px; }

.mychat-emoji-item {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 21px;
	line-height: 1;
	padding: 6px 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.12s ease, transform 0.08s ease;
	user-select: none;
}

.mychat-emoji-item:hover {
	background: #eee6fb;
	transform: scale(1.12);
}

.mychat-emoji-item img.emoji,
.mychat-msg img.emoji,
.mychat-last-msg img.emoji {
	width: 1.15em;
	height: 1.15em;
	vertical-align: -0.2em;
	margin: 0 1px;
}

/* ==================== منوی کوچک روی هر پیام (سبک لیست HelloTalk) ==================== */
#mychat-msg-menu {
	position: fixed;
	display: none;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	z-index: 999997;
	bottom: 90px;
	right: 30px;
	left: 30px;
	max-width: 320px;
	margin: 0 auto;
	overflow: hidden;
}

#mychat-msg-menu button {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	padding: 14px 18px !important;
	font-size: 14.5px !important;
	font-weight: 700 !important;
	color: #111 !important;
	border-bottom: 1px solid #f0f0f0 !important;
}

#mychat-msg-menu button:last-child {
	border-bottom: none !important;
}

#mychat-msg-menu button:hover {
	background: #fafafa !important;
}

#mychat-msg-menu-delete {
	color: #d02f2f !important;
}

/* ==================== پنجره فوروارد ==================== */
#mychat-forward-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999996;
}

#mychat-forward-box {
	background: #fff;
	border-radius: 14px;
	width: 300px;
	max-height: 400px;
	overflow-y: auto;
	padding: 14px;
	direction: rtl;
}

#mychat-forward-title {
	font-weight: 700;
	margin-bottom: 10px;
	font-size: 14px;
}

.mychat-forward-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 4px;
	cursor: pointer;
	border-radius: 8px;
}

.mychat-forward-item:hover {
	background: #fafafa;
}

.mychat-forward-item .mychat-avatar {
	width: 36px !important;
	height: 36px !important;
}

#mychat-forward-close {
	display: block !important;
	width: 100% !important;
	margin-top: 10px !important;
	padding: 8px !important;
	border: 1px solid #e5e5e5 !important;
	border-radius: 8px !important;
	background: #fff !important;
	text-align: center !important;
	color: #333 !important;
}

/* ==================== حالت موبایل: رفتار شبیه اپ ==================== */
@media (max-width: 640px) {
	#mychat-app {
		flex-direction: column;
		height: calc(100vh - 56px);
		margin: 0;
	}

	#mychat-sidebar {
		width: 100%;
		flex-shrink: 0;
		border-left: none;
	}

	#mychat-window {
		display: none;
		min-height: 0;
		flex: 1;
	}

	#mychat-app.mychat-conv-open #mychat-sidebar {
		display: none;
	}

	#mychat-app.mychat-conv-open #mychat-window {
		display: flex;
	}

	#mychat-back-btn {
		display: flex !important;
	}
}

/* ==================== نوار حالت انتخاب چندتایی برای حذف مکالمات ==================== */
#mychat-select-bar {
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: #faf8ff;
	border-bottom: 1px solid #ececec;
}

#mychat-select-cancel {
	font-size: 16px !important;
	color: #555 !important;
}

#mychat-select-count {
	font-size: 13px;
	color: #444;
	font-weight: 600;
}

#mychat-select-delete {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 4px !important;
}

.mychat-conv-item.selected {
	background: #f2ecff;
}

.mychat-conv-item.selected .mychat-avatar-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid #6c4fd6;
}

/* ==================== پیام کوتاه (Toast) ==================== */
#mychat-toast {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(20, 20, 20, 0.9);
	color: #fff;
	padding: 10px 20px;
	border-radius: 30px;
	font-size: 13px;
	z-index: 999999;
	max-width: 85vw;
	text-align: center;
}


/* ================================================================
   اعداد فارسی - فقط برای نمایش
   این بخش هیچ تغییری در منطق یا ساختار چت ایجاد نمی‌کند
   ================================================================ */
#mychat-app {
	font-feature-settings: "lnum" 0;
}

/* ==================== پنجره اشتراک‌گذاری آگهی با چند کاربر (سبک تلگرام / پاپ‌آپ موبایلی) ==================== */
#mychat-share-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: none;
	align-items: flex-end;
	justify-content: center;
	z-index: 999999;
}

#mychat-share-box {
	background: #fff;
	border-radius: 20px 20px 0 0;
	width: 100%;
	max-width: 480px;
	min-height: 58vh;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	padding: 8px 16px 18px;
	direction: rtl;
	animation: mychat-sheet-up 0.25s ease;
	touch-action: none;
}

@keyframes mychat-sheet-up {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

.mychat-sheet-handle {
	width: 40px;
	height: 4px;
	border-radius: 4px;
	background: #ddd;
	margin: 6px auto 10px;
	flex-shrink: 0;
}

#mychat-share-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

#mychat-share-close {
	flex-shrink: 0 !important;
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	background: #f4f4f4 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

#mychat-share-title {
	font-weight: 800 !important;
	font-size: 15px;
	flex: 1;
}

#mychat-share-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #faf8ff;
	border-radius: 10px;
	padding: 8px;
	margin-bottom: 10px;
	font-size: 12.5px;
	font-weight: 600;
	flex-shrink: 0;
}

#mychat-share-preview img {
	width: 42px;
	height: 42px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

#mychat-share-list {
	flex: 1;
	overflow-y: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
#mychat-share-list::-webkit-scrollbar { display: none; }

.mychat-share-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 4px;
	cursor: pointer;
	border-radius: 8px;
}

.mychat-share-item:hover {
	background: #fafafa;
}

.mychat-share-item .mychat-avatar {
	width: 40px !important;
	height: 40px !important;
}

.mychat-share-item span:nth-child(2) {
	flex: 1;
	font-weight: 700;
}

.mychat-share-check {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #ddd;
	flex-shrink: 0;
}

.mychat-share-item.selected .mychat-share-check {
	background: #6c4fd6;
	border-color: #6c4fd6;
	position: relative;
}

.mychat-share-item.selected .mychat-share-check::after {
	content: "✓";
	color: #fff;
	font-size: 13px;
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

#mychat-share-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 4px 4px;
	font-size: 12.5px;
	color: #777;
	font-weight: 700;
	flex-shrink: 0;
}

#mychat-share-modal #mychat-share-send {
	background: #6c4fd6 !important;
	width: 42px !important;
	height: 42px !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
}

#mychat-share-modal #mychat-share-close {
	flex-shrink: 0 !important;
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	background: #f4f4f4 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.mychat-msg-link {
	display: block;
	color: inherit !important;
	text-decoration: none !important;
	cursor: pointer;
}

/* ==================== نشان تعداد پیام نخوانده روی آیکن چت فوتر سایت ==================== */
.mychat-footer-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	background: #ff3040;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	min-width: 17px;
	height: 17px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	line-height: 1;
	z-index: 5;
}

/* ==================== تیک آبی تایید (سبک اینستاگرام) برای کانال سیستم ==================== */
#mychat-header-name-row {
	display: flex;
	align-items: center;
	gap: 4px;
}

.mychat-verified-badge {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	transform: translateY(1px);
}

/* ==================== اسپینر لودینگ سیاه مینیمال (سبک اینستاگرام) ==================== */
.mychat-loading-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 200px;
}

.mychat-spinner {
	width: 30px;
	height: 30px;
	border: 3px solid #e5e5e5;
	border-top-color: #000;
	border-radius: 50%;
	animation: mychat-spin 0.7s linear infinite;
}

@keyframes mychat-spin {
	to { transform: rotate(360deg); }
}

/* ==================== آیکن سنجاق روی پیام‌های اطلاعیه ==================== */
.mychat-pin-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #6c4fd6;
	margin-left: 6px;
	vertical-align: middle;
}

/* ==================== سه‌نقطه متحرک «در حال نوشتن» مثل واتساپ ==================== */
.mychat-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 4px 0;
}

.mychat-typing-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #8e8e8e;
	animation: mychat-typing-bounce 1.1s infinite ease-in-out;
}

.mychat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.mychat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes mychat-typing-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* ==================== حلقه استوری‌مانند دور آواتار برای آگهی تازه (مثل اینستاگرام) ==================== */
.mychat-avatar-wrap.has-story {
	padding: 3px;
	border-radius: 50%;
	cursor: pointer;
}

.mychat-avatar-wrap.has-story.story-new {
	background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

.mychat-avatar-wrap.has-story.story-seen {
	background: #d5d5d5;
}

.mychat-avatar-wrap.has-story .mychat-avatar {
	border: 2px solid #fff !important;
}

/* ==================== ردیف اشتراک‌گذاری سریع (واتساپ/تلگرام/اشتراک/کپی) ==================== */
#mychat-quick-share-row {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	padding: 14px 4px 10px;
	flex-shrink: 0;
}

.mychat-quick-share-btn {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 5px !important;
	background: none !important;
	flex: 1;
}

.mychat-quick-circle {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mychat-quick-share-btn small {
	font-size: 10px;
	color: #555;
	font-weight: 700;
	text-align: center;
	line-height: 1.3;
}

/* ==================== طراحی جدید حلقه استوری - حلقه‌ی نقطه‌چین گرادیانت (سبک HelloTalk) - خالص CSS ==================== */
.mychat-avatar-wrap.has-story {
	position: relative;
}

.mychat-avatar-wrap.has-story::before {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	padding: 3px;
	background: repeating-conic-gradient(from 0deg, #4facfe 0deg 14deg, transparent 14deg 22deg);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	pointer-events: none;
}

.mychat-avatar-wrap.has-story.story-new::before {
	background: repeating-conic-gradient(from 0deg, #4facfe 0deg 14deg, transparent 14deg 22deg, #a855f7 22deg 36deg, transparent 36deg 44deg);
}

.mychat-avatar-wrap.has-story.story-seen::before {
	background: repeating-conic-gradient(from 0deg, #d5d5d5 0deg 14deg, transparent 14deg 22deg);
	opacity: 0.7;
}

.mychat-avatar-wrap.has-story .mychat-avatar {
	border: 2px solid #fff !important;
}

/* ==================== وضعیت متنی رنگی (مثل واتساپ) ==================== */
#mychat-my-status {
	display: none;
	align-items: center;
	justify-content: space-between;
	margin: 10px 14px;
	padding: 12px 16px;
	border-radius: 12px;
	cursor: pointer;
	font-weight: 700;
	font-size: 13px;
	color: #fff;
}

.mychat-my-status-edit {
	font-size: 11px;
	opacity: 0.85;
	background: rgba(255, 255, 255, 0.25);
	padding: 3px 10px;
	border-radius: 10px;
}

.mychat-status-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	cursor: pointer;
}

.mychat-status-badge.seen {
	opacity: 0.55;
	filter: grayscale(60%);
}

#mychat-status-viewer {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	cursor: pointer;
}

.mychat-status-viewer-text {
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	text-align: center;
	max-width: 80%;
	line-height: 1.7;
}

/* ==================== دایره «وضعیت شما» بالای لیست (سبک اینستاگرام) ==================== */
#mychat-my-status-row {
	padding: 12px 16px 6px;
	border-bottom: 1px solid #f4f4f4;
}

#mychat-my-status {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: fit-content;
	cursor: pointer;
}

#mychat-my-status .mychat-avatar {
	width: 58px !important;
	height: 58px !important;
}

.mychat-my-status-plus {
	position: absolute;
	bottom: -2px;
	left: -2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #0095f6;
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
}

#mychat-my-status.has-own-status .mychat-avatar-wrap {
	padding: 2px;
	border-radius: 50%;
	background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

#mychat-my-status.has-own-status .mychat-my-status-plus {
	background: #6c4fd6;
	content: "";
}

.mychat-my-status-label {
	font-size: 11px;
	font-weight: 700;
	color: #444;
}

/* حلقه‌ی رنگی دور آواتار کاربرانی که وضعیت متنی فعال دارند */
.mychat-avatar-wrap.has-status {
	padding: 2px;
	border-radius: 50%;
	cursor: pointer;
}
.mychat-avatar-wrap.has-status.status-new {
	background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}
.mychat-avatar-wrap.has-status.status-seen {
	background: #d5d5d5;
}
.mychat-avatar-wrap.has-status .mychat-avatar {
	border: 2px solid #fff !important;
}

/* ==================== پاپ‌آپ نوشتن وضعیت جدید ==================== */
#mychat-status-compose {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999999;
}

#mychat-status-compose-box {
	position: relative;
	width: 300px;
	height: 420px;
	max-width: 90vw;
	border-radius: 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

#mychat-status-compose-close {
	position: absolute !important;
	top: 14px !important;
	left: 14px !important;
	background: rgba(255, 255, 255, 0.2) !important;
	width: 32px !important;
	height: 32px !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

#mychat-status-compose-text {
	width: 100%;
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	resize: none;
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	text-align: center;
	line-height: 1.6;
}

#mychat-status-compose-text::placeholder {
	color: rgba(255, 255, 255, 0.75);
}

#mychat-status-compose-send {
	position: absolute !important;
	bottom: 16px !important;
	left: 16px !important;
	width: 48px !important;
	height: 48px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.25) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* ==================== نمایشگر وضعیت با نوار پیشرفت خطی (مثل واتساپ/اینستاگرام) ==================== */
#mychat-status-viewer {
	position: fixed;
	inset: 0;
	display: none;
	flex-direction: column;
	z-index: 999999;
	user-select: none;
}

#mychat-status-segments {
	display: flex;
	gap: 4px;
	padding: 10px 10px 0;
	flex-shrink: 0;
}

.mychat-story-segment {
	flex: 1;
	height: 3px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.35);
	overflow: hidden;
}

.mychat-story-segment-fill {
	height: 100%;
	width: 0%;
	background: #fff;
}

.mychat-story-segment.done .mychat-story-segment-fill {
	width: 100%;
	animation: none !important;
}

@keyframes mychat-story-progress {
	from { width: 0%; }
	to   { width: 100%; }
}

#mychat-status-viewer-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	flex-shrink: 0;
}

#mychat-status-viewer-avatar {
	width: 34px;
	height: 34px;
	border: 2px solid #fff;
}

#mychat-status-viewer-name {
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	flex: 1;
}

#mychat-status-viewer-close {
	background: rgba(255, 255, 255, 0.2) !important;
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

#mychat-status-viewer .mychat-status-viewer-text {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	text-align: center;
	padding: 20px 30px;
	line-height: 1.7;
}

#mychat-status-zone-prev,
#mychat-status-zone-next {
	position: absolute;
	top: 60px;
	bottom: 70px;
	width: 35%;
}
#mychat-status-zone-prev { right: 0; }
#mychat-status-zone-next { left: 0; }

#mychat-status-delete-btn {
	position: absolute !important;
	bottom: 24px !important;
	left: 50% !important;
	transform: translateX(-50%);
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	background: rgba(255, 255, 255, 0.2) !important;
	color: #fff !important;
	padding: 10px 18px !important;
	border-radius: 22px !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
}