<Application x:Class="AppTunnel.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/Theme.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <!-- Embedded Persian Font (Vazirmatn) with fallbacks -->
            <FontFamily x:Key="PersianFont">pack://application:,,,/Fonts/#Vazirmatn</FontFamily>
            <FontFamily x:Key="AppFont">pack://application:,,,/Fonts/#Vazirmatn, Segoe UI, Tahoma</FontFamily>

            <!-- Global Font Settings -->
            <Style TargetType="{x:Type Window}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type TextBlock}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type TextBox}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type Button}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type Label}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type ComboBox}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type CheckBox}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type ToolTip}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
                <Setter Property="Background" Value="#252525"/>
                <Setter Property="Foreground" Value="#EEEEEE"/>
                <Setter Property="BorderBrush" Value="#3A3A3A"/>
                <Setter Property="Padding" Value="8,5"/>
            </Style>
            <Style TargetType="{x:Type MenuItem}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
            <Style TargetType="{x:Type ContextMenu}">
                <Setter Property="FontFamily" Value="{StaticResource AppFont}"/>
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>
