import 'package:flutter/material.dart';

class AppTheme {
  // ✅ MAIN BRAND COLORS
  static const Color primary = Color(0xFF00BFFF); // Main Blue
  static const Color lightBlue = Color(0xFFE8F7FF); // Sidebar highlight
  static const Color background = Color(0xFFFFFFFF); // 0xFFF4FBFE App background
  static const Color textDark = Color(0xFF1C1C1C);
  static const Color textGrey = Color(0xFF6F6F6F);
  static const Color cardBorder = Color(0xFFAEE9FF);

  // ✅ GLOBAL APP THEME
  static ThemeData lightTheme = ThemeData(
    useMaterial3: true,

    scaffoldBackgroundColor: background,

    primaryColor: primary,

    colorScheme: ColorScheme.fromSeed(
      seedColor: primary,
      brightness: Brightness.light,
    ),

    fontFamily: 'Poppins',

    // ✅ TEXT STYLES
    textTheme: const TextTheme(
      headlineLarge: TextStyle(
        fontSize: 34,
        fontWeight: FontWeight.bold,
        color: textDark,
      ),
      headlineMedium: TextStyle(
        fontSize: 26,
        fontWeight: FontWeight.bold,
        color: textDark,
      ),
      headlineSmall: TextStyle(
        fontSize: 20,
        fontWeight: FontWeight.w600,
        color: textDark,
      ),
      bodyLarge: TextStyle(fontSize: 16, color: textDark),
      bodyMedium: TextStyle(fontSize: 14, color: textGrey),
    ),

    // ✅ ELEVATED BUTTON THEME (SUBSCRIBE BUTTONS)
    elevatedButtonTheme: ElevatedButtonThemeData(
      style: ElevatedButton.styleFrom(
        backgroundColor: primary,
        foregroundColor: Colors.white,
        elevation: 6,
        shadowColor: Colors.black.withOpacity(0.2),
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
        padding: const EdgeInsets.symmetric(vertical: 14),
        textStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
      ),
    ),

    // ✅ OUTLINED BUTTON THEME (UNSELECTED BUTTONS)
    outlinedButtonTheme: OutlinedButtonThemeData(
      style: OutlinedButton.styleFrom(
        foregroundColor: primary,
        side: const BorderSide(color: primary),
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
        padding: const EdgeInsets.symmetric(vertical: 14),
      ),
    ),

    // ✅ INPUT FIELD THEME
    inputDecorationTheme: InputDecorationTheme(
      filled: true,
      fillColor: Colors.white,
      border: OutlineInputBorder(
        borderRadius: BorderRadius.circular(12),
        borderSide: const BorderSide(color: cardBorder),
      ),
      enabledBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(12),
        borderSide: const BorderSide(color: cardBorder),
      ),
      focusedBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(12),
        borderSide: const BorderSide(color: primary, width: 2),
      ),
    ),

    // ✅ CARD THEME (PRICING BOXES)
    cardTheme: CardThemeData(
      color: Colors.white,
      elevation: 12,
      shadowColor: Colors.black.withValues(alpha: 0.06),
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(26)),
    ),

    // ✅ APP BAR THEME
    appBarTheme: const AppBarTheme(
      backgroundColor: Colors.white,
      elevation: 0,
      centerTitle: true,
      iconTheme: IconThemeData(color: Colors.white),
      titleTextStyle: TextStyle(
        color: textDark,
        fontSize: 18,
        fontWeight: FontWeight.bold,
      ),
    ),

    // ✅ DIVIDER THEME
    dividerTheme: const DividerThemeData(color: cardBorder, thickness: 1),

    // ✅ ICON THEME
    iconTheme: const IconThemeData(color: primary),
  );
}
