<Window x:Class="Ink_Canvas.Windows.NewStyleMinimizedTimerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
        Topmost="True"
        ShowInTaskbar="False"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent"
        Width="320" Height="120"
        WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="DigitResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Border x:Name="MainBorder"
            Background="{DynamicResource {x:Static ui:ThemeKeys.CardBackgroundFillColorDefaultBrushKey}}"
            CornerRadius="12"
            BorderThickness="1"
            BorderBrush="{DynamicResource {x:Static ui:ThemeKeys.CardStrokeColorDefaultBrushKey}}"
            MouseLeftButtonDown="MainBorder_MouseLeftButtonDown">
        <Grid>
            <!-- Close button -->
            <Button x:Name="CloseButton"
                    Width="24" Height="24"
                    HorizontalAlignment="Right" VerticalAlignment="Top"
                    Margin="0,6,8,0"
                    Background="Transparent" BorderThickness="0"
                    Click="CloseButton_Click"
                    Cursor="Hand" Opacity="0.7">
                <Button.Template>
                    <ControlTemplate TargetType="Button">
                        <Border Background="{TemplateBinding Background}" CornerRadius="12">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" Value="#E81123"/>
                                <Setter Property="Foreground" Value="White"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Button.Template>
                <TextBlock Text="✕" FontSize="12" FontWeight="Bold"
                           Foreground="{DynamicResource {x:Static ui:ThemeKeys.TextFillColorPrimaryBrushKey}}"
                           HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Button>

            <!-- Digits -->
            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
                <Path x:Name="MinHour1Display" Data="{StaticResource Digit0}" Fill="{DynamicResource NewTimerWindowDigitForeground}" Width="40" Height="40" Stretch="Uniform" Margin="0,0,6,0"/>
                <Path x:Name="MinHour2Display" Data="{StaticResource Digit0}" Fill="{DynamicResource NewTimerWindowDigitForeground}" Width="40" Height="40" Stretch="Uniform" Margin="0,0,6,0"/>
                <TextBlock Text=":" FontSize="28" FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,6,0"
                           Foreground="{DynamicResource NewTimerWindowDigitForeground}"/>
                <Path x:Name="MinMinute1Display" Data="{StaticResource Digit0}" Fill="{DynamicResource NewTimerWindowDigitForeground}" Width="40" Height="40" Stretch="Uniform" Margin="0,0,6,0"/>
                <Path x:Name="MinMinute2Display" Data="{StaticResource Digit0}" Fill="{DynamicResource NewTimerWindowDigitForeground}" Width="40" Height="40" Stretch="Uniform" Margin="0,0,6,0"/>
                <TextBlock Text=":" FontSize="28" FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,6,0"
                           Foreground="{DynamicResource NewTimerWindowDigitForeground}"/>
                <Path x:Name="MinSecond1Display" Data="{StaticResource Digit0}" Fill="{DynamicResource NewTimerWindowDigitForeground}" Width="40" Height="40" Stretch="Uniform" Margin="0,0,6,0"/>
                <Path x:Name="MinSecond2Display" Data="{StaticResource Digit0}" Fill="{DynamicResource NewTimerWindowDigitForeground}" Width="40" Height="40" Stretch="Uniform"/>
            </StackPanel>
        </Grid>
    </Border>
</Window>
