.ts-form label { display:block; font-weight:600; margin-bottom:4px; }
.ts-form input[type="text"], .ts-form textarea, .ts-form select {
	width:100%; padding:8px; border:1px solid #ddd; border-radius:6px; box-sizing:border-box;
}
.ts-btn-primary {
	background:#2b6cb0; color:#fff; border:none; padding:10px 20px; border-radius:6px; cursor:pointer;
}
.ts-table { width:100%; border-collapse:collapse; }
.ts-table th, .ts-table td { padding:10px; border-bottom:1px solid #eee; text-align:right; }
.ts-badge { background:#edf2f7; color:#2d3748; padding:3px 10px; border-radius:999px; font-size:12px; }
.ts-thread .ts-message { border:1px solid #eee; border-radius:8px; padding:14px; margin-bottom:12px; }
.ts-message-customer { background:#f7fafc; }
.ts-message-agent { background:#ebf8ff; border-color:#bee3f8; }
.ts-message-note { background:#fffaf0; border-color:#feebc8; }
.ts-note-flag { font-size:11px; color:#dd6b20; }
.ts-date { float:left; font-size:11px; color:#999; }
.ts-reply-form textarea { width:100%; border:1px solid #ddd; border-radius:6px; padding:10px; box-sizing:border-box; }
.ts-form-message { font-size:13px; }

/* ویجت چت */
.ts-chat-box { max-width:480px; border:1px solid #e2e2e2; border-radius:10px; overflow:hidden; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.05); }
.ts-chat-header { background:#2b6cb0; color:#fff; padding:12px 16px; font-weight:600; display:flex; justify-content:space-between; align-items:center; }
.ts-chat-header a { color:#fff; font-size:12px; text-decoration:underline; }
.ts-chat-body.ts-chat-start { padding:16px; display:flex; flex-direction:column; gap:10px; }
.ts-chat-guest-notice { background:#ebf8ff; border:1px solid #bee3f8; border-radius:6px; padding:10px; font-size:12.5px; color:#2c5282; margin:0; }
.ts-chat-start input, .ts-chat-start textarea { padding:8px; border:1px solid #ddd; border-radius:6px; }
.ts-cw-error { color:#c53030; font-size:13px; margin:0; }
.ts-chat-messages { max-height:360px; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:8px; background:#f9fafb; }
.ts-cw-msg { padding:8px 12px; border-radius:8px; max-width:85%; font-size:13.5px; }
.ts-cw-msg-customer { background:#edf2f7; align-self:flex-end; }
.ts-cw-msg-agent { background:#ebf8ff; align-self:flex-start; }
.ts-cw-msg-system { background:#fffbeb; border:1px dashed #f6c343; align-self:center; text-align:center; font-size:12.5px; color:#7a5c00; max-width:95%; }
.ts-cw-msg b { display:block; font-size:11px; opacity:.7; margin-bottom:2px; }
.ts-chat-status { font-size:11px; color:#888; padding:4px 12px; }
.ts-chat-input { display:flex; gap:8px; padding:10px; border-top:1px solid #eee; }
.ts-chat-input textarea { flex:1; border:1px solid #ddd; border-radius:6px; padding:8px; resize:none; }
.ts-cw-csat, .ts-csat-standalone { padding:16px; border-top:1px solid #eee; text-align:center; }
.ts-star-row { font-size:26px; letter-spacing:4px; }
.ts-star { cursor:pointer; color:#cbd5e0; }
.ts-star.active { color:#f6ad55; }
.ts-csat-comment, .ts-cw-csat-comment { width:100%; margin:10px 0; border:1px solid #ddd; border-radius:6px; padding:8px; box-sizing:border-box; }
.ts-csat-msg { font-size:13px; color:#c53030; }
.ts-cw-contact-toggle { padding:6px 12px; font-size:12px; }
.ts-cw-contact-toggle a { color:#2b6cb0; text-decoration:underline; }
.ts-cw-contact-form { padding:10px 12px; background:#f9fafb; border-top:1px solid #eee; display:flex; flex-direction:column; gap:8px; }
.ts-cw-contact-form input { padding:8px; border:1px solid #ddd; border-radius:6px; }
.ts-cw-contact-msg { font-size:12px; margin:0; }
.ts-wc-account-chat { max-width:600px; }
.ts-wc-account-chat .ts-chat-box { max-width:100%; }

.ts-online-agents { padding:8px 12px; background:#fff; border-bottom:1px solid #eee; display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-height:0; }
.ts-online-agents:empty { padding:0; border-bottom:none; }
.ts-online-label { font-size:11px; color:#888; margin-left:4px; }
.ts-online-avatar { display:inline-block; width:28px; height:28px; border-radius:50%; border:2px solid #38a169; overflow:hidden; box-shadow:0 0 0 2px #fff; }
.ts-online-avatar img { width:100%; height:100%; object-fit:cover; display:block; }

/* لینک‌های تب حساب کاربری ووکامرس */
.ts-wc-links { margin-top:16px; font-size:14px; }
.ts-wc-links a { color:#2b6cb0; text-decoration:none; font-weight:600; }
.ts-wc-links a:hover { text-decoration:underline; }

/* پاپ‌آپ چت */
#ts-chat-modal-overlay {
	display:none; position:fixed; inset:0; background:rgba(0,0,0,.5);
	z-index:100000; align-items:center; justify-content:center;
}
#ts-chat-modal-box {
	position:relative; background:#fff; border-radius:12px; width:100%; max-width:480px;
	max-height:85vh; overflow:hidden; box-shadow:0 10px 40px rgba(0,0,0,.2);
	display:flex; flex-direction:column;
}
.ts-chat-modal-close {
	position:absolute; top:8px; left:8px; background:rgba(0,0,0,.08); border:none; border-radius:50%;
	width:30px; height:30px; font-size:18px; line-height:1; cursor:pointer; z-index:2; color:#333;
}
#ts-chat-widget-modal .ts-chat-box { border:none; border-radius:0; box-shadow:none; }
#ts-chat-widget-modal .ts-chat-messages { max-height:50vh; }
@media (min-width:600px) {
	#ts-chat-modal-overlay[style*="display: flex"] { display:flex !important; }
}
