<UserControl x:Class="NexusShell.Views.NexusFilesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             FontFamily="Segoe UI Variable Display, Segoe UI">
    <UserControl.Resources>
        <Duration x:Key="NfFastDuration">0:0:0.15</Duration>
        <Duration x:Key="NfMedDuration">0:0:0.2</Duration>

        <LinearGradientBrush x:Key="NfAccentGradient" StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="#668A4FFF" Offset="0"/>
            <GradientStop Color="#4400D9FF" Offset="1"/>
        </LinearGradientBrush>

        <Style x:Key="NfIconPath" TargetType="Path">
            <Setter Property="Stretch" Value="Uniform"/>
            <Setter Property="Stroke" Value="#00D9FF"/>
            <Setter Property="StrokeThickness" Value="1.5"/>
            <Setter Property="Fill" Value="Transparent"/>
            <Setter Property="StrokeStartLineCap" Value="Round"/>
            <Setter Property="StrokeEndLineCap" Value="Round"/>
            <Setter Property="StrokeLineJoin" Value="Round"/>
            <Setter Property="Width" Value="16"/>
            <Setter Property="Height" Value="16"/>
        </Style>

        <Style x:Key="NfGhostButton" TargetType="Button">
            <Setter Property="Height" Value="36"/>
            <Setter Property="MinWidth" Value="36"/>
            <Setter Property="Padding" Value="10,0"/>
            <Setter Property="Margin" Value="0,0,6,0"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Foreground" Value="#E8F0FF"/>
            <Setter Property="Background" Value="#14081428"/>
            <Setter Property="BorderBrush" Value="#33FFFFFF"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Root" CornerRadius="12"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                RenderTransformOrigin="0.5,0.5">
                            <Border.RenderTransform>
                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                            </Border.RenderTransform>
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Root" Property="Background" Value="#2800D9FF"/>
                                <Setter TargetName="Root" Property="BorderBrush" Value="#6600D9FF"/>
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="Root"
                                                             Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                                             To="1.03" Duration="{StaticResource NfFastDuration}"/>
                                            <DoubleAnimation Storyboard.TargetName="Root"
                                                             Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                                             To="1.03" Duration="{StaticResource NfFastDuration}"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="Root"
                                                             Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                                             To="1" Duration="{StaticResource NfFastDuration}"/>
                                            <DoubleAnimation Storyboard.TargetName="Root"
                                                             Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                                             To="1" Duration="{StaticResource NfFastDuration}"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Opacity" Value="0.32"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NfPrimaryButton" TargetType="Button" BasedOn="{StaticResource NfGhostButton}">
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Background" Value="{StaticResource NfAccentGradient}"/>
            <Setter Property="BorderBrush" Value="#8800D9FF"/>
        </Style>

        <Style x:Key="NfNavButton" TargetType="Button">
            <Setter Property="Height" Value="40"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="4,0"/>
            <Setter Property="Margin" Value="0,0,0,3"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Foreground" Value="#D8E6FF"/>
            <Setter Property="FontSize" Value="13"/>
            <Setter Property="FontWeight" Value="Medium"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Root" CornerRadius="12" Background="{TemplateBinding Background}"
                                Padding="{TemplateBinding Padding}" Opacity="1">
                            <ContentPresenter VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Root" Property="Background" Value="#2200D9FF"/>
                                <Setter TargetName="Root" Property="BorderBrush" Value="#4400D9FF"/>
                                <Setter TargetName="Root" Property="BorderThickness" Value="1"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NfPinButton" TargetType="Button">
            <Setter Property="Width" Value="28"/>
            <Setter Property="Height" Value="28"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Root" CornerRadius="8" Background="{TemplateBinding Background}">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Root" Property="Background" Value="#3300D9FF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NfFileRow" TargetType="ListBoxItem">
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Margin" Value="0,0,0,3"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Border x:Name="Root" CornerRadius="12" Padding="12,0"
                                Background="{TemplateBinding Background}"
                                BorderBrush="Transparent" BorderThickness="1">
                            <ContentPresenter VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Root" Property="Background" Value="#1800D9FF"/>
                                <Setter TargetName="Root" Property="BorderBrush" Value="#3300D9FF"/>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter TargetName="Root" Property="Background">
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                            <GradientStop Color="#448A4FFF" Offset="0"/>
                                            <GradientStop Color="#2200D9FF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter TargetName="Root" Property="BorderBrush" Value="#6600D9FF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NfSearchBox" TargetType="TextBox">
            <Setter Property="Height" Value="36"/>
            <Setter Property="Padding" Value="36,0,12,0"/>
            <Setter Property="FontSize" Value="12.5"/>
            <Setter Property="Foreground" Value="#E8F0FF"/>
            <Setter Property="CaretBrush" Value="#00D9FF"/>
            <Setter Property="Background" Value="#0E081428"/>
            <Setter Property="BorderBrush" Value="#4400D9FF"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Border CornerRadius="12" Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid>
                                <ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}"
                                              VerticalAlignment="Center"/>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NfSectionLabel" TargetType="TextBlock">
            <Setter Property="FontSize" Value="10"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Foreground" Value="#6E88B0"/>
            <Setter Property="Margin" Value="6,14,0,8"/>
        </Style>
    </UserControl.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="248"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="272"/>
        </Grid.ColumnDefinitions>

        <!-- LEFT NAV -->
        <Border Grid.Column="0" CornerRadius="18" Padding="12,14"
                Background="#18081428" BorderBrush="#2800D9FF" BorderThickness="1"
                Margin="0,0,12,0">
            <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
                <StackPanel>
                    <TextBlock Text="FAVORITTER" Style="{StaticResource NfSectionLabel}" Margin="6,0,0,8"/>
                    <ItemsControl ItemsSource="{Binding FavoriteItems}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Grid Margin="0,0,0,2">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Button Grid.Column="0" Style="{StaticResource NfNavButton}"
                                            Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                            CommandParameter="{Binding TargetPath}">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Width="32" Height="32" CornerRadius="10" Margin="0,0,8,0">
                                                <Border.Background>
                                                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                                        <GradientStop Color="#338A4FFF" Offset="0"/>
                                                        <GradientStop Color="#2200D9FF" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                                <Path Data="{Binding IconPath}" Style="{StaticResource NfIconPath}"
                                                      Width="14" Height="14"/>
                                            </Border>
                                            <TextBlock Grid.Column="1" Text="{Binding Label}" VerticalAlignment="Center"/>
                                        </Grid>
                                    </Button>
                                    <Button Grid.Column="1" Style="{StaticResource NfPinButton}"
                                            Command="{Binding DataContext.TogglePinCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                            CommandParameter="{Binding Id}"
                                            ToolTip="Frigør favorit" VerticalAlignment="Center">
                                        <Path Data="M12,4 L12,10 M8,10 L16,10 L14,20 L10,20 Z"
                                              Style="{StaticResource NfIconPath}" Width="12" Height="12" Stroke="#8CA3C7"/>
                                    </Button>
                                </Grid>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>

                    <TextBlock Text="DENNE PC" Style="{StaticResource NfSectionLabel}"/>
                    <ItemsControl ItemsSource="{Binding ThisPcItems}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Button Style="{StaticResource NfNavButton}"
                                        Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                        CommandParameter="{Binding TargetPath}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <Border Grid.Column="0" Width="32" Height="32" CornerRadius="10" Margin="0,0,8,0">
                                            <Border.Background>
                                                <SolidColorBrush Color="#2200D9FF"/>
                                            </Border.Background>
                                            <Path Data="{Binding IconPath}" Style="{StaticResource NfIconPath}"
                                                  Width="14" Height="14"/>
                                        </Border>
                                        <TextBlock Grid.Column="1" Text="{Binding Label}" VerticalAlignment="Center">
                                            <TextBlock.Style>
                                                <Style TargetType="TextBlock">
                                                    <Setter Property="Margin" Value="0"/>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding IsIndented}" Value="True">
                                                            <Setter Property="Margin" Value="4,0,0,0"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </TextBlock.Style>
                                        </TextBlock>
                                    </Grid>
                                </Button>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>

                    <TextBlock Text="NEXUS" Style="{StaticResource NfSectionLabel}"/>
                    <ItemsControl ItemsSource="{Binding NexusItems}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Button Style="{StaticResource NfNavButton}"
                                        Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                        CommandParameter="{Binding TargetPath}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <Border Grid.Column="0" Width="32" Height="32" CornerRadius="10" Margin="0,0,8,0">
                                            <Border.Background>
                                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                                    <GradientStop Color="#448A4FFF" Offset="0"/>
                                                    <GradientStop Color="#3300D9FF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <Path Data="{Binding IconPath}" Style="{StaticResource NfIconPath}"
                                                  Width="14" Height="14"/>
                                        </Border>
                                        <TextBlock Grid.Column="1" Text="{Binding Label}" VerticalAlignment="Center"/>
                                    </Grid>
                                </Button>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </StackPanel>
            </ScrollViewer>
        </Border>

        <!-- CENTER -->
        <Border Grid.Column="1" CornerRadius="18"
                Background="#14081428" BorderBrush="#2800D9FF" BorderThickness="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <!-- Toolbar + search -->
                <Grid Grid.Row="0" Margin="14,14,14,10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="220"/>
                    </Grid.ColumnDefinitions>

                    <StackPanel Grid.Column="0" Orientation="Horizontal">
                        <Button Style="{StaticResource NfGhostButton}" Command="{Binding GoBackCommand}" ToolTip="Tilbage">
                            <Path Data="M14,6 L8,12 L14,18" Style="{StaticResource NfIconPath}"/>
                        </Button>
                        <Button Style="{StaticResource NfGhostButton}" Command="{Binding GoForwardCommand}" ToolTip="Frem">
                            <Path Data="M10,6 L16,12 L10,18" Style="{StaticResource NfIconPath}"/>
                        </Button>
                        <Button Style="{StaticResource NfGhostButton}" Command="{Binding GoUpCommand}" ToolTip="Op">
                            <Path Data="M12,18 L12,6 M6,12 L12,6 L18,12" Style="{StaticResource NfIconPath}"/>
                        </Button>
                        <Button Style="{StaticResource NfGhostButton}" Command="{Binding RefreshCommand}" ToolTip="Opdater">
                            <Path Data="M12,4 A8,8 0 1,1 4,12 M4,12 L4,8 M4,12 L8,12" Style="{StaticResource NfIconPath}"/>
                        </Button>
                        <Border Width="1" Height="22" Background="#33FFFFFF" Margin="4,7,10,7"/>
                        <Button Style="{StaticResource NfPrimaryButton}" Command="{Binding OpenSelectedCommand}"
                                ToolTip="Åbn valgt" Content="Åbn" MinWidth="68"/>
                    </StackPanel>

                    <Grid Grid.Column="2">
                        <TextBox Style="{StaticResource NfSearchBox}"
                                 Text="{Binding SearchQuery, UpdateSourceTrigger=PropertyChanged}"
                                 Tag="Søg i mappen"/>
                        <Path Data="M10,4 A6,6 0 1,0 10,16 A6,6 0 1,0 10,4 M16,16 L20,20"
                              Style="{StaticResource NfIconPath}" Width="14" Height="14"
                              HorizontalAlignment="Left" Margin="12,0,0,0" IsHitTestVisible="False" Opacity="0.7"/>
                    </Grid>
                </Grid>

                <!-- Glass path bar -->
                <Border Grid.Row="1" Margin="14,0,14,10" Padding="12,9" CornerRadius="14"
                        Background="#0E081428" BorderBrush="#4400D9FF" BorderThickness="1">
                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
                        <ItemsControl ItemsSource="{Binding Breadcrumbs}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal"/>
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Button Background="Transparent" BorderThickness="0" Cursor="Hand"
                                                Padding="4,2" Command="{Binding DataContext.NavigateSegmentCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                CommandParameter="{Binding Path}">
                                            <TextBlock Text="{Binding Label}" FontSize="12.5">
                                                <TextBlock.Style>
                                                    <Style TargetType="TextBlock">
                                                        <Setter Property="Foreground" Value="#8CA3C7"/>
                                                        <Setter Property="FontWeight" Value="Normal"/>
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding IsLast}" Value="True">
                                                                <Setter Property="Foreground" Value="#E8F0FF"/>
                                                                <Setter Property="FontWeight" Value="SemiBold"/>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </TextBlock.Style>
                                            </TextBlock>
                                        </Button>
                                        <TextBlock Text="›" Foreground="#556A8A" FontSize="13"
                                                   VerticalAlignment="Center" Margin="2,0,4,0">
                                            <TextBlock.Style>
                                                <Style TargetType="TextBlock">
                                                    <Setter Property="Visibility" Value="Visible"/>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding IsLast}" Value="True">
                                                            <Setter Property="Visibility" Value="Collapsed"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </TextBlock.Style>
                                        </TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </ScrollViewer>
                </Border>

                <!-- Column headers -->
                <Border Grid.Row="2" Margin="10,0,10,6" Padding="12,0" CornerRadius="12"
                        Background="#22081428" BorderBrush="#1800D9FF" BorderThickness="1" Height="36">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2.4*"/>
                            <ColumnDefinition Width="0.9*"/>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="1.1*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="Navn" Foreground="#6E88B0" FontSize="11"
                                   FontWeight="Bold" VerticalAlignment="Center"/>
                        <TextBlock Grid.Column="1" Text="Type" Foreground="#6E88B0" FontSize="11"
                                   FontWeight="Bold" VerticalAlignment="Center"/>
                        <TextBlock Grid.Column="2" Text="Størrelse" Foreground="#6E88B0" FontSize="11"
                                   FontWeight="Bold" VerticalAlignment="Center"/>
                        <TextBlock Grid.Column="3" Text="Ændret" Foreground="#6E88B0" FontSize="11"
                                   FontWeight="Bold" VerticalAlignment="Center"/>
                    </Grid>
                </Border>

                <!-- File list -->
                <ListBox Grid.Row="3" Margin="6,0,6,8"
                         ItemsSource="{Binding Items}"
                         SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                         ItemContainerStyle="{StaticResource NfFileRow}"
                         BorderThickness="0" Background="Transparent"
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                         MouseDoubleClick="FileList_OnMouseDoubleClick">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid Height="42">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="2.4*"/>
                                    <ColumnDefinition Width="0.9*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1.1*"/>
                                </Grid.ColumnDefinitions>
                                <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
                                    <Border Width="28" Height="28" CornerRadius="8" Margin="0,0,10,0">
                                        <Border.Style>
                                            <Style TargetType="Border">
                                                <Setter Property="Background">
                                                    <Setter.Value>
                                                        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                                            <GradientStop Color="#338A4FFF" Offset="0"/>
                                                            <GradientStop Color="#2200D9FF" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Setter.Value>
                                                </Setter>
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsDirectory}" Value="False">
                                                        <Setter Property="Background">
                                                            <Setter.Value>
                                                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                                                    <GradientStop Color="#22445588" Offset="0"/>
                                                                    <GradientStop Color="#22334466" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Border.Style>
                                        <Path Data="{Binding IconPath}" Style="{StaticResource NfIconPath}"
                                              Width="13" Height="13"/>
                                    </Border>
                                    <TextBlock Text="{Binding Name}" Foreground="#F0F6FF" FontSize="13"
                                               FontWeight="Medium" VerticalAlignment="Center"
                                               TextTrimming="CharacterEllipsis"/>
                                </StackPanel>
                                <TextBlock Grid.Column="1" Text="{Binding KindLabel}" Foreground="#7A9BC8"
                                           FontSize="12" VerticalAlignment="Center"/>
                                <TextBlock Grid.Column="2" Text="{Binding SizeLabel}" Foreground="#8CA3C7"
                                           FontSize="12" VerticalAlignment="Center"/>
                                <TextBlock Grid.Column="3" Text="{Binding ModifiedLabel}" Foreground="#8CA3C7"
                                           FontSize="12" VerticalAlignment="Center"/>
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

                <!-- Footer -->
                <Border Grid.Row="4" Padding="14,10" BorderBrush="#2200D9FF" BorderThickness="0,1,0,0">
                    <TextBlock Text="{Binding StatusMessage}" Foreground="#8CA3C7" FontSize="12"/>
                </Border>
            </Grid>
        </Border>

        <!-- RIGHT PREVIEW -->
        <Border Grid.Column="2" CornerRadius="18" Padding="18,20"
                Background="#18081428" BorderBrush="#2800D9FF" BorderThickness="1"
                Margin="12,0,0,0">
            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                <Border Width="72" Height="72" CornerRadius="20" Margin="0,0,0,16"
                        HorizontalAlignment="Center">
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                            <GradientStop Color="#448A4FFF" Offset="0"/>
                            <GradientStop Color="#3300D9FF" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.Background>
                    <Path Data="{Binding PreviewState.IconPath}" Style="{StaticResource NfIconPath}"
                          Width="32" Height="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </Border>
                <TextBlock Text="{Binding PreviewState.Title}" Foreground="#F0F6FF" FontSize="15"
                           FontWeight="SemiBold" TextAlignment="Center" TextWrapping="Wrap" MaxWidth="220"/>
                <TextBlock Text="{Binding PreviewState.Subtitle}" Foreground="#8CA3C7" FontSize="12"
                           TextAlignment="Center" TextWrapping="Wrap" MaxWidth="220" Margin="0,8,0,0"/>
                <Border CornerRadius="12" Padding="12,8" Margin="0,20,0,0"
                        Background="#0E081428" BorderBrush="#3300D9FF" BorderThickness="1">
                    <TextBlock Text="Forhåndsvisning kommer i Phase 2" Foreground="#556A8A" FontSize="11"
                               TextAlignment="Center" TextWrapping="Wrap" MaxWidth="200"/>
                </Border>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
