/* RTL overrides — loaded only when dir="rtl" (Arabic). */
/* Scoped under html[dir="rtl"] so no rule leaks to LTR pages. */

html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  direction: rtl;
  text-align: right;
}

/* Field icons are positioned left in LTR — move to right for RTL */
html[dir="rtl"] .field-icon-wrap input {
  padding-left: 16px;
  padding-right: 42px;
}
html[dir="rtl"] .field-icon-wrap .field-icon {
  left: unset;
  right: 12px;
}
html[dir="rtl"] .input-field .input-icon {
  left: unset;
  right: 12px;
}
/* Hero audit URL field: mirror the globe icon and input padding for RTL */
html[dir="rtl"] .hero-audit input {
  padding-left: 14px;
  padding-right: 40px;
}
html[dir="rtl"] .hero-audit-icon {
  left: unset;
  right: 14px;
}

/* Checkboxes and radio inputs */
html[dir="rtl"] .checkbox {
  direction: rtl;
}
html[dir="rtl"] .choice input {
  margin-right: 0;
  margin-left: 10px;
}

/* Wizard progress bar */
html[dir="rtl"] .wizard-progress {
  direction: rtl;
}
html[dir="rtl"] .wizard-back svg {
  transform: scaleX(-1);
}

/* Site cards actions */
html[dir="rtl"] .site-card-actions {
  align-items: flex-start;
}

/* Report preview checklist alignment */
html[dir="rtl"] .rp-l.rp-check {
  padding-left: 0;
  padding-right: 12px;
}

/* Score stats alignment */
html[dir="rtl"] .score-stat-lbl {
  text-align: center;
}

/* Priority card stats */
html[dir="rtl"] .priority-stats {
  flex-direction: row-reverse;
}

/* Header nav alignment */
html[dir="rtl"] .header-inner {
  flex-direction: row-reverse;
}
html[dir="rtl"] .site-nav {
  flex-direction: row-reverse;
}

/* Footer alignment */
html[dir="rtl"] .footer-top {
  flex-direction: row-reverse;
}
html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

/* Native selects — mirror the base chevron and its padding (app.css `select`).
   Compact contexts below (.lang-switcher, .acct-sort) re-assert their own. */
html[dir="rtl"] select {
  padding: 12px 14px 12px 40px;
  background-position: left 13px center;
}
html[dir="rtl"] .acct-sort select {
  padding: 10px 14px 10px 34px;
  background-position: left 11px center;
}

/* Language switcher — mirror globe (left→right) and caret (right→left) */
html[dir="rtl"] .lang-switcher .lang-globe {
  left: auto;
  right: 9px;
}
html[dir="rtl"] .lang-switcher select {
  padding: 6px 30px 6px 28px;
  background-position: left 9px center;
}
html[dir="rtl"] .lang-switcher .lang-go {
  margin-left: 0;
  margin-right: 6px;
}

/* Auth page layout */
html[dir="rtl"] .auth-card {
  flex-direction: row-reverse;
}

/* Alert text */
html[dir="rtl"] .alert {
  text-align: right;
}
