<?xml version="1.0" encoding="utf-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary 
        xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

    <Style TargetType="StackLayout" x:Key="ResponsiveStackStyle">
        <Setter Property="Orientation" Value="Horizontal"/>
        <Setter Property="VisualStateManager.VisualStateGroups">
            <VisualStateGroupList>
                <VisualStateGroup x:Name="WidthStates">
                    <VisualState x:Name="Wide">
                        <VisualState.Setters>
                            <Setter TargetName="ResponsiveStack" Property="StackLayout.Orientation" Value="Horizontal" />
                        </VisualState.Setters>
                    </VisualState>
                    <VisualState x:Name="Narrow">
                        <VisualState.Setters>
                            <Setter TargetName="ResponsiveStack" Property="StackLayout.Orientation" Value="Vertical" />
                        </VisualState.Setters>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateGroupList>
        </Setter>
    </Style>

    <Style x:Key="StatusLabelStyle" TargetType="Label" >
        <Style.Triggers>
            <DataTrigger TargetType="Label" Binding="{Binding Status}" Value="New">
                <Setter Property="TextColor" Value="DarkGreen" />
            </DataTrigger>
            <DataTrigger TargetType="Label" Binding="{Binding Status}" Value="InProgress">
                <Setter Property="TextColor" Value="DarkBlue" />
            </DataTrigger>
            <DataTrigger TargetType="Label" Binding="{Binding Status}" Value="Completed">
                <Setter Property="TextColor" Value="LightYellow" />
            </DataTrigger>
            <DataTrigger TargetType="Label" Binding="{Binding Status}" Value="Cancelled">
                <Setter Property="TextColor" Value="DarkRed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="StatusBorderStyle" TargetType="Border">
        <Style.Triggers>
            <DataTrigger TargetType="Border" Binding="{Binding Status}" Value="New">
                <Setter Property="BackgroundColor" Value="LightGreen" />
            </DataTrigger>
            <DataTrigger TargetType="Border" Binding="{Binding Status}" Value="InProgress">
                <Setter Property="BackgroundColor" Value="LightYellow" />
            </DataTrigger>
            <DataTrigger TargetType="Border" Binding="{Binding Status}" Value="Completed">
                <Setter Property="BackgroundColor" Value="DarkGreen" />
            </DataTrigger>
            <DataTrigger TargetType="Border" Binding="{Binding Status}" Value="Cancelled">
                <Setter Property="BackgroundColor" Value="LightCoral" />
            </DataTrigger>
            <DataTrigger TargetType="Border" Binding="{Binding Status}" Value="Winning">
                <Setter Property="BackgroundColor" Value="Yellow" />
            </DataTrigger>
            <DataTrigger TargetType="Border" Binding="{Binding Status}" Value="Winner">
                <Setter Property="BackgroundColor" Value="Red" />
            </DataTrigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="ScoreCellStyle" TargetType="Border">
        <Setter Property="Stroke" Value="Gray" />
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="BackgroundColor" Value="LightGray" />
    </Style>

    <x:String x:Key="ApplicationTitle">
        Gready Poäng
    </x:String>

    <x:Int32 x:Key="DefaultSpacingForGrid">10</x:Int32>

    <Style TargetType="Grid" 
                   x:Key="Grid.Page">
        <Setter Property="ColumnSpacing" Value="{StaticResource DefaultSpacingForGrid}" />
        <Setter Property="RowSpacing" Value="{StaticResource DefaultSpacingForGrid}" />
        <Setter Property="Margin" Value="{StaticResource DefaultSpacingForGrid}" />
        <Setter Property="Padding" Value="{StaticResource DefaultSpacingForGrid}" />
    </Style>

    <Style TargetType="Border"
           x:Key="Border.Page">
        <Setter Property="Stroke" Value="CadetBlue" />
        <Setter Property="BackgroundColor" Value="LightGray" />
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Margin" Value="5" />
        <Setter Property="HorizontalOptions" Value="Fill" />
        <Setter Property="VerticalOptions" Value="Fill" />
    </Style>

    <Style TargetType="Border"
           x:Key="InitialBorder.Page">
        <Setter Property="Stroke" Value="Chartreuse" />
        <Setter Property="BackgroundColor" Value="AntiqueWhite" />
        <Setter Property="StrokeThickness" Value="4" />
        <Setter Property="Margin" Value="5" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="HorizontalOptions" Value="Center" />
        <Setter Property="VerticalOptions" Value="Center" />
    </Style>


    <Style TargetType="Label">
        <Setter Property="VerticalTextAlignment" Value="Center" />
    </Style>

    <Style TargetType="HorizontalStackLayout">
        <Setter Property="Spacing" Value="5" />
    </Style>

    <Style TargetType="Button">
        <Setter Property="WidthRequest" Value="150"/>
        <Setter Property="BackgroundColor" Value="Goldenrod"/>
        <Setter Property="TextColor" Value="White"/>
    </Style>

    <Style TargetType="Button" x:Key="HoverButtonStyle">
        <Setter Property="BackgroundColor" Value="White" />
        <Setter Property="TextColor" Value="DarkGray" />
        <Setter Property="CornerRadius" Value="8" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="FontAttributes" Value="Bold" />
        <Setter Property="VisualStateManager.VisualStateGroups">
            <VisualStateGroupList>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="PointerOver">
                        <VisualState.Setters>
                            <Setter Property="BackgroundColor" Value="LightGray" />
                            <Setter Property="TextColor" Value="Black" />
                        </VisualState.Setters>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <VisualState.Setters>
                            <Setter Property="BackgroundColor" Value="DarkGray" />
                            <Setter Property="TextColor" Value="White" />
                        </VisualState.Setters>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateGroupList>
        </Setter>
    </Style>
    <Style TargetType="Button" x:Key="HoverButtonBlueStyle">
        <Setter Property="BackgroundColor" Value="Blue" />
        <Setter Property="TextColor" Value="DarkGray" />
        <Setter Property="CornerRadius" Value="8" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="FontAttributes" Value="Bold" />
        <Setter Property="VisualStateManager.VisualStateGroups">
            <VisualStateGroupList>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="PointerOver">
                        <VisualState.Setters>
                            <Setter Property="BackgroundColor" Value="LightBlue" />
                            <Setter Property="TextColor" Value="Black" />
                        </VisualState.Setters>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <VisualState.Setters>
                            <Setter Property="BackgroundColor" Value="DarkBlue" />
                            <Setter Property="TextColor" Value="White" />
                        </VisualState.Setters>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateGroupList>
        </Setter>
    </Style>
    <Style TargetType="Button" x:Key="HoverButtonRedStyle">
        <Setter Property="BackgroundColor" Value="Red" />
        <Setter Property="TextColor" Value="DarkGray" />
        <Setter Property="CornerRadius" Value="8" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="FontAttributes" Value="Bold" />
        <Setter Property="VisualStateManager.VisualStateGroups">
            <VisualStateGroupList>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="PointerOver">
                        <VisualState.Setters>
                            <Setter Property="BackgroundColor" Value="Pink" />
                            <Setter Property="TextColor" Value="Black" />
                        </VisualState.Setters>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <VisualState.Setters>
                            <Setter Property="BackgroundColor" Value="DarkRed" />
                            <Setter Property="TextColor" Value="White" />
                        </VisualState.Setters>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateGroupList>
        </Setter>
    </Style>
</ResourceDictionary>