/* RTL (Right-to-Left) Support for Arabic */

[dir="rtl"] body {
  font-family: 'Segoe UI', 'Tahoma', Arial, sans-serif;
  text-align: right;
}

/* Navbar RTL */
[dir="rtl"] .navbar-nav {
  margin-right: 0;
  margin-left: auto;
}

[dir="rtl"] .navbar-brand {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .me-2,
[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Form Elements RTL */
[dir="rtl"] .form-check-label {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .form-check-input {
  float: right;
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .form-check-inline {
  margin-right: 0;
  margin-left: 1rem;
}

/* Text Alignment */
[dir="rtl"] .text-end {
  text-align: left !important;
}

[dir="rtl"] .text-start {
  text-align: right !important;
}

/* Buttons and Links RTL */
[dir="rtl"] input[type="file"]::file-selector-button {
  margin-right: 0;
  margin-left: 1rem;
}

/* Document Items RTL */
[dir="rtl"] .border-bottom:hover {
  margin: 0 -1.5rem;
  padding: 1.25rem 1.5rem !important;
}

/* Toast RTL */
[dir="rtl"] .position-fixed.end-0 {
  right: auto !important;
  left: 0 !important;
}

[dir="rtl"] .btn-close {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Spacing Utilities RTL */
[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

[dir="rtl"] .me-2 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

/* Collapse Toggle RTL */
[dir="rtl"] .navbar-toggler {
  margin-left: 0;
  margin-right: auto;
}

/* Grid Gaps RTL */
[dir="rtl"] .gap-2 {
  gap: 0.5rem !important;
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
  [dir="rtl"] .border-bottom:hover {
    margin: 0;
    padding: 1.25rem 0 !important;
  }
}