<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">

    <!--============-->
    <!-- Base Theme -->
    <!--============-->
    <style name="Theme"/>

    <style name="Theme.Base" parent="Theme.MaterialComponents.DayNight.NoActionBar">
        <item name="android:forceDarkAllowed" tools:targetApi="29">false</item>
        <item name="android:enforceNavigationBarContrast" tools:targetApi="29">false</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="colorPrimary">@color/app_color_primary</item>
        <item name="colorPrimaryVariant">@color/colorPrimary</item>
        <item name="colorSecondary">@color/background</item>
        <item name="colorPrimaryDark">?colorPrimary</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="colorAccentText">@color/colorAccentText</item>
        <item name="colorControlActivated">?colorAccent</item>
        <item name="android:textColorPrimary">@color/textColorPrimary</item>
        <item name="android:textColorSecondary">@color/text_color_secondary</item>
        <item name="android:textColorHint">@color/text_color_hint</item>
        <item name="android:textColorPrimaryInverse">@color/textColorPrimaryInverse</item>
        <item name="android:textColorSecondaryInverse">@color/text_color_inverse_secondary</item>
        <item name="android:textColorHintInverse">@color/text_color_inverse_hint</item>
        <item name="android:colorBackground">@color/background</item>
        <item name="readerBackground">@color/colorPrimary</item>
        <item name="android:listSelector">?colorAccent</item>
        <item name="android:divider">@color/divider</item>
        <item name="android:listDivider">@drawable/line_divider</item>
        <item name="actionModeStyle">@style/CustomActionModeStyle</item>
        <item name="colorOnAccent">@color/md_white_1000</item>

        <!-- Themes -->
        <item name="windowActionModeOverlay">true</item>
        <item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
        <item name="preferenceTheme">@style/PreferenceThemeOverlay</item>

        <!-- Custom Attributes-->
        <item name="actionBarTintColor">?android:textColorPrimary</item>
        <item name="tabBarIconColor">?colorAccent</item>
        <item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
        <item name="android:statusBarColor">@color/status_bar</item>
        <item name="android:navigationBarColor">#B3000000</item>
        <item name="android:colorEdgeEffect">?colorAccent</item>
        <item name="tabHighlightBackground">@color/accent_alpha</item>

        <!-- Material Dialog colors -->
        <item name="md_color_title">?android:attr/textColorPrimary</item>
        <item name="md_color_content">?android:textColorSecondary</item>
        <item name="md_color_button_text">?colorAccent</item>
        <item name="md_background_color">?android:attr/colorBackground</item>
        <item name="md_button_casing">literal</item>
        <item name="md_corner_radius">16dp</item>

        <item name="android:windowLightStatusBar">true</item>
        <item name="android:windowLightNavigationBar" tools:targetApi="27">true</item>
    </style>

    <style name="Theme.Tachiyomi" parent="Theme.Base"/>
    <style name="Theme.Tachiyomi.AllBlue">
        <item name="colorPrimaryVariant">@color/app_color_primary</item>
        <item name="colorSecondary">@color/app_color_primary</item>
        <item name="tabBarIconColor">@color/md_white_1000</item>
        <item name="tabBarIconInactive">@color/md_white_1000_50</item>
        <item name="tabHighlightBackground">@color/md_white_1000_50</item>
        <item name="actionBarTintColor">@color/md_white_1000</item>
        <item name="actionBarTheme">@style/Theme.ActionBar.Dark.DayNight</item>
        <item name="android:windowLightStatusBar">false</item>
        <item name="android:windowLightNavigationBar" tools:targetApi="27">false</item>
    </style>

    <style name="ThemeOverlay.Tachiyomi.AllBlue" parent="">
        <item name="colorPrimaryVariant">@color/app_color_primary</item>
        <item name="colorSecondary">@color/app_color_primary</item>
        <item name="actionBarTintColor">@color/md_white_1000</item>
        <item name="android:windowLightStatusBar">false</item>
        <item name="android:windowLightNavigationBar" tools:targetApi="27">false</item>
    </style>
    <style name="ThemeOverlay.Tachiyomi.Amoled" parent=""/>
    <style name="Theme.Tachiyomi.ChocolateStrawberries"/>
    <style name="Theme.Tachiyomi.FlatLime"/>
    <style name="Theme.Tachiyomi.MidnightDusk">
        <item name="colorPrimary">@color/primaryDuskDawn</item>
        <item name="colorAccent">@color/colorAccentDuskDawn</item>
        <item name="colorAccentText">@color/colorAccentDuskDawnText</item>
        <item name="colorPrimaryVariant">@color/dialogDuskDawn</item>
        <item name="colorSecondary">@color/backgroundDuskDawn</item>
        <item name="background">@color/backgroundDuskDawn</item>
        <item name="android:textColorPrimary">@color/textPrimaryDuskDawn</item>
        <item name="android:colorBackground">@color/backgroundDuskDawn</item>
        <item name="actionBarTintColor">@color/appBarTextDuskDawn</item>
    </style>
    <style name="Theme.Tachiyomi.StrawberryDaiquiri">
        <item name="colorAccent">@color/colorAccentStrawberry</item>
        <item name="colorAccentText">@color/colorAccentStrawberryText</item>
    </style>
    <style name="Theme.Tachiyomi.Yotsuba">
        <item name="colorAccent">@color/colorAccentYotsuba</item>
        <item name="colorAccentText">@color/colorAccentYotsubaText</item>
    </style>

    <!--===============-->
    <!-- Launch Screen -->
    <!--===============-->
    <style name="Theme.Splash" parent="Theme.Tachiyomi">
        <item name="android:windowBackground">@drawable/splash_background</item>
        <item name="android:statusBarColor">@color/splashBackground</item>
        <item name="android:navigationBarColor">@color/splashBackground</item>
        <item name="android:windowLightStatusBar">false</item>
        <item name="android:windowLightNavigationBar" tools:targetApi="27">false</item>
    </style>

    <style name="Theme.OSS" parent="Theme.MaterialComponents.DayNight">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@android:color/black</item>
        <item name="android:colorEdgeEffect">@color/colorAccent</item>
    </style>
</resources>
