/* Altahany corporate bilingual direction system. */
:root {
  --ath-font: Arial, "Helvetica Neue", Tahoma, sans-serif;
  --ath-ink: #241d16;
  --ath-muted: #74695d;
  --ath-gold: #9b6a1b;
}

html, body, button, input, select, textarea, table {
  font-family: var(--ath-font) !important;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="ltr"] body { direction: ltr; text-align: left; }

html[dir="rtl"] :where(h1,h2,h3,h4,h5,h6,p,label,legend,li,dt,dd,th,td,.card-title,.page-title) {
  text-align: right;
}
html[dir="ltr"] :where(h1,h2,h3,h4,h5,h6,p,label,legend,li,dt,dd,th,td,.card-title,.page-title) {
  text-align: left;
}

:where([dir="rtl"],.ath-ar,.ar-text) {
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
}
:where([dir="ltr"],.ath-en,.ath-ltr,.ltr-value,.ltr-inline,.party-ltr) {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

:where(input[type="email"],input[type="tel"],input[type="url"],input[type="number"],input[type="date"],.ath-email,.ath-phone,.ath-url,.ath-number) {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

html[dir="rtl"] :where(input:not([type="email"]):not([type="tel"]):not([type="url"]):not([type="number"]):not([type="date"]),textarea) {
  direction: rtl;
  text-align: right;
}
html[dir="ltr"] :where(input,textarea) { direction: ltr; text-align: left; }

:where(p,li,td,.form-label,.form-help) { line-height: 1.75; }
:where(h1,h2,h3,.page-title,.card-title) {
  color: var(--ath-ink);
  letter-spacing: 0;
  line-height: 1.3;
}

/* Keep icons and labels in the natural reading order without mirroring brands. */
html[dir="rtl"] :where(.btn,.sidebar-link,.nav-link,.form-check,label) { flex-direction: row; }
html[dir="rtl"] :where(.btn svg,.sidebar-link svg,.nav-link svg) { flex: 0 0 auto; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  :where(input,select,textarea,button) { font-size: 16px !important; }
}
