import 'package:flutter/material.dart';

/// Typography definitions from PRD §3.2.
/// Plus Jakarta Sans (bundled) for UI text.
/// Scheherazade New (bundled) for Arabic/Quran text, with Uthman/KFGQPC fallback.
class AppTextStyles {
  AppTextStyles._();

  static const String _fontFamily = 'PlusJakartaSans';
  static const String _arabicFontFamily = 'ScheherazadeNew';
  static const List<String> _arabicFallbackFamilies = <String>[
    'UthmanTahaNaskh',
    'KFGQPCUthmanicHafs',
    'Amiri',
    'Noto Naskh Arabic',
    'Noto Sans Arabic',
    'Droid Arabic Naskh',
    'sans-serif',
  ];

  /// Builds the full TextTheme for the app using bundled Plus Jakarta Sans.
  static const TextTheme textTheme = TextTheme(
    displayLarge: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 32,
      fontWeight: FontWeight.w800,
    ),
    headlineMedium: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 24,
      fontWeight: FontWeight.w700,
    ),
    titleLarge: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 20,
      fontWeight: FontWeight.w700,
    ),
    titleMedium: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 16,
      fontWeight: FontWeight.w600,
    ),
    bodyLarge: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 16,
      fontWeight: FontWeight.w400,
    ),
    bodyMedium: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 14,
      fontWeight: FontWeight.w400,
    ),
    bodySmall: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 12,
      fontWeight: FontWeight.w400,
    ),
    labelSmall: TextStyle(
      fontFamily: _fontFamily,
      fontSize: 10,
      fontWeight: FontWeight.w700,
      letterSpacing: 1.5,
    ),
  );

  // ── Arabic text styles (Scheherazade New — bundled font) ──

  static const TextStyle arabicBody = TextStyle(
    fontFamily: _arabicFontFamily,
    fontFamilyFallback: _arabicFallbackFamilies,
    fontSize: 24,
    fontWeight: FontWeight.w400,
    height: 1.8,
  );

  static const TextStyle arabicLarge = TextStyle(
    fontFamily: _arabicFontFamily,
    fontFamilyFallback: _arabicFallbackFamilies,
    fontSize: 28,
    fontWeight: FontWeight.w400,
    height: 2.0,
  );
}
