<resources>
    <!-- NoActionBar because we use a Toolbar widget as ActionBar -->
    <style name="KdeConnectThemeBase" parent="Theme.MaterialComponents.DayNight">
        <!-- The main color attributes -->
        <!-- The three colors used by system widgets, according to https://chris.banes.me/2014/10/17/appcompat-v21/ -->
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primaryDark</item>
        <item name="colorSecondary">@color/primary</item>
        <item name="colorOnSecondary">@color/on_secondary</item>
        <item name="colorAccent">@color/accent</item>
        <item name="colorHighContrast">@color/on_high_contrast</item>
        <item name="android:windowBackground">@color/activity_background</item>
        <item name="android:colorBackground">@color/activity_background</item>
        <!-- TODO: The 2 items below change too much (eg snackbar text is now black, should be white) -->
        <item name="android:textColorPrimary">@color/text_color_primary</item>
        <item name="android:textColor">@color/text_color</item>

        <!-- Drawable definitions and overrides -->
        <item name="divider">?colorHighContrast</item>

        <!-- Style overrides -->
        <item name="actionModeStyle">@style/ActionModeStyle</item>
        <item name="toolbarStyle">@style/KdeConnectTheme.Toolbar</item>

        <!-- Theme overrides -->
        <item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
        <item name="popupTheme">@style/ThemeOverlay.AppCompat.DayNight</item>

    </style>

    <style name="KdeConnectTheme" parent="KdeConnectThemeBase" />

    <style name="KdeConnectThemeBase.NoActionBar" parent="KdeConnectTheme">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <style name="KdeConnectTheme.NoActionBar" parent="KdeConnectThemeBase.NoActionBar" />

    <style name="KdeConnectTheme.Toolbar" parent="Widget.AppCompat.Toolbar">
        <item name="android:background">@color/toolbar_color</item>
    </style>

    <style name="MainNavigationView">
        <item name="android:background">@drawable/state_list_drawer_background</item>
        <item name="itemBackground">@drawable/state_list_drawer_background</item>
        <item name="itemIconTint">@color/state_list_drawer_text</item>
        <item name="itemTextColor">@color/state_list_drawer_text</item>
    </style>

    <style name="DisableableButton" parent="ThemeOverlay.AppCompat">
        <item name="colorButtonNormal">@drawable/disableable_button</item>
    </style>

    <style name="ActionModeStyle" parent="Widget.AppCompat.ActionMode">
        <item name="background">@color/primaryDark</item>
    </style>
    <style name="Theme.Transparent" parent="@style/Theme.AppCompat.NoActionBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>

    <style name="AboutButton">
        <item name="android:layout_width">84dp</item>
        <item name="android:layout_height">84dp</item>
        <item name="android:layout_margin">4dp</item>
        <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
    </style>
    <style name="AboutButton.TextView">
        <item name="android:layout_width">84dp</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_gravity">center</item>
        <item name="android:drawablePadding">4dp</item>
        <item name="android:gravity">center</item>
        <item name="android:textSize">12sp</item>
        <item name="drawableTint">@color/text_color</item>
    </style>
</resources>
