<?xml version="1.0" encoding="utf-8"?>

<resources xmlns:tools="http://schemas.android.com/tools">

    <style name="Signal.Transparent" parent="Theme.AppCompat">
        <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="Theme.Signal.DayNight.NoActionBar" parent="TextSecure.LightNoActionBar">
    </style>

    <style name="TextSecure.LightNoActionBar" parent="@style/TextSecure.BaseLightNoActionBar">
        <!-- leave empty to allow overriding -->
    </style>

    <style name="TextSecure.BaseLightNoActionBar" parent="@style/TextSecure.LightTheme">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionModeOverlay">true</item>

        <item name="theme_type">light</item>
        <item name="colorPrimary">@color/core_ultramarine</item>
        <item name="colorPrimaryDark">@color/core_ultramarine</item>
        <item name="colorAccent">@color/core_ultramarine</item>
    </style>

    <style name="TextSecure.DarkNoActionBar" parent="@style/TextSecure.BaseDarkNoActionBar">
        <!-- leave empty to allow overriding -->
    </style>

    <style name="TextSecure.BaseMediaPreview" parent="@style/TextSecure.BaseDarkNoActionBar">
        <item name="colorPrimaryDark">@color/media_preview_bar_background</item>
        <item name="android:textColorSecondary">@color/white</item>
    </style>

    <style name="TextSecure.MediaPreview" parent="@style/TextSecure.BaseMediaPreview">
        <!-- leave empty to allow overriding -->
    </style>

    <style name="TextSecure.BaseDarkNoActionBar" parent="@style/TextSecure.BaseDarkTheme">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionModeOverlay">true</item>

        <item name="theme_type">dark</item>
        <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
        <item name="colorPrimary">@color/core_grey_95</item>
        <item name="colorAccent">@color/core_ultramarine_light</item>
    </style>

    <style name="Signal.Light.NoActionBar.Invite" parent="Base.Signal.Light.NoActionBar.Invite">
        <!-- Empty for override -->
    </style>

    <style name="Base.Signal.Light.NoActionBar.Invite" parent="@style/TextSecure.LightNoActionBar">
        <item name="contact_filter_toolbar_icon_tint">@color/signal_text_toolbar_subtitle</item>
    </style>

    <style name="Signal.NoActionBar.Invite" parent="Base.Signal.NoActionBar.Invite">
        <!-- Empty for override -->
    </style>

    <style name="Base.Signal.NoActionBar.Invite" parent="@style/TextSecure.DarkNoActionBar">
        <item name="contact_filter_toolbar_icon_tint">@color/signal_text_toolbar_subtitle</item>
    </style>

    <style name="TextSecure.LightIntroTheme" parent="@style/Theme.AppCompat.Light">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionModeOverlay">true</item>
        <item name="colorAccent">@color/core_ultramarine</item>

        <item name="android:textColorHint">#cc000000</item>
        <item name="android:windowBackground">@color/white</item>
    </style>

    <style name="TextSecure.DarkIntroTheme" parent="@style/Theme.AppCompat">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionModeOverlay">true</item>
        <item name="colorAccent">@color/core_ultramarine_light</item>

        <item name="android:textColorHint">@color/white</item>
        <item name="android:windowBackground">@color/core_grey_95</item>
    </style>

    <style name="TextSecure.LightTheme.Popup" parent="TextSecure.LightTheme">
        <item name="android:windowIsFloating">false</item>
        <item name="android:windowSoftInputMode">stateUnchanged</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowActionModeOverlay">true</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowFrame">@null</item>
        <item name="android:windowAnimationStyle">@style/PopupAnimation</item>
        <item name="android:windowCloseOnTouchOutside">true</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>

    <style name="TextSecure.LightTheme" parent="TextSecure.BaseLightTheme">
        <!-- Allows for Overrides -->
    </style>

    <style name="TextSecure.BaseLightTheme" parent="@style/Theme.MaterialComponents.Light.Bridge">
        <item name="theme_type">light</item>

        <item name="search_view_style">@style/Signal.SearchView</item>
        <item name="search_view_style_dark">@style/Signal.SearchView.Dark</item>

        <item name="bottomSheetDialogTheme">@style/Theme.Design.Light.BottomSheetDialog</item>

        <item name="actionBarStyle">@style/TextSecure.LightActionBar</item>
        <item name="actionBarTabBarStyle">@style/TextSecure.LightActionBar.TabBar</item>
        <item name="actionModeBackground">@color/signal_background_secondary</item>
        <item name="actionModeCloseDrawable">@drawable/ic_x_tinted</item>
        <item name="actionModeStyle">@style/TextSecure.ActionModeStyle</item>
        <item name="android:textColor">@color/text_color_light_theme</item>
        <item name="android:textColorSecondary">@color/text_color_secondary_light_theme</item>
        <item name="colorPrimary">@color/core_ultramarine</item>
        <item name="colorPrimaryDark">@color/core_ultramarine</item>
        <item name="colorAccent">@color/core_ultramarine</item>
        <item name="colorControlActivated">@color/core_ultramarine</item>
        <item name="colorControlHighlight">@color/core_ultramarine</item>
        <item name="android:windowBackground">@color/white</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
        <item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
        <item name="homeAsUpIndicator">@drawable/ic_arrow_left_24</item>
        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_left_24</item>

        <item name="contact_filter_toolbar_icon_tint">@color/signal_icon_tint_primary</item>

        <item name="emoji_category_recent">@drawable/ic_recent_20</item>
        <item name="emoji_category_people">@drawable/ic_emoji_people_20</item>
        <item name="emoji_category_nature">@drawable/ic_emoji_animal_20</item>
        <item name="emoji_category_foods">@drawable/ic_emoji_food_20</item>
        <item name="emoji_category_activity">@drawable/ic_emoji_activity_20</item>
        <item name="emoji_category_places">@drawable/ic_emoji_travel_20</item>
        <item name="emoji_category_objects">@drawable/ic_emoji_object_20</item>
        <item name="emoji_category_symbols">@drawable/ic_emoji_symbol_20</item>
        <item name="emoji_category_flags">@drawable/ic_emoji_flag_20</item>
        <item name="emoji_category_emoticons">@drawable/ic_emoji_emoticon_20</item>

        <item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>

        <item name="chipStyle">@style/Signal.Chip.Action.Light</item>

        <item name="colorControlNormal">@color/core_grey_90</item>


    </style>

    <style name="TextSecure.DarkTheme" parent="@style/TextSecure.BaseDarkTheme">
        <!-- leave empty to allow overriding -->
    </style>

    <style name="TextSecure.BaseDarkTheme" parent="@style/Theme.MaterialComponents.Bridge">
        <item name="theme_type">dark</item>

        <item name="search_view_style">@style/Signal.SearchView</item>
        <item name="search_view_style_dark">@style/Signal.SearchView.Dark</item>

        <item name="bottomSheetDialogTheme">@style/Theme.Design.BottomSheetDialog</item>

        <item name="actionBarStyle">@style/TextSecure.DarkActionBar</item>
        <item name="actionBarTabBarStyle">@style/TextSecure.DarkActionBar.TabBar</item>
        <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
        <item name="actionModeBackground">@color/signal_background_secondary</item>
        <item name="actionModeCloseDrawable">@drawable/ic_x_tinted</item>
        <item name="actionModeStyle">@style/TextSecure.ActionModeStyle</item>
        <item name="android:textColor">@color/text_color_dark_theme</item>
        <item name="android:textColorSecondary">@color/text_color_secondary_dark_theme</item>
        <item name="colorAccent">@color/core_ultramarine_light</item>
        <item name="colorControlActivated">@color/core_ultramarine_light</item>
        <item name="colorControlHighlight">@color/core_ultramarine_light</item>
        <item name="android:colorControlHighlight" tools:ignore="NewApi">@color/core_ultramarine_light</item>
        <item name="android:windowBackground">@color/core_grey_95</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="alertDialogTheme">@style/AppCompatAlertDialogStyleDark</item>
        <item name="android:alertDialogTheme">@style/AppCompatDialogStyleDark</item>
        <item name="homeAsUpIndicator">@drawable/ic_arrow_left_24</item>
        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_left_24</item>

        <item name="contact_filter_toolbar_icon_tint">@color/signal_icon_tint_primary</item>

        <item name="emoji_category_recent">@drawable/ic_recent_20</item>
        <item name="emoji_category_people">@drawable/ic_emoji_people_20</item>
        <item name="emoji_category_nature">@drawable/ic_emoji_animal_20</item>
        <item name="emoji_category_foods">@drawable/ic_emoji_food_20</item>
        <item name="emoji_category_activity">@drawable/ic_emoji_activity_20</item>
        <item name="emoji_category_places">@drawable/ic_emoji_travel_20</item>
        <item name="emoji_category_objects">@drawable/ic_emoji_object_20</item>
        <item name="emoji_category_symbols">@drawable/ic_emoji_symbol_20</item>
        <item name="emoji_category_flags">@drawable/ic_emoji_flag_20</item>
        <item name="emoji_category_emoticons">@drawable/ic_emoji_emoticon_20</item>

        <item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>

        <item name="chipStyle">@style/Signal.Chip.Action</item>

        <item name="colorControlNormal">@color/core_white</item>
    </style>

    <style name="Theme.Signal.AlertDialog.Light.Cornered" parent="Theme.AppCompat.Light.Dialog.Alert">
        <item name="android:windowBackground">@drawable/dialog_corners</item>
    </style>

    <style name="Theme.Signal.AlertDialog.Dark.Cornered" parent="Theme.AppCompat.Dialog.Alert">
        <item name="android:windowBackground">@drawable/dialog_corners</item>
    </style>

    <style name="Theme.Signal.AlertDialog.Light.Cornered.ColoredAccent">
        <item name="colorAccent">@color/core_ultramarine</item>
    </style>

    <style name="Theme.Signal.AlertDialog.Dark.Cornered.ColoredAccent">
        <item name="colorAccent">@color/core_ultramarine_light</item>
    </style>


    <style name="Theme.Signal.Insights.Modal" parent="@style/Theme.AppCompat.Dialog.MinWidth">
    </style>

    <style name="TextSecure.MediaSendProgressDialog" parent="@android:style/Theme.Dialog">
        <item name="android:background">@color/core_grey_95</item>
    </style>

    <style name="TextSecure.LightRegistrationTheme" parent="TextSecure.LightNoActionBar">
    </style>

    <style name="TextSecure.DarkRegistrationTheme" parent="TextSecure.DarkNoActionBar">
    </style>

    <style name="TextSecure.FullScreenMedia" parent="TextSecure.DarkNoActionBar">
        <item name="android:windowFullscreen">true</item>
    </style>

    <style name="TextSecure.LightNoActionBar.DarkToolbar" parent="TextSecure.LightNoActionBar">
        <item name="android:windowLightStatusBar" tools:ignore="NewApi">false</item>
        <item name="homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="collapseIcon">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:collapseIcon" tools:ignore="NewApi">@drawable/ic_arrow_left_conversation_24</item>
    </style>

    <style name="TextSecure.DarkNoActionBar.DarkToolbar" parent="TextSecure.DarkNoActionBar">
        <item name="android:windowLightStatusBar" tools:ignore="NewApi">false</item>
        <item name="homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="collapseIcon">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:collapseIcon" tools:ignore="NewApi">@drawable/ic_arrow_left_conversation_24</item>
    </style>

    <style name="TextSecure.LightTheme.Conversation">
        <item name="android:actionBarStyle">@style/TextSecure.DarkActionBar.Conversation</item>
        <item name="actionBarStyle">@style/TextSecure.DarkActionBar.Conversation</item>
        <item name="android:windowLightStatusBar" tools:ignore="NewApi">false</item>
        <item name="homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="collapseIcon">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:collapseIcon" tools:ignore="NewApi">@drawable/ic_arrow_left_conversation_24</item>
    </style>

    <style name="TextSecure.DarkTheme.Conversation">
        <item name="android:actionBarStyle">@style/TextSecure.DarkActionBar.Conversation</item>
        <item name="actionBarStyle">@style/TextSecure.DarkActionBar.Conversation</item>
        <item name="android:windowLightStatusBar" tools:ignore="NewApi">false</item>
        <item name="homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_left_conversation_24</item>
        <item name="collapseIcon">@drawable/ic_arrow_left_conversation_24</item>
        <item name="android:collapseIcon" tools:ignore="NewApi">@drawable/ic_arrow_left_conversation_24</item>
    </style>

    <style name="TextSecure.DarkTheme.WebRTCCall">
        <item name="android:statusBarColor" tools:ignore="NewApi">@color/core_ultramarine</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowLightStatusBar" tools:ignore="NewApi">false</item>
        <item name="android:navigationBarColor" tools:ignore="NewApi">@color/core_black</item>
        <item name="android:windowLightNavigationBar" tools:ignore="NewApi">false</item>
    </style>

    <style name="Theme.Signal.Light.BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
    </style>

    <style name="Theme.Signal.BottomSheetDialog" parent="Theme.Design.BottomSheetDialog">
    </style>

    <style name="Theme.Signal.Light.BottomSheetDialog.Fixed">
        <item name="android:windowIsFloating">false</item>
    </style>

    <style name="Theme.Signal.BottomSheetDialog.Fixed" parent="Theme.Design.BottomSheetDialog">
        <item name="android:windowIsFloating">false</item>
    </style>

    <style name="Theme.Signal.BottomSheetDialog.Fixed.ReactWithAny">
        <item name="bottomSheetStyle">@style/Widget.Signal.BottomSheet.ReactWithAny</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>

    <style name="Theme.Signal.Light.BottomSheetDialog.Fixed.ReactWithAny">
        <item name="bottomSheetStyle">@style/Widget.Signal.BottomSheet.ReactWithAny.Light</item>
        <item name="android:backgroundDimEnabled">false</item>
        <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.BottomSheet.Rounded</item>
    </style>

    <style name="Signal.DayNight.Dialog.Animated" parent="Signal.DayNight">
        <item name="android:windowAnimationStyle">@style/FadeScale</item>
    </style>

    <style name="Widget.Signal.BottomSheet.ReactWithAny" parent="Widget.MaterialComponents.BottomSheet">
        <item name="backgroundTint">@color/core_grey_75</item>
        <item name="behavior_peekHeight">@dimen/react_with_any_emoji_bottom_sheet_dialog_fragment_min_height</item>
        <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.BottomSheet.Rounded</item>
    </style>

    <style name="Widget.Signal.BottomSheet.ReactWithAny.Light">
        <item name="backgroundTint">@color/white</item>
    </style>

    <style name="ShapeAppearanceOverlay.Signal.BottomSheet.Rounded" parent="">
        <item name="cornerFamily">rounded</item>
        <item name="cornerSizeTopRight">8dp</item>
        <item name="cornerSizeTopLeft">8dp</item>
        <item name="cornerSizeBottomLeft">0dp</item>
        <item name="cornerSizeBottomRight">0dp</item>
    </style>

    <style name="Widget.Signal.BottomSheet.Rounded" parent="Widget.MaterialComponents.BottomSheet">
        <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.BottomSheet.Rounded</item>
        <item name="backgroundTint">@color/core_grey_75</item>
    </style>

    <style name="Widget.Signal.BottomSheet.Rounded.Light">
        <item name="backgroundTint">@color/white</item>
    </style>

    <style name="Theme.Signal.RoundedBottomSheet.Light">
        <item name="bottomSheetStyle">@style/Widget.Signal.BottomSheet.Rounded.Light</item>

        <item name="android:textColorPrimary">@color/core_grey_90</item>

        <item name="colorAccent">@color/core_ultramarine</item>

        <item name="android:navigationBarColor" tools:ignore="NewApi">@color/white</item>
        <item name="android:windowLightNavigationBar" tools:ignore="NewApi">true</item>
    </style>

    <style name="Theme.Signal.RoundedBottomSheet" parent="Theme.MaterialComponents.BottomSheetDialog">
        <item name="android:windowIsFloating">false</item>
        <item name="bottomSheetStyle">@style/Widget.Signal.BottomSheet.Rounded</item>

        <item name="android:textColorPrimary">@color/core_grey_05</item>

        <item name="colorAccent">@color/core_ultramarine_light</item>

        <item name="android:navigationBarColor" tools:ignore="NewApi">@color/core_grey_75</item>
        <item name="android:windowLightNavigationBar" tools:ignore="NewApi">false</item>
        <item name="android:statusBarColor" tools:ignore="NewApi">@color/transparent</item>
    </style>

    <style name="Signal.Chip.Action" parent="Widget.MaterialComponents.Chip.Action">
        <item name="chipIconSize">32dp</item>
        <item name="chipStartPadding">0dp</item>
        <item name="closeIcon">@drawable/ic_x</item>
        <item name="closeIconSize">12dp</item>
        <item name="textEndPadding">4dp</item>
        <!-- Negative padding gives us 4dp between icon and text, while allowing 10dp for when no icon -->
        <item name="iconEndPadding">-6dp</item>
        <item name="textStartPadding">10dp</item>
        <item name="android:textColor">@color/core_white</item>
        <item name="chipBackgroundColor">@color/core_grey_80</item>
        <item name="closeIconTint">@color/core_grey_15</item>
    </style>

    <style name="Signal.Chip.Action.Light">
        <item name="android:textColor">@color/core_grey_90</item>
        <item name="chipBackgroundColor">@color/core_grey_05</item>
        <item name="closeIconTint">@color/core_grey_60</item>
    </style>

</resources>
