/**
 * RTL stylesheet for Arabic language support.
 * Loaded conditionally when $lang->isRtl() returns true.
 * Overrides directional properties from main.css.
 */

/* Global direction */
html,
body {
  direction: rtl;
  text-align: right;
}

/* Flip flex row directions */
.d-flex,
.flex-row {
  flex-direction: row-reverse;
}

/* Navigation alignment */
.navbar-nav {
  flex-direction: row-reverse;
}

.navbar-brand {
  margin-right: 0;
  margin-left: auto;
}

/* Dropdown menus */
.dropdown-menu {
  right: 0;
  left: auto;
  text-align: right;
}

/* Cards and panels */
.card-body,
.panel-body {
  text-align: right;
}

/* Tables */
th,
td {
  text-align: right;
}

/* Form labels and inputs */
label,
.form-label {
  text-align: right;
  display: block;
}

.form-control,
.form-select {
  text-align: right;
}

/* Icons next to text: flip margin sides */
.fa,
.fas,
.far,
.fab {
  margin-right: 0;
  margin-left: 0.35em;
}

/* Prediction bars: fill from right */
.prob-bar-fill {
  float: right;
}

/* Breadcrumb separators */
.breadcrumb-item + .breadcrumb-item::before {
  content: "\203A";
  transform: scaleX(-1);
  display: inline-block;
}

/* Match score display: keep numerals LTR inside RTL context */
.score-display,
.score-prediction__score,
.match-score,
.fixture-score {
  direction: ltr;
  unicode-bidi: embed;
}

/* Pagination */
.pagination {
  flex-direction: row-reverse;
}

/* Alert and notice text */
.alert,
.prediction-disclaimer,
.ai-analysis__disclosure {
  text-align: right;
}

/* Sidebar: move to left in RTL */
.sidebar {
  float: left;
}

.main-content {
  float: right;
}

/* Footer links */
.footer-links {
  flex-direction: row-reverse;
}

/* Language switcher */
.language-switcher {
  margin-right: auto;
  margin-left: 0;
}

/* Badge positioning */
.badge {
  margin-left: 0;
  margin-right: 0.25em;
}

/* Progress bars */
.progress-bar {
  float: right;
}

/* Input groups */
.input-group > .form-control:not(:last-child) {
  border-radius: 0 0.375rem 0.375rem 0;
}

.input-group > .form-control:not(:first-child) {
  border-radius: 0.375rem 0 0 0.375rem;
}

/* Stat pills in prediction display */
.secondary-stats {
  flex-direction: row-reverse;
}

/* Table first column sticky for mobile horizontal scroll */
.table-responsive th:first-child,
.table-responsive td:first-child {
  right: 0;
  left: auto;
}
