/*
 * typography.css — Global typography utility classes
 *
 * All Inter-based text styles for the HR Payroll design system.
 * Import once in main.js. Apply via class names — never inline.
 *
 * ─────────────────────────────────────────────────────────────
 * DISPLAY
 *   .ty-display-xl   40px / 120% / 700
 *   .ty-display-lg   32px / 120% / 700
 *   .ty-display-md   28px / 120% / 700
 *   .ty-display-sm   24px / 120% / 700
 *
 * HEADINGS
 *   .ty-page-title   32px / 133% / 700  — page headings
 *   .ty-card-title   20px / 150% / 700  — card headings
 *   .ty-section-title 18px / 140% / 600 — section headings, content title
 *   .ty-subtitle     16px / 140% / 600  — sub-section headings
 *
 * BODY
 *   .ty-body-lg      14px / 143% / 500  — buttons, nav items, emphasis body
 *   .ty-body         14px / 143% / 400  — default body, inputs, sidebar L2
 *   .ty-body-sm      13px / 140% / 400  — dense body, breadcrumbs, sub text
 *
 * META
 *   .ty-label        12px / 133% / 600  — form labels, tab labels
 *   .ty-meta         12px / 133% / 400  — breadcrumbs, badge text, admin role
 *   .ty-helper       11px / 127% / 400  — helper text, sidebar sub-labels
 *
 * BADGE
 *   .ty-badge        12px uppercase     — status badges
 *   .ty-badge-sm     10px               — small badges, compact tags
 *   .ty-badge-xs      9px               — notification counts, micro labels
 * ─────────────────────────────────────────────────────────────
 */

:root {
  --font-base: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Display ── */
.ty-display-xl {
  font-family: var(--font-base);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.ty-display-lg {
  font-family: var(--font-base);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.ty-display-md {
  font-family: var(--font-base);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.ty-display-sm {
  font-family: var(--font-base);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Headings ── */
.ty-page-title {
  font-family: var(--font-base);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.33;
}

.ty-card-title {
  font-family: var(--font-base);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.ty-section-title {
  font-family: var(--font-base);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.ty-subtitle {
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

/* ── Body ── */
.ty-body-lg {
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.43;
}

.ty-body {
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
}

.ty-body-sm {
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

/* ── Meta ── */
.ty-label {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
}

.ty-meta {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
}

.ty-helper {
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.27;
}

/* ── Badge ── */
.ty-badge {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ty-badge-sm {
  font-family: var(--font-base);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ty-badge-xs {
  font-family: var(--font-base);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

/* ── Base font reset — apply to all text containers ── */
body,
input,
select,
textarea,
button {
  font-family: var(--font-base);
}

/* ── Arabic (RTL) typography adjustments ───────────────────────────────────
   Arabic glyphs are proportionally larger at the same px value; bumping by
   1-2px restores the visual weight parity and improves legibility.
   'Tahoma' renders Arabic natively on all platforms; falls back to system.  */
:root {
  --font-arabic: 'Tahoma', 'Segoe UI', system-ui, sans-serif;
}

html[dir="rtl"] body,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] button {
  font-family: var(--font-arabic);
}

html[dir="rtl"] .ty-body-lg  { font-size: 15px; }
html[dir="rtl"] .ty-body     { font-size: 15px; }
html[dir="rtl"] .ty-body-sm  { font-size: 14px; }
html[dir="rtl"] .ty-label    { font-size: 13px; }
html[dir="rtl"] .ty-meta     { font-size: 13px; }
html[dir="rtl"] .ty-helper   { font-size: 12px; }

/* Chevron rotation in RTL: nav-item open state should point down (↓).
   In RTL we use chevron-left as the base icon; rotating -90° = ↓        */
html[dir="rtl"] .chevron--open    { transform: rotate(-90deg) !important; opacity: 1; }
html[dir="rtl"] .group-chevron.chevron--open { transform: rotate(-90deg) !important; }
