using System.Drawing;

namespace Elfisa.UI.Theming
{
    /// <summary>
    /// Палитра Apotheca: узнаваемость оригинала (синяя шапка, голубые заголовки таблиц,
    /// синее выделение строки) + современный B2B-визуал Fluent/Office 365.
    /// </summary>
    public sealed class ApothecaPalette : IThemePalette
    {
        public ThemeVariant Variant => ThemeVariant.Apotheca;

        public ThemeColors Colors { get; } = new ThemeColors
        {
            Name = "Apotheca",
            Mode = ThemeMode.Light,
            BackgroundPrimary = Color.FromArgb(240, 242, 245),
            BackgroundSecondary = Color.FromArgb(240, 242, 245),
            Surface = Color.White,
            SurfaceElevated = Color.White,
            Border = Color.FromArgb(203, 213, 225),
            BorderSubtle = Color.FromArgb(226, 232, 240),
            TextPrimary = Color.FromArgb(15, 23, 42),
            TextSecondary = Color.FromArgb(51, 65, 85),
            TextMuted = Color.FromArgb(100, 116, 139),
            TextOnAccent = Color.White,
            AccentPrimary = Color.FromArgb(37, 99, 235),
            AccentPrimaryHover = Color.FromArgb(29, 78, 216),
            AccentPrimaryPressed = Color.FromArgb(30, 64, 175),
            AccentPrimarySoft = Color.FromArgb(219, 234, 254),
            AccentPrimaryBorder = Color.FromArgb(147, 197, 253),
            AccentSecondary = Color.White,
            Success = Color.FromArgb(22, 163, 74),
            SuccessSoft = Color.FromArgb(220, 252, 231),
            Warning = Color.FromArgb(217, 119, 6),
            WarningSoft = Color.FromArgb(254, 243, 199),
            Danger = Color.FromArgb(220, 38, 38),
            DangerSoft = Color.FromArgb(254, 226, 226),
            Info = Color.FromArgb(37, 99, 235),
            InfoSoft = Color.FromArgb(239, 246, 255),
            TitleBarTop = Color.FromArgb(30, 58, 138),
            TitleBarBottom = Color.FromArgb(37, 99, 235),
            NavBackground = Color.White,
            CartHeaderBackground = Color.FromArgb(241, 245, 249),
            ToolbarBackground = Color.FromArgb(248, 250, 252),
            SectionHeaderBackground = Color.FromArgb(191, 219, 254),
            SidebarBackground = Color.White,
            SidebarItem = Color.FromArgb(100, 116, 139),
            SidebarItemHover = Color.FromArgb(248, 250, 252),
            SidebarItemActive = Color.FromArgb(219, 234, 254),
            SidebarItemActiveText = Color.FromArgb(29, 78, 216),
            GridHeaderBackground = Color.FromArgb(191, 219, 254),
            GridHeaderForeground = Color.FromArgb(30, 58, 138),
            GridRowBackground = Color.White,
            GridRowAlternate = Color.FromArgb(219, 234, 254),
            GridRowHover = Color.FromArgb(239, 246, 255),
            GridRowSelected = Color.FromArgb(37, 99, 235),
            GridRowSelectedText = Color.White,
            GridBorder = Color.FromArgb(226, 232, 240),
            InputBackground = Color.White,
            InputBorder = Color.FromArgb(203, 213, 225),
            InputBorderFocus = Color.FromArgb(59, 130, 246),
            OverlayScrim = Color.FromArgb(160, 15, 23, 42),
            Shadow = Color.FromArgb(32, 15, 23, 42),
            ScrollbarThumb = Color.FromArgb(203, 213, 225),
            ScrollbarTrack = Color.FromArgb(248, 250, 252),
            CornerRadiusSmall = 8,
            CornerRadiusMedium = 10,
            GridRowHeight = 34,
            GridHeaderHeight = 32
        };

        public ApothecaPalette()
        {
            Colors.FontRegular12 = new Font("Segoe UI", 12f);
            Colors.FontRegular13 = new Font("Segoe UI", 13f);
            Colors.FontRegular14 = new Font("Segoe UI", 14f);
            Colors.FontSemibold14 = new Font("Segoe UI Semibold", 14f);
            Colors.FontSemibold16 = new Font("Segoe UI Semibold", 16f);
            Colors.FontBold18 = new Font("Segoe UI", 18f, FontStyle.Bold);
        }
    }
}
