/* =========================================================
   KeyStart Academy — rtl.css
   Right-to-left support (html[dir="rtl"]). Most layout already
   uses logical properties (margin-inline, inset-inline, etc.);
   this file mirrors the remaining physical details and keeps
   typing content, keyboards and numbers LTR.
   ========================================================= */

/* Typing content, keyboards and English sample text stay LTR */
[dir="rtl"] .okb, [dir="rtl"] .tt-area, [dir="rtl"] .tt-text, [dir="rtl"] .otp-row, [dir="rtl"] .soon-type { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .num, [dir="rtl"] .mono, [dir="rtl"] .kbd, [dir="rtl"] .ref-id { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"] { direction: ltr; text-align: right; }

/* Directional icons and arrows */
[dir="rtl"] .dir-arrow, [dir="rtl"] .btn-arrow { transform: scaleX(-1); }
[dir="rtl"] .keycap:hover .btn-arrow { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .breadcrumb li:not(:last-child)::after { transform: scaleX(-1); }
[dir="rtl"] .path-arrow { transform: scaleX(-1); display: inline-block; }
[dir="rtl"] .rail-expanded .rail-toggle .dir-arrow { transform: none; }

/* Header: mobile panel slides from the left (inline-end) */
[dir="rtl"] .mobile-panel { transform: translateX(-100%); }
[dir="rtl"] .mobile-panel.open { transform: translateX(0); }
[dir="rtl"] .avatar-btn { padding: 3px 3px 3px 8px; }
[dir="rtl"] .dd-menu a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--brand); }

/* Off-canvas drawers that open from inline-start */
@media (max-width: 1023.98px) {
  [dir="rtl"] .filter-panel { transform: translateX(100%); }
  [dir="rtl"] .filter-panel.open { transform: translateX(0); }
}
@media (max-width: 767.98px) {
  [dir="rtl"] .dash-side { transform: translateX(100%); }
  [dir="rtl"] .dash-side.open { transform: translateX(0); }
  [dir="rtl"] .sheet-table tbody tr.row-active { box-shadow: inset -3px 0 0 var(--brand); }
}

/* Selects: arrow on the left */
[dir="rtl"] select.input { background-position: left 0.8rem center; padding-inline-end: 2.4rem; }

/* Tables: frozen column shadow on the other side */
[dir="rtl"] .sheet-table tbody td[data-col="0"], [dir="rtl"] .sheet-table .col-names th[data-col="0"] { box-shadow: inset 1px 0 0 var(--line-strong); }
[dir="rtl"] .sheet-table tbody td.active { box-shadow: inset 0 0 0 2px var(--brand); }

/* Bars and fills grow from the right */
[dir="rtl"] .seat-bar > span, [dir="rtl"] .mod-bar span, [dir="rtl"] .progress-line span, [dir="rtl"] .rating-bars .bar span,
[dir="rtl"] .tt-progress > span, [dir="rtl"] .log-bar span, [dir="rtl"] .pw-meter span, [dir="rtl"] .toast-bar, [dir="rtl"] .ruler-fill,
[dir="rtl"] .feature-card::before { transform-origin: right; }
[dir="rtl"] .course-grid.is-list .course-card::before { inset: 0 0 0 auto; }

/* Switches */
[dir="rtl"] .switch::after { left: auto; right: 3px; }
[dir="rtl"] .switch:checked::after { transform: translateX(-20px); }

/* Notifications slide in from the left (inline-end) */
[dir="rtl"] .toast { transform: translateX(-24px); }
[dir="rtl"] .toast.in { transform: translateX(0); }
[dir="rtl"] .toast.out { transform: translateX(-24px); }

/* Popups and images */
[dir="rtl"] .zoom-inner { transform-origin: top right; }
[dir="rtl"] .cert-card:hover { transform: translateY(-3px) rotate(0.4deg); }
[dir="rtl"] .adm-img-1 { transform: rotate(3deg); }
[dir="rtl"] .adm-img-2 { transform: rotate(-3deg); }
[dir="rtl"] .logo-key-top { transform: translate(3px, -3px); }
[dir="rtl"] .story-card::after { content: '\201C'; }

/* Banners: the dark gradient follows the reading direction */
[dir="rtl"] .ed-hero-bg::after { background: linear-gradient(-100deg, rgba(12, 30, 60, 0.98) 30%, rgba(12, 30, 60, 0.7)); }
[dir="rtl"] .ph-bg { background: linear-gradient(-110deg, rgba(12, 30, 60, 0.97) 35%, rgba(12, 30, 60, 0.82)), url("../images/lab-1.webp") center / cover no-repeat; }

/* Timetable labels */
[dir="rtl"] .timetable tbody th { text-align: right; }

/* Charts: SVG text stays LTR; the time axis is mirrored by the chart code */
[dir="rtl"] .bar-chart, [dir="rtl"] .line-chart { direction: ltr; }
[dir="rtl"] .rc-inst { text-align: start; }
[dir="rtl"] .tab-ind { left: 0; right: auto; }
