/*
 * RTL Stylesheet — loads ONLY on Arabic (/ar/) pages
 * Overrides directional properties for right-to-left layout
 */

/* Base direction */
html, body {
  direction: rtl;
  text-align: right;
  font-family: "Segoe UI", Tahoma, "Arabic Typesetting", Arial, sans-serif;
}

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

/* First column sticky RTL */
@media (max-width: 767px) {
  .price-table th:first-child,
  .price-table td:first-child {
    left: auto;
    right: 0;
    box-shadow: -2px 0 4px var(--shadow);
  }
}

/* Breadcrumb separator direction */
.breadcrumb .sep::before { content: "\\"; }

/* Navigation */
.header-inner { flex-direction: row-reverse; }

/* TOC border */
.toc-box {
  border-left: none;
  border-right: 3px solid var(--color-gold);
}

/* Blockquote */
.article-content blockquote {
  border-inline-start: none;
  border-inline-end: 3px solid var(--color-gold);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* Language switcher swap */
.lang-switcher { flex-direction: row-reverse; }

/* Footer columns */
.footer-link-grid { direction: rtl; }

/* Sticky bar */
.sticky-update-time { margin-inline-start: unset; margin-inline-end: auto; padding-inline-start: var(--sp-4); padding-inline-end: 0; }

/* Form controls */
.form-control { text-align: right; }

/* Number inputs — keep LTR for numbers */
input[type="number"],
.price-hero,
.price-value,
.calc-result .result-value,
.price-table td:not(:first-child) {
  direction: ltr;
  text-align: left;
}

/* Karat tabs */
.karat-tabs { flex-direction: row-reverse; }

/* Chart legend */
.chart-controls { flex-direction: row-reverse; }

/* Link grid */
.link-grid a { flex-direction: row-reverse; }

/* Button icons */
.btn svg, .btn .icon { margin-inline-start: unset; margin-inline-end: var(--sp-2); }
