/**
 * RTL polish pass (P3) — billing, legal/security pages, hero alignment.
 * Load after rtl.css when LANGUAGE_CODE is ar.
 */

/* ── Workspace: billing & tables ── */
[dir="rtl"] body.mg-app-shell main#main-content .card .table thead th,
[dir="rtl"] body.mg-app-shell main#main-content .card .table tbody td {
  text-align: right;
}

[dir="rtl"] body.mg-app-shell main#main-content .card-header,
[dir="rtl"] body.mg-app-shell main#main-content .card-body {
  text-align: right;
}

[dir="rtl"] body.mg-app-shell main#main-content .d-flex.justify-content-between {
  flex-direction: row-reverse;
}

[dir="rtl"] body.mg-app-shell main#main-content .row.g-3 > [class*="col-"] .card-body ul {
  padding-inline-start: 1.25rem;
  padding-inline-end: 0;
}

/* ── Public: security, legal, trust ── */
[dir="rtl"] body.mg-public .legal-content {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] body.mg-public .legal-content ul,
[dir="rtl"] body.mg-public .legal-content ol {
  padding-inline-start: 1.5rem;
  padding-inline-end: 0;
}

[dir="rtl"] body.mg-public .mg-page-header .container,
[dir="rtl"] body.mg-public .mg-trust-hero .container {
  text-align: right;
}

[dir="rtl"] body.mg-public .mg-footer-lang {
  direction: ltr;
}

/* ── Hero command: start-aligned Arabic (not centered) ── */
@media (min-width: 992px) {
  [dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-inner {
    direction: rtl;
    text-align: start;
  }

  [dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-content {
    text-align: start;
  }

  [dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-subhead,
  [dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-headline,
  [dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-eyebrow {
    margin-inline-start: 0;
    margin-inline-end: auto;
  }

  [dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-ctas {
    justify-content: flex-start;
  }

  [dir="rtl"] body.mg-public .home-pillar-text {
    text-align: start;
  }
}
