/*!
 * FamilyVisa Visa Cost Calculator — RTL overrides
 * Scoped to .pvc-rtl, which calculator-i18n.js adds to #pvcOverlay on Arabic pages.
 * Pairs with calculator-i18n.js. Loaded only on Arabic pages, so English is untouched.
 */

/* Base direction + Arabic font for the whole calculator */
.pvc-rtl,
.pvc-rtl .pvc-calc,
.pvc-rtl .pvc-overlay-panel {
  direction: rtl;
}
.pvc-rtl,
.pvc-rtl .pvc-calc,
.pvc-rtl .pvc-question,
.pvc-rtl .pvc-subtext,
.pvc-rtl .pvc-option-title,
.pvc-rtl .pvc-option-sub,
.pvc-rtl .pvc-btn,
.pvc-rtl .pvc-sum-title,
.pvc-rtl .pvc-line-name,
.pvc-rtl .pvc-sum-i-name,
.pvc-rtl .pvc-recap-name,
.pvc-rtl .pvc-grand-label,
.pvc-rtl .pvc-cta,
.pvc-rtl .pvc-copy {
  font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Header: swap absolute-positioned back / close buttons */
.pvc-rtl .pvc-overlay-back  { left: auto; right: 0; }
.pvc-rtl .pvc-overlay-close { right: auto; left: 0; }
/* the back chevron ‹ should point the RTL "back" direction (›) */
.pvc-rtl #pvcHeaderBack { transform: translateY(-50%) scaleX(-1); }

/* Headings / blocks that were explicitly left-aligned */
.pvc-rtl .pvc-result-head { text-align: right; }

/* Fee line: name on the (now) right, spacing toward the amount on its left */
.pvc-rtl .pvc-sum-i-name,
.pvc-rtl .pvc-line-name { padding-right: 0; padding-left: 12px; }

/* Amounts: keep numerals + dirham glyph in natural LTR order, sitting at the line start */
.pvc-rtl .pvc-sum-amt,
.pvc-rtl .pvc-grand-amt,
.pvc-rtl .pvc-total-amount { text-align: left; }
.pvc-rtl .pvc-line-val,
.pvc-rtl .pvc-sum-i-val,
.pvc-rtl .pvc-recap-val,
.pvc-rtl .pvc-sum-amt-n {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Per-unit + multiplier spacing flips */
.pvc-rtl .pvc-sum-per { margin-left: 0; margin-right: 2px; }
.pvc-rtl .pvc-recap-mult {
  margin-left: 0; margin-right: 3px;
  direction: ltr; unicode-bidi: isolate; display: inline-block;
}

/* Radio tick offset */
.pvc-rtl .pvc-radio::after { margin-left: 0; margin-right: 2px; }

/* Comparison table (if shown): label column on the right, value columns on the left */
.pvc-rtl .pvc-cmp thead th { text-align: left; }
.pvc-rtl .pvc-cmp thead th:first-child { text-align: right; }
.pvc-rtl .pvc-cmp td { text-align: left; }
.pvc-rtl .pvc-cmp td:first-child { text-align: right; }

/* Launch card hover arrow (if the inline launch card is used) */
.pvc-rtl .pvc-launch:hover .pvc-launch-arrow { transform: translateX(-4px); }

/* Slightly more comfortable line height for Arabic */
.pvc-rtl .pvc-subtext,
.pvc-rtl .pvc-option-sub,
.pvc-rtl .pvc-disclaimer { line-height: 1.7; }
