<Window x:Class="PSLauncher.App.Views.SettingsLockDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:loc="clr-namespace:PSLauncher.Core.Localization;assembly=PSLauncher.Core"
        Title="{x:Static loc:Strings.SettingsLockedTitle}"
        Icon="pack://application:,,,/Resources/favicon.ico"
        Width="520" Height="360"
        ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner"
        Topmost="True"
        ShowInTaskbar="False"
        Background="{StaticResource Brush.Bg.Window}">
    <Grid Margin="32,28">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   FontSize="18" FontWeight="SemiBold"
                   Foreground="{StaticResource Brush.Text.Primary}">
            <Run Text="🔒  " />
            <Run Text="{x:Static loc:Strings.SettingsLockedTitle}" />
        </TextBlock>

        <TextBlock Grid.Row="1"
                   Text="{x:Static loc:Strings.SettingsLockedBody}"
                   Foreground="{StaticResource Brush.Text.Secondary}"
                   FontSize="12" TextWrapping="Wrap"
                   Margin="0,8,0,12" />

        <PasswordBox Grid.Row="2"
                     x:Name="PasswordInput"
                     Background="#1A1A20"
                     Foreground="{StaticResource Brush.Text.Primary}"
                     BorderBrush="{StaticResource Brush.Border}" BorderThickness="1"
                     Padding="8" FontSize="14"
                     KeyDown="OnPasswordKeyDown" />

        <TextBlock Grid.Row="3"
                   x:Name="ErrorText"
                   Foreground="#FCA5A5"
                   FontSize="11"
                   Margin="0,4,0,0"
                   Visibility="Collapsed"
                   Text="{x:Static loc:Strings.SettingsLockedWrongPassword}" />

        <StackPanel Grid.Row="4" Orientation="Horizontal"
                    HorizontalAlignment="Right" Margin="0,12,0,0">
            <Button Style="{StaticResource SecondaryButton}"
                    Content="{x:Static loc:Strings.ActionCancel}" IsCancel="True"
                    Margin="0,0,12,0"
                    Click="OnCancel" />
            <Button Style="{StaticResource AccentButton}"
                    Content="{x:Static loc:Strings.SettingsLockedUnlock}"
                    Padding="20,8"
                    IsDefault="True"
                    Click="OnUnlock" />
        </StackPanel>
    </Grid>
</Window>
