/**
 * === Design Tokens Typography Legacy Aliases — Bridge Layer ===
 *
 * Mô tả: Map các tên token cũ sang token use-case mới (Phase 00b).
 *        Đảm bảo 47 CSS file chưa refactor không bị vỡ layout ngay lập tức.
 *        File này sẽ bị XÓA sau khi Step 7 hoàn tất refactor toàn bộ 47 files.
 *
 * Flow:
 *   1. Load SAU design-tokens-typography.css (new tokens phải tồn tại trước)
 *   2. Map --text-* generic → --text-* use-case cụ thể
 *   3. Map --font-size-* aliases → use-case tokens
 *   4. Map --leading-* aliases → --lh-* tokens
 *   5. Map --font-heading/--font-body → --font-primary
 *   6. Map --font-weight-* → --weight-* tokens
 *
 * DEPRECATED: Sẽ bị xóa sau Phase 00b Step 7 hoàn tất.
 *             Không thêm alias mới vào file này.
 *             Không dùng các alias này trong code mới.
 */

:root {
  /* =========================================================
     Old --text-* generic size aliases → new use-case tokens
     Note: --text-lg và --text-xl đều map về --text-card-h3
           (bug cũ: cả 2 cùng = --text-h3 → confusing)
     ========================================================= */
  --text-xs:   var(--text-micro);
  --text-sm:   var(--text-caption);
  --text-base: var(--text-body);
  --text-md:   var(--text-body-lg);
  --text-lg:   var(--text-card-h3);
  --text-xl:   var(--text-card-h3);
  --text-2xl:  var(--text-section-h2);
  --text-3xl:  var(--text-display);
  --text-h1:   var(--text-display);
  --text-h2:   var(--text-section-h2);
  --text-h3:   var(--text-card-h3);

  /* =========================================================
     Old --font-size-* aliases → use-case tokens
     ========================================================= */
  --font-size-xs:   var(--text-micro);
  --font-size-sm:   var(--text-caption);
  --font-size-base: var(--text-body);
  --font-size-md:   var(--text-body-lg);
  --font-size-lg:   var(--text-card-h3);
  --font-size-xl:   var(--text-section-h2);
  --font-size-2xl:  var(--text-display);

  /* =========================================================
     Old --leading-* aliases → --lh-* tokens
     ========================================================= */
  --leading-tight:   var(--lh-tight);
  --leading-heading: var(--lh-heading);
  --leading-body:    var(--lh-body);
  --leading-form:    var(--lh-snug);

  /* =========================================================
     Old --font-heading / --font-body aliases → --font-primary
     (cả 2 đều map về primary — 99% UI dùng 1 font)
     ========================================================= */
  --font-heading: var(--font-primary);
  --font-body:    var(--font-primary);

  /* =========================================================
     Old --font-weight-* numeric aliases → --weight-* tokens
     ========================================================= */
  --font-weight-normal:   var(--weight-regular);
  --font-weight-medium:   var(--weight-medium);
  --font-weight-semibold: var(--weight-semibold);
  --font-weight-bold:     var(--weight-bold);
}
