/**
 * Typography & Ethiopic / Latin Harmony
 * Provides semantic classes and font rules for financial numbers,
 * screen headings, and bilingual English / Amharic layouts.
 */

/* ==========================================================================
   1. Typography Scale Classes
   ========================================================================== */

.text-display {
  font-size: var(--font-size-display);
  line-height: var(--line-height-display);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

.text-title-large {
  font-size: var(--font-size-title-large);
  line-height: var(--line-height-title-large);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.015em;
}

.text-title {
  font-size: var(--font-size-title);
  line-height: var(--line-height-title);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

.text-subtitle {
  font-size: var(--font-size-subtitle);
  line-height: var(--line-height-subtitle);
  font-weight: var(--font-weight-medium);
}

.text-body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-regular);
}

.text-body-small {
  font-size: var(--font-size-body-small);
  line-height: var(--line-height-body-small);
  font-weight: var(--font-weight-regular);
}

.text-label {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-caption {
  font-size: var(--font-size-caption);
  line-height: var(--line-height-caption);
  font-weight: var(--font-weight-regular);
}

/* ==========================================================================
   2. Financial Numbers (Monetary Amounts)
   Tabular numerals guarantee numbers don't jump horizontally during balance updates
   ========================================================================== */

.text-amount-large {
  font-size: var(--font-size-amount-large);
  line-height: var(--line-height-amount-large);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.text-amount-medium {
  font-size: var(--font-size-amount-medium);
  line-height: var(--line-height-amount-medium);
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.amount-currency {
  font-size: 0.55em;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25em;
  vertical-align: 0.15em;
}

.amount-fraction {
  font-size: 0.75em;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   3. Color Utility Modifiers
   ========================================================================== */

.text-primary-color {
  color: var(--color-text-primary);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-brand {
  color: var(--color-primary);
}

.text-success {
  color: var(--color-success-fg);
}

.text-warning {
  color: var(--color-warning-fg);
}

.text-error {
  color: var(--color-error-fg);
}

/* ==========================================================================
   4. Ethiopic / Amharic Language Specific Tuning
   Accommodates Amharic letterforms, diacritics, and vertical height requirements
   ========================================================================== */

[lang="am"],
.lang-am {
  font-family: var(--font-family-ethiopic), var(--font-family-latin);
  /* Ethiopic glyphs have taller vowel marks; provide generous vertical line-height expansion */
  line-height: 1.65;
}

[lang="am"] .text-label,
.lang-am .text-label {
  /* Ethiopic script has no uppercase/lowercase concept */
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Text Truncation with Ellipsis */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
