<Window x:Class="AxCopilot.Views.GuideViewerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
        Title="AX Copilot — 가이드"
        Width="920" Height="740"
        WindowStyle="None" AllowsTransparency="True"
        Background="Transparent"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanResizeWithGrip">
    <Border Background="{DynamicResource LauncherBackground}" CornerRadius="12"
            BorderBrush="{DynamicResource BorderColor}" BorderThickness="1"
            Margin="6">
        <Border.Effect>
            <DropShadowEffect BlurRadius="20" ShadowDepth="4" Opacity="0.3" Color="Black" Direction="270"/>
        </Border.Effect>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="44"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <!-- 타이틀바 -->
            <Border Grid.Row="0" CornerRadius="12,12,0,0"
                    Background="{DynamicResource ItemBackground}"
                    MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
                <Grid Margin="16,0,8,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <!-- 좌측: 아이콘 + 제목 -->
                    <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
                        <TextBlock Text="&#xE736;" FontFamily="Segoe MDL2 Assets" FontSize="15"
                                   Foreground="{DynamicResource AccentColor}"
                                   VerticalAlignment="Center" Margin="0,1,10,0"/>
                        <TextBlock x:Name="TitleText" Text="AX Copilot 사용 가이드"
                                   FontSize="14" FontWeight="SemiBold"
                                   Foreground="{DynamicResource PrimaryText}"
                                   VerticalAlignment="Center"/>
                    </StackPanel>

                    <!-- 우측: 최소화, 최대화, 닫기 -->
                    <StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
                        <Border Width="40" Height="40" Background="Transparent" Cursor="Hand"
                                CornerRadius="8"
                                MouseLeftButtonDown="MinBtn_Click"
                                MouseEnter="TitleBtn_Enter" MouseLeave="TitleBtn_Leave">
                            <TextBlock Text="&#xE921;" FontFamily="Segoe MDL2 Assets" FontSize="10"
                                       Foreground="{DynamicResource SecondaryText}"
                                       HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <Border Width="40" Height="40" Background="Transparent" Cursor="Hand"
                                CornerRadius="8"
                                MouseLeftButtonDown="MaxBtn_Click"
                                MouseEnter="TitleBtn_Enter" MouseLeave="TitleBtn_Leave">
                            <TextBlock x:Name="MaxBtnIcon" Text="&#xE922;" FontFamily="Segoe MDL2 Assets" FontSize="10"
                                       Foreground="{DynamicResource SecondaryText}"
                                       HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <Border Width="40" Height="40" Background="Transparent" Cursor="Hand"
                                CornerRadius="8"
                                MouseLeftButtonDown="CloseBtn_Click"
                                MouseEnter="CloseBtnEnter" MouseLeave="TitleBtn_Leave">
                            <TextBlock Text="&#xE711;" FontFamily="Segoe MDL2 Assets" FontSize="10"
                                       Foreground="{DynamicResource SecondaryText}"
                                       HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                    </StackPanel>
                </Grid>
            </Border>

            <!-- WebView2 -->
            <wv2:WebView2 x:Name="GuideBrowser" Grid.Row="1"/>
        </Grid>
    </Border>
</Window>
