/* MEFMA Chatbot — Arabic RTL overrides. PRD §2, §15, §17.
   Applied only when the widget root has dir="rtl". */
.mefma-cb[dir="rtl"] {
	font-family: "Segoe UI", Tahoma, "Helvetica Neue", Arial, sans-serif;
}
.mefma-cb[dir="rtl"] .mefma-cb-panel,
.mefma-cb[dir="rtl"] .mefma-cb-messages,
.mefma-cb[dir="rtl"] .mefma-cb-input,
.mefma-cb[dir="rtl"] .mefma-cb-msg {
	direction: rtl;
	text-align: right;
}

/* Move launcher + panel to the bottom-left. */
.mefma-cb[dir="rtl"] .mefma-cb-launcher { right: auto; left: 24px; }
.mefma-cb[dir="rtl"] .mefma-cb-panel { right: auto; left: 24px; transform-origin: bottom left; }

/* Mirror message bubble corners. */
.mefma-cb[dir="rtl"] .mefma-cb-msg-user {
	align-self: flex-start;
	border-bottom-right-radius: 14px;
	border-bottom-left-radius: 4px;
}
.mefma-cb[dir="rtl"] .mefma-cb-msg-bot {
	align-self: flex-end;
	border-bottom-left-radius: 14px;
	border-bottom-right-radius: 4px;
}
.mefma-cb[dir="rtl"] .mefma-cb-sources { align-self: flex-end; }
.mefma-cb[dir="rtl"] .mefma-cb-chip { text-align: right; }

/* Send icon points the other way in RTL. */
.mefma-cb[dir="rtl"] .mefma-cb-send svg { transform: scaleX(-1); }

@media (max-width: 480px) {
	.mefma-cb[dir="rtl"] .mefma-cb-panel { left: 0; right: 0; }
	.mefma-cb[dir="rtl"] .mefma-cb-launcher { left: 16px; right: auto; }
}
