/* ============================================
   RTL (Right-to-Left) Overrides for Arabic
   ============================================ */

body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Reverse flex directions */
body[dir="rtl"] .flex:not(.flex-col) {
  flex-direction: row-reverse;
}

/* Text alignment */
body[dir="rtl"] .text-left {
  text-align: right;
}

body[dir="rtl"] .text-right {
  text-align: left;
}

/* Margins and Paddings - Swap left/right */
body[dir="rtl"] .ml-auto {
  margin-left: 0;
  margin-right: auto;
}

body[dir="rtl"] .mr-auto {
  margin-right: 0;
  margin-left: auto;
}

/* Border radius - Swap corners */
body[dir="rtl"] .rounded-l {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

body[dir="rtl"] .rounded-r {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

/* Icons in buttons - Swap order */
body[dir="rtl"] .btn svg:first-child {
  order: 2;
}

body[dir="rtl"] .btn svg:last-child {
  order: 1;
}

/* Dropdown positioning */
body[dir="rtl"] .dropdown-menu {
  right: auto;
  left: 0;
}

/* Table text alignment */
body[dir="rtl"] .table th,
body[dir="rtl"] .table td {
  text-align: right;
}

/* List item bullets/numbers */
body[dir="rtl"] ul,
body[dir="rtl"] ol {
  padding-left: 0;
  padding-right: 2rem;
}

/* Sidebar border */
body[dir="rtl"] .sidebar {
  border-right: none;
  border-left: 1px solid var(--color-gray-200);
}

/* Status indicators - Keep left aligned in RTL */
body[dir="rtl"] .status-indicator {
  margin-right: 0;
  margin-left: var(--space-2);
}

