/* Yachting Master — right-to-left (Arabic) and the fonts of the Arabic and Russian screens.
   The page styles use logical properties (margin-inline, padding-inline, inset-inline, text-align:start/end), so most of the screen
   mirrors by itself when <html dir="rtl"> (set by applyLang in app.js and by rapor.js). This file holds only what logical properties
   cannot express: asymmetric shorthands, slide animations, scroll/ticker direction, numbers and codes that always read left to right.
   Loaded by index.html and rapor.html; every rule is under html[dir="rtl"] / html[lang="ar"] / html[lang="ru"], so the other seven languages are untouched. */

/* ---- fonts: tema.css carries the stacks (Inter and Noto Serif Display hold Cyrillic; Noto Sans Arabic / Noto Naskh Arabic hold Arabic) ---- */
/* the Arabic display face (Noto Naskh Arabic) is lighter than the Latin one at the same weight */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] .sayfabas, html[lang="ar"] .panel h3, html[lang="ar"] .sheet h3 { font-weight: 600; }
/* letter-spacing breaks the joining of Arabic letters */
html[lang="ar"] * { letter-spacing: 0 !important; }
html[lang="ar"] body, html[lang="ar"] .legal { line-height: 1.6; }

/* ---- numbers, amounts, dates, codes: always left to right, aligned to the end side of their cell ---- */
html[dir="rtl"] .amt, html[dir="rtl"] .bal, html[dir="rtl"] .mono, html[dir="rtl"] .tutar, html[dir="rtl"] td.r, html[dir="rtl"] th.r, html[dir="rtl"] td.n,
html[dir="rtl"] td.num, html[dir="rtl"] .kc .v, html[dir="rtl"] .cbar .v, html[dir="rtl"] .closebox .v, html[dir="rtl"] .kv b, html[dir="rtl"] .stat b,
html[dir="rtl"] .fxline b, html[dir="rtl"] .mcol .bv, html[dir="rtl"] .pathbox, html[dir="rtl"] .kutu .v, html[dir="rtl"] bdi.ltr, html[dir="rtl"] .ltr {
  direction: ltr; unicode-bidi: isolate; text-align: left;
}
html[dir="rtl"] .cbar .v, html[dir="rtl"] .closebox .v, html[dir="rtl"] .row .amt { text-align: left; }
/* number boxes and e-mail / date boxes hold left-to-right text; the text boxes follow the language of what is typed */
html[dir="rtl"] input[inputmode="decimal"], html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="date"], html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="url"], html[dir="rtl"] input.num { direction: ltr; text-align: right; }
html[dir="rtl"] input[type="text"], html[dir="rtl"] input[type="search"], html[dir="rtl"] textarea { unicode-bidi: plaintext; }
/* a time axis stays left to right (oldest month on the left), also the rate ticker */
html[dir="rtl"] .months, html[dir="rtl"] .mlbl, html[dir="rtl"] .kurkay, html[dir="rtl"] .saatler { direction: ltr; }

/* ---- asymmetric shorthands that cannot be written logically ---- */
html[dir="rtl"] select.pill { padding: 8px 14px 8px 34px; background-position: 13px 55%, 18px 55%; }
html[dir="rtl"] .row { padding: 10px 8px 10px 12px; }
html[dir="rtl"] .fab { padding: 14px 16px 14px 20px; }
html[dir="rtl"] .fab2 { padding: 13px 13px 13px 16px; }
@media (max-width: 520px) {
  html[dir="rtl"] .fab { padding: 12px 13px 12px 16px; }
  html[dir="rtl"] .fab2 { padding: 11px 11px 11px 14px; }
}
/* the menu drawer opens from the right: slide in from the right */
@media (prefers-reduced-motion: no-preference) {
  html[dir="rtl"] .drawer { animation-name: sag; }
  @keyframes sag { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
/* a lone arrow icon that points the way of reading */
html[dir="rtl"] .yon-ok { transform: scaleX(-1); }

/* ---- the report (rapor.html): page footer boxes swap sides on the printed page ---- */
html[dir="rtl"] table.sirkett td.r, html[dir="rtl"] table.sirkett th:not(:first-child) { text-align: left; }
/* the report's ledger: a date reads left to right (the rule above) but stays on the start side of its cell, clear of the next column */
html[dir="rtl"] table.defter td.tarih { text-align: right; padding-inline: 0 1.6mm !important; }   /* the cell itself is left to right: its end side is the page's start side */
