<resources>

    <style name="ThemeActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
        <item name="android:background">@null</item>
        <!-- Support library compatibility -->
        <item name="background">@null</item>
    </style>

    <style name="AppTheme.ActionMode" parent="@style/Widget.AppCompat.ActionMode">
        <item name="android:actionModeBackground">@color/colorPrimary</item>
    </style>

    <style name="Theme.Intro" parent="Theme.AppCompat.NoActionBar">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsTranslucent">true</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="primaryText">@color/primary_text</item>
        <item name="secondaryText">@color/secondary_text</item>
        <item name="cardBackground">@color/card_background</item>
        <item name="cardBackgroundFocused">@color/card_background_focused</item>
        <item name="codePrimaryText">@color/code_primary_text</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="background">@color/background</item>

        <item name="iconColorPrimary">@color/icon_primary</item>
        <item name="iconColorInverted">@color/icon_primary_inverted</item>

        <item name="actionModeStyle">@style/ActionModeStyle</item>
        <item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
        <item name="alertDialogTheme">@style/DialogStyle</item>
    </style>

    <style name="ActionModeStyle" parent="@style/Widget.AppCompat.Light.ActionMode.Inverse">
        <item name="background">@color/colorPrimary</item>
        <item name="titleTextStyle">@style/ActionModeTitleTextStyle</item>
        <item name="iconColorPrimary">@color/icon_primary</item>
        <item name="iconColorInverted">@color/icon_primary_inverted</item>
    </style>

    <style name="ActionModeStyle.Dark" parent="@style/Widget.AppCompat.Light.ActionMode.Inverse">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="background">@color/colorPrimary</item>
        <item name="titleTextStyle">@style/ActionModeTitleTextStyle</item>
        <item name="iconColorPrimary">@color/icon_primary</item>
        <item name="iconColorInverted">@color/icon_primary_inverted</item>
        <item name="alertDialogStyle">@style/DialogStyle.Dark</item>
    </style>

    <style name="ActionModeStyle.TrueBlack" parent="@style/Widget.AppCompat.Light.ActionMode.Inverse">
        <item name="colorPrimary">@color/background_true_dark</item>
        <item name="background">@color/background_true_dark</item>
        <item name="titleTextStyle">@style/ActionModeTitleTextStyle</item>
        <item name="iconColorPrimary">@color/icon_primary</item>
        <item name="iconColorInverted">@color/icon_primary_inverted</item>
        <item name="alertDialogStyle">@style/DialogStyle.TrueDark</item>
    </style>

    <style name="ActionModeTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
        <item name="android:textColor">@android:color/white</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <style name="AppTheme.TransparentActionBar">
        <item name="android:actionBarStyle">@style/ThemeActionBar</item>
        <item name="android:windowActionBarOverlay">true</item>
        <!-- Support library compatibility -->
        <item name="actionBarStyle">@style/ThemeActionBar</item>
        <item name="windowActionBarOverlay">true</item>
    </style>

    <style name="AppTheme.Fullscreen" parent="AppTheme.TransparentActionBar">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
    </style>

    <style name="AppTheme.Dark" parent="Theme.AppCompat">
        <item name="primaryText">@color/primary_text_dark</item>
        <item name="secondaryText">@color/secondary_text_dark</item>
        <item name="cardBackground">@color/card_background_dark</item>
        <item name="cardBackgroundFocused">@color/card_background_focused_dark</item>
        <item name="codePrimaryText">@color/code_primary_text_dark</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="background">@color/background_dark</item>

        <item name="iconColorPrimary">@color/icon_primary_dark</item>
        <item name="iconColorInverted">@color/icon_primary_dark_inverted</item>

        <item name="actionModeStyle">@style/ActionModeStyle.Dark</item>
        <item name="alertDialogTheme">@style/DialogStyle.Dark</item>

    </style>

    <style name="AppTheme.TrueBlack" parent="AppTheme.Dark">
        <item name="colorPrimary">@color/background_true_dark</item>
        <item name="cardBackground">@color/background_true_dark</item>
        <item name="background">@color/background_true_dark</item>
        <item name="cardBackgroundFocused">@color/card_background_focused_true_dark</item>
        <item name="colorPrimaryDark">@color/background_true_dark</item>
        <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
        <item name="actionModeStyle">@style/ActionModeStyle.TrueBlack</item>
        <item name="alertDialogTheme">@style/DialogStyle.TrueDark</item>

    </style>

    <style name="AppTheme.TrueBlack.Preferences" parent="AppTheme.TrueBlack">
        <item name="android:windowBackground">@color/background_true_dark</item>
    </style>

    <style name="AppTheme.Dark.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <style name="AppTheme.Dark.TransparentActionBar">
        <item name="android:actionBarStyle">@style/ThemeActionBar</item>
        <item name="android:windowActionBarOverlay">true</item>
        <!-- Support library compatibility -->
        <item name="actionBarStyle">@style/ThemeActionBar</item>
        <item name="windowActionBarOverlay">true</item>
    </style>

    <style name="fab_label_style">
        <item name="android:background">@drawable/fab_label_background</item>
        <item name="android:textColor">#FFFFFF</item>
    </style>

    <style name="DialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
        <item name="android:background">@color/card_background</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="textColorAlertDialogListItem">@color/primary_text</item>
    </style>

    <style name="DialogStyle.Dark" parent="Theme.AppCompat.Dialog">
        <item name="android:background">@color/card_background_dark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="textColorAlertDialogListItem">@color/primary_text_dark</item>

        <!--The following lines are needed because the non-light version of this parent changes the
        min width to 80% or something. Looks weird.-->
        <item name="android:windowMinWidthMajor">97%</item>
        <item name="android:windowMinWidthMinor">97%</item>
    </style>

    <style name="DialogStyle.TrueDark" parent="DialogStyle.Dark">
        <item name="android:background">@color/card_background_focused_true_dark</item>
    </style>

    <style name="AppTheme.NoActionBar.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>
