<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ctl="using:ClaudeDo.Ui.Views.Controls">
  <ControlTheme x:Key="{x:Type ctl:ModalShell}" TargetType="ctl:ModalShell">
    <Setter Property="Template">
      <ControlTemplate>
        <Border Background="{DynamicResource SurfaceBrush}"
                BorderBrush="{DynamicResource LineBrush}"
                BorderThickness="1"
                CornerRadius="{DynamicResource ModalCornerRadius}"
                ClipToBounds="True">
          <DockPanel>
            <Border Name="PART_TitleBar" DockPanel.Dock="Top" Height="36"
                    Background="{DynamicResource DeepBrush}"
                    BorderBrush="{DynamicResource LineBrush}"
                    BorderThickness="0,0,0,1">
              <Grid ColumnDefinitions="*,Auto" Margin="14,0">
                <TextBlock Text="{TemplateBinding Title}"
                           FontFamily="{DynamicResource MonoFont}"
                           FontSize="{DynamicResource FontSizeMono}"
                           LetterSpacing="1.4"
                           Foreground="{DynamicResource TextBrush}"
                           VerticalAlignment="Center"/>
                <Button Grid.Column="1" Classes="icon-btn" Content="✕"
                        FontSize="{DynamicResource FontSizeBody}"
                        Command="{TemplateBinding CloseCommand}"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
            <Border Name="PART_Footer" DockPanel.Dock="Bottom"
                    Background="{DynamicResource DeepBrush}"
                    BorderBrush="{DynamicResource LineBrush}"
                    BorderThickness="0,1,0,0"
                    IsVisible="{TemplateBinding Footer, Converter={x:Static ObjectConverters.IsNotNull}}">
              <ContentPresenter Content="{TemplateBinding Footer}" Margin="16,8"/>
            </Border>
            <ContentPresenter Content="{TemplateBinding Content}"/>
          </DockPanel>
        </Border>
      </ControlTemplate>
    </Setter>
  </ControlTheme>
</ResourceDictionary>
