/**
 * RTL overrides — loaded only when the current language is right-to-left
 * (see RTL_LANGS in inc/translate.php, currently just Arabic).
 *
 * Native <html dir="rtl"> already auto-mirrors most flexbox/grid layouts,
 * text-align, and the language switcher — that's free, no CSS needed. This
 * file covers what DOESN'T auto-flip: hardcoded left/right physical
 * properties on specific components, directional arrows/icons, and a few
 * input/form alignment tweaks. It's a solid, functional RTL pass — not a
 * claim of pixel-perfect mirroring of every single inline style site-wide.
 */

body { direction: rtl; }

/* Directional arrow glyphs used inline in copy (↑ ↓ → ←) read backwards in RTL */
.btn, button, a { unicode-bidi: plaintext; }

/* Numbers, currency codes, and card/wallet values should stay LTR even in
   RTL flow (a card number or crypto amount reads left-to-right everywhere) */
.gc-number, .gc-balance, .od-row code, .admin-table td code,
input[type="text"], input[type="email"], input[type="number"], textarea,
.order-id-link, code, pre {
  direction: ltr;
  unicode-bidi: isolate;
}
/* ...but their labels/surrounding text should still flow RTL */
.od-row, .gc-field label, .form-group label { direction: rtl; }
.od-row code { text-align: left; }

/* Nav / header: logical alignment instead of hardcoded left/right */
.nav-links, .header-actions, .footer-grid, .lang-switch { direction: rtl; }

/* Cards and content blocks: mirror text alignment, keep numeric/LTR content readable */
.card, .page-content, .gc-form { text-align: right; }
.page-content pre, .page-content code { direction: ltr; text-align: left; }

/* Form fields: right-align labels/placeholders, keep the input itself sane for mixed content */
.form-group, .gc-field { text-align: right; }
.form-group input, .form-group textarea, .form-group select,
.gc-input, .gc-textarea {
  text-align: right;
}
.form-group input[type="checkbox"], .form-group input[type="radio"] {
  margin-left: 8px; margin-right: 0;
}

/* Admin sidebar/topbar: mirror the fixed-side layout */
.admin-sidebar { border-right: none; border-left: 1px solid var(--border); }
.admin-hamburger-dot { right: auto; left: -4px; }

/* Gold card chip/number/meta: keep the physical card-face layout (a real
   card's chip position doesn't flip just because the page language does) */
.gold-card, .gc-row-top, .gc-row-bottom { direction: ltr; text-align: left; }
.gold-card .gc-brand, .gold-card .gc-label { direction: rtl; }
