<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
    <style name="Widget.Signal.Snackbar" parent="Widget.Material3.Snackbar">
        <!-- <item name="backgroundTint">?attr/colorSurfaceInverse</item> -->
        <item name="android:layout_margin">16dp</item>
    </style>

    <style name="Widget.Signal.Snackbar.TextView" parent="Widget.Material3.Snackbar.TextView">
        <!-- <item name="android:textColor">?attr/colorOnSurfaceInverse</item> -->
        <item name="android:textAppearance">@style/Signal.Text.BodyLarge</item>
    </style>

    <style name="Widget.Signal.Button.TextButton.Snackbar" parent="Widget.Material3.Button.TextButton.Snackbar">
        <!-- <item name="android:textColor">?attr/colorOnSurfaceInverse</item> -->
        <item name="android:textAllCaps">false</item>
        <item name="android:textAppearance">@style/Signal.Text.BodyLarge</item>
        <!-- <item name="backgroundTint">?attr/colorSurfaceInverse</item> -->
    </style>

    <style name="Widget.Signal.Button.TextButton" parent="Widget.Material3.Button.TextButton">
        <item name="materialThemeOverlay">@style/ThemeOverlay.Signal.Button.TextButton</item>
    </style>

    <style name="ThemeOverlay.Signal.Button.TextButton" parent="ThemeOverlay.Material3.Button.TextButton">
        <item name="colorOnContainer">?attr/colorPrimary</item>
    </style>

    <style name="NoAnimation.Theme.BlackScreen" parent="Theme.AppCompat.NoActionBar">
        <item name="android:windowAnimationStyle">@null</item>
        <item name="android:windowBackground">@android:color/black</item>
    </style>

    <style name="TextSecure.DialogActivity" parent="Signal.DayNight">
        <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="AppCompatAlertDialogStyleLight" parent="Theme.AppCompat.Light.Dialog.Alert">
        <item name="colorAccent">?attr/colorPrimary</item>
        <item name="colorOnPrimary">?attr/colorPrimary</item>
        <item name="android:colorBackground">?attr/colorSurfaceContainerLow</item>
        <item name="android:textColor">?attr/colorOnSurface</item>
    </style>

    <style name="AppCompatAlertDialogStyleDark" parent="Theme.AppCompat.Dialog.Alert">
        <item name="colorAccent">?attr/colorPrimary</item>
        <item name="colorOnPrimary">?attr/colorPrimary</item>
        <item name="android:colorBackground">?attr/colorSurfaceContainerLow</item>
        <item name="android:textColor">?attr/colorOnSurface</item>
    </style>

    <style name="AppCompatDialogStyleLight" parent="Theme.AppCompat.Light.Dialog">
        <item name="colorAccent">?attr/colorPrimary</item>
        <item name="android:textColor">@null</item>
        <item name="android:windowBackground">@drawable/dialog_background</item>
    </style>

    <style name="AppCompatDialogStyleDark" parent="Theme.AppCompat.Dialog">
        <item name="colorAccent">?attr/colorPrimary</item>
        <item name="android:windowBackground">@drawable/dialog_background</item>
        <item name="android:textColor">@null</item>
    </style>

    <style name="TextSecure.Animation.FullScreenDialog" parent="@android:style/Animation.Activity">
        <item name="android:windowEnterAnimation">@anim/fade_scale_in</item>
        <item name="android:windowExitAnimation">@anim/fade_scale_out</item>
    </style>

    <style name="TextSecure.Animation.FullScreenDialogPoll" parent="@android:style/Animation.Activity">
        <item name="android:windowEnterAnimation">@anim/slide_from_bottom</item>
        <item name="android:windowExitAnimation">@anim/slide_to_bottom</item>
    </style>

    <style name="TextSecure.Animation.AddMessageDialog" parent="@android:style/Animation.Activity">
        <item name="android:windowEnterAnimation">@anim/slide_from_bottom</item>
        <item name="android:windowExitAnimation">@anim/slide_to_bottom</item>
    </style>

    <style name="TextSecure.Animation.TextStoryPostEntryDialog" parent="Animation.AppCompat.Dialog">
        <item name="android:windowEnterAnimation">@anim/text_entry_enter</item>
        <item name="android:windowExitAnimation">@anim/text_entry_exit</item>
    </style>

    <!-- ActionBar styles -->
    <style name="TextSecure.DarkActionBar" parent="@style/ThemeOverlay.Material3">
        <item name="android:popupTheme">@style/ThemeOverlay.Material3.Dark</item>
        <item name="actionOverflowMenuStyle">@style/Signal.DayNight.Popup.OverflowMenu</item>
        <item name="titleTextStyle">@style/Signal.Text.TitleLarge</item>
        <item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle.Dark</item>
        <item name="android:actionOverflowButtonStyle">@style/Signal.Toolbar.Overflow</item>
        <item name="android:itemTextAppearance">@style/Signal.Text.BodyLarge</item>
    </style>

    <style name="TextSecure.LightActionBar" parent="@style/ThemeOverlay.Material3">
        <item name="android:popupTheme">@style/ThemeOverlay.Material3.Light</item>
        <item name="actionOverflowMenuStyle">@style/Signal.DayNight.Popup.OverflowMenu</item>
        <item name="titleTextStyle">@style/Signal.Text.TitleLarge</item>
        <item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle</item>
        <item name="android:actionOverflowButtonStyle">@style/Signal.Toolbar.Overflow.Light</item>
        <item name="android:itemTextAppearance">@style/Signal.Text.BodyLarge</item>
    </style>

    <style name="TextSecure.LightActionBar.Settings">
        <item name="colorControlHighlight">@color/transparent_black_15</item>
    </style>

    <style name="TextSecure.DarkActionBar.Settings">
        <item name="colorControlHighlight">@color/transparent_white_15</item>
    </style>

    <style name="TextSecure.LightActionBar.DarkText"
           parent="TextSecure.LightActionBar">
    </style>

    <style name="TextSecure.DarkActionBar.TabBar"
        parent="@style/Widget.AppCompat.ActionBar.TabBar">
        <item name="background">@color/core_grey_95</item>
        <item name="android:background">@color/core_grey_95</item>
        <item name="elevation">4dp</item>
    </style>

    <style name="TextSecure.LightActionBar.TabBar"
        parent="@style/Widget.AppCompat.ActionBar.TabBar">
        <item name="android:background">@color/core_ultramarine</item>
        <item name="background">@color/core_ultramarine</item>
        <item name="android:textColorPrimary">@color/white</item>
        <item name="android:textColorSecondary">#BFffffff</item>
        <item name="elevation">4dp</item>
    </style>

    <style name="TextSecure.DarkActionBar.Conversation">
        <item name="android:popupTheme" tools:ignore="NewApi">@style/Signal.DayNight.Popup</item>
        <item name="popupTheme">@style/Signal.DayNight.Popup</item>
        <item name="titleTextStyle">@style/TextSecure.TitleTextStyle.Conversation</item>
        <item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle.Conversation</item>
        <item name="actionOverflowButtonStyle">@style/Signal.Toolbar.Overflow.Conversation</item>
        <item name="android:actionOverflowButtonStyle">@style/Signal.Toolbar.Overflow.Conversation</item>
        <item name="colorControlHighlight">@color/core_ultramarine</item>
        <item name="android:colorControlHighlight" tools:ignore="NewApi">@color/core_ultramarine</item>
        <item name="colorControlNormal">@color/signal_text_toolbar_subtitle</item>
        <item name="android:colorControlNormal" tools:ignore="NewApi">@color/signal_text_toolbar_subtitle</item>
        <item name="colorControlActivated">@color/core_ultramarine</item>
        <item name="android:colorControlActivated" tools:ignore="NewApi">@color/core_ultramarine</item>
    </style>

    <style name="Signal.Toolbar.PaymentInfoCard" parent="@style/Widget.AppCompat.ActionBar">
        <item name="actionOverflowButtonStyle">@style/Signal.Toolbar.Overflow.PaymentCard</item>
        <item name="android:actionOverflowButtonStyle">@style/Signal.Toolbar.Overflow.PaymentCard</item>
    </style>

    <style name="TextSecure.TitleTextStyle" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textColor">?attr/signal_text_primary</item>
        <item name="android:textColorHint">?attr/signal_text_secondary</item>
        <item name="android:textSize">16sp</item>
    </style>

    <style name="TextSecure.TitleTextStyle.Conversation" parent="TextSecure.TitleTextStyle">
        <item name="android:textColor">?attr/signal_text_toolbar_title</item>
        <item name="android:textColorHint">@color/signal_text_toolbar_subtitle</item>
    </style>

    <style name="TextSecure.SubtitleTextStyle" parent="TextAppearance.AppCompat.Widget.ActionBar.Subtitle">
        <item name="android:textColor">?attr/signal_text_secondary</item>
        <item name="android:textSize">14sp</item>
    </style>

    <style name="TextSecure.SubtitleTextStyle.Dark" parent="TextSecure.SubtitleTextStyle">
        <item name="android:textColor">@color/transparent_white_60</item>
    </style>

    <style name="TextSecure.SubtitleTextStyle.Conversation" parent="TextSecure.TitleTextStyle">
        <item name="android:textColor">@color/signal_text_toolbar_subtitle</item>
    </style>

    <style name="Registration.Description" parent="@android:style/TextAppearance">
        <item name="android:textSize">16.0sp</item>
        <item name="android:typeface">sans</item>
        <item name="android:textStyle">normal</item>
        <item name="android:gravity">left</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:shadowColor">#ffffff</item>
        <item name="android:shadowDx">1.0</item>
        <item name="android:shadowDy">1.0</item>
        <item name="android:shadowRadius">0.0</item>
        <item name="android:lineSpacingMultiplier">1.25</item>
    </style>

    <style name="ViewOnceVideo.Duration" parent="@android:style/TextAppearance">
        <item name="android:textSize">16sp</item>
        <item name="android:textColor">@color/white</item>
        <item name="android:shadowColor">@color/transparent_black_60</item>
        <item name="android:shadowDx">0</item>
        <item name="android:shadowDy">0</item>
        <item name="android:shadowRadius">2</item>
    </style>

    <!-- For Holo Light Dialog Activity Styling Emulation -->

    <style name="Widget.ProgressBar.Horizontal" parent="@android:style/Widget.ProgressBar.Horizontal">
    </style>

    <style name="ComposeEditText" parent="@style/Signal.Text.Body">
        <item name="android:padding">2dp</item>
        <item name="android:background">@null</item>
        <item name="android:maxLines">5</item>
        <item name="android:textColor">?attr/signal_text_primary</item>
        <item name="android:textColorHint">?attr/colorOnSurfaceVariant</item>
        <item name="android:capitalize">sentences</item>
        <item name="android:autoText">true</item>
        <item name="android:gravity">center_vertical</item>
        <item name="android:imeOptions">flagNoEnterAction</item>
        <item name="android:inputType">textAutoCorrect|textCapSentences|textMultiLine</item>
        <item name="android:contentDescription">@string/conversation_activity__compose_description</item>
    </style>

    <!-- RedPhone -->

    <!-- Buttons in the main "button row" of the in-call onscreen touch UI. -->

    <!-- "Compound button" variation of InCallButton.
           These buttons have the concept of two states: checked and unchecked.
           (This style is just like "InCallButton" except that we also
           clear out android:textOn and android:textOff, to avoid the default
           text label behavior of the ToggleButton class.) -->

    <style name="WebRtcCallV2CompoundButton">
        <item name="android:layout_height">@dimen/webrtc_button_size</item>
        <item name="android:layout_width">@dimen/webrtc_button_size</item>
        <item name="android:textOn">@null</item>
        <item name="android:textOff">@null</item>
        <item name="android:layout_marginStart">@dimen/CallControls__button_horizontal_margin</item>
        <item name="android:layout_marginEnd">@dimen/CallControls__button_horizontal_margin</item>
        <item name="android:layout_marginBottom">@dimen/CallControls__button_bottom_margin</item>
    </style>

    <style name="IdentityKey">
        <item name="android:fontFamily">monospace</item>
        <item name="android:typeface">monospace</item>
        <item name="android:textSize">15sp</item>
        <item name="android:clickable">false</item>
        <item name="android:focusable">false</item>
    </style>

    <style name="BackupPassphrase">
        <item name="android:fontFamily">monospace</item>
        <item name="android:typeface">monospace</item>
        <item name="android:textSize">15sp</item>
        <item name="android:clickable">false</item>
        <item name="android:focusable">false</item>
    </style>

    <style name="PreferenceThemeOverlay.Fix" parent="PreferenceThemeOverlay">
        <item name="android:divider">@null</item>
        <item name="android:dividerHeight">0dp</item>
    </style>

    <style name="Signal.SearchView" parent="Widget.AppCompat.SearchView">
        <item name="closeIcon">@drawable/ic_x_20</item>
        <item name="searchHintIcon">@drawable/ic_search_24</item>
        <item name="searchIcon">@drawable/ic_search_24</item>
    </style>

    <style name="Signal.Toolbar.Overflow" parent="Widget.AppCompat.ActionButton.Overflow">
        <item name="srcCompat">@drawable/ic_more_vert_24</item>
        <item name="android:src">@null</item>
        <item name="android:tint">@color/core_white</item>
    </style>

    <style name="Signal.Toolbar.Overflow.Light">
        <item name="srcCompat">@drawable/symbol_more_vertical</item>
        <item name="android:src">@null</item>
        <item name="android:tint">?attr/signal_icon_tint_primary</item>
    </style>

    <style name="Signal.Toolbar.Overflow.Conversation">
        <item name="srcCompat">@drawable/ic_more_vert_conversation_24</item>
        <item name="android:tint">@null</item>
    </style>

    <style name="Signal.Toolbar.Overflow.PaymentCard">
        <item name="android:tint">@color/payment_info_card_overflow_tint</item>
    </style>

    <style name="TextSecure.ActionModeStyle" parent="@style/Widget.AppCompat.ActionMode">
        <item name="titleTextStyle">@style/Signal.Text.TitleLarge</item>
        <item name="closeItemLayout">@layout/action_mode_close_layout</item>
        <item name="theme">@style/Signal.ActionModeTheme</item>
        <item name="height">@dimen/signal_m3_toolbar_height</item>
    </style>

    <style name="Signal.ActionModeTheme" parent="ThemeOverlay.Material3">
        <item name="actionOverflowButtonStyle">@style/Signal.DayNight.Toolbar.Overflow</item>
        <item name="android:actionOverflowButtonStyle">@style/Signal.DayNight.Toolbar.Overflow</item>
    </style>

    <declare-styleable name="ProgressCard">
        <attr name="progressCardTitle" format="string" />
    </declare-styleable>

    <declare-styleable name="CameraButtonView">
        <attr name="imageCaptureSize" format="dimension" />
        <attr name="recordSize" format="dimension" />
    </declare-styleable>

    <declare-styleable name="ArcProgressBar">
        <attr name="arcWidth" format="dimension"         />
        <attr name="arcBackgroundColor" format="color"   />
        <attr name="arcForegroundColor" format="color"   />
        <attr name="arcRoundedEnds" format="boolean" />
        <attr name="arcStartAngle" format="float"   />
        <attr name="arcSweepAngle" format="float"   />
        <attr name="arcProgress" format="float"   />
    </declare-styleable>

    <declare-styleable name="MaxSizeFrameLayout">
        <attr name="msfl_maxHeight" format="dimension" />
        <attr name="msfl_maxWidth" format="dimension" />
    </declare-styleable>

    <declare-styleable name="PreviewView">
        <attr format="enum" name="implementationMode">
            <enum name="surfaceView" value="0"/>
            <enum name="textureView" value="1"/>
        </attr>
    </declare-styleable>

    <style name="Widget.Signal.Button.Icon" parent="Widget.Material3.Button.IconButton">
        <item name="android:elevation" tools:ignore="NewApi">0dp</item>
        <item name="android:stateListAnimator" tools:ignore="NewApi">@null</item>
        <item name="android:insetRight">0dp</item>
        <item name="android:insetLeft">0dp</item>
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
        <item name="iconGravity">textStart</item>
    </style>

    <style name="ShapeAppearanceOverlay.Signal.Button.Rounded" parent="">
        <item name="cornerFamily">rounded</item>
        <item name="cornerSize">50%</item>
    </style>

    <style name="Widget.Signal.Button.Flat" parent="Widget.MaterialComponents.Button.UnelevatedButton">
        <item name="android:textAllCaps">false</item>
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
    </style>

    <style name="ThemeOverlay.Signal.TextInputEditText.FilledBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox">
        <item name="colorControlActivated">?attr/colorPrimary</item>
    </style>

    <style name="Widget.Signal.TextInputLayout.FilledBox" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
        <item name="android:paddingStart">@dimen/dsl_settings_gutter</item>
        <item name="android:paddingEnd">@dimen/dsl_settings_gutter</item>
        <item name="boxBackgroundColor">?attr/signal_background_secondary</item>
        <item name="boxCornerRadiusBottomEnd">10dp</item>
        <item name="boxCornerRadiusBottomStart">10dp</item>
        <item name="boxCornerRadiusTopEnd">10dp</item>
        <item name="boxCornerRadiusTopStart">10dp</item>
        <item name="boxStrokeWidth">0dp</item>
        <item name="boxStrokeWidthFocused">0dp</item>
        <item name="hintTextColor">@color/signal_text_hint</item>
        <item name="android:textColorHint">@color/signal_text_hint</item>
        <item name="materialThemeOverlay">@style/ThemeOverlay.Signal.TextInputEditText.FilledBox</item>
    </style>

    <style name="Widget.Signal.TextInputLayout.FilledBox.ContactNameEditor">
        <item name="boxCornerRadiusBottomEnd">0dp</item>
        <item name="boxCornerRadiusBottomStart">0dp</item>
        <item name="boxStrokeWidth">1dp</item>
        <item name="boxStrokeColor">?attr/colorOutline</item>
        <item name="boxStrokeErrorColor">?attr/colorError</item>
        <item name="hintTextAppearance">@style/Signal.Text.LabelMedium</item>
    </style>

    <style name="Widget.Signal.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
        <item name="boxCornerRadiusTopEnd">4dp</item>
        <item name="boxCornerRadiusTopStart">4dp</item>
        <item name="hintTextAppearance">@style/Signal.Text.LabelMedium</item>
        <item name="boxStrokeColor">?attr/colorPrimary</item>
        <item name="boxStrokeErrorColor">?attr/colorError</item>
        <item name="errorIconTint">?attr/colorError</item>
        <item name="errorTextColor">?attr/colorError</item>
        <item name="hintTextColor">?attr/colorPrimary</item>
        <item name="boxBackgroundColor">?attr/colorSurfaceContainerHighest</item>
    </style>

    <style name="Widget.Signal.TextInputLayout.Registration.Dropdown" parent="Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu">
        <item name="android:paddingStart">0dp</item>
        <item name="android:paddingEnd">6dp</item>
        <item name="boxCornerRadiusTopEnd">2dp</item>
        <item name="boxCornerRadiusTopStart">2dp</item>
    </style>

    <style name="Widget.MaterialComponents.Button.TextButton.Dialog">
        <item name="android:minWidth">@dimen/mtrl_btn_dialog_btn_min_width</item>
        <!-- Allow buttons to span more than one line so that the end isn't cut
             off for long strings. MDC defaults to 1 line. -->
        <item name="android:lines">2</item>
        <item name="android:ellipsize">end</item>
        <item name="android:layout_marginStart">@dimen/mtrl_btn_text_btn_padding_left</item>
        <item name="android:layout_gravity">end</item>
        <item name="android:gravity">end|center_vertical</item>
    </style>

    <style name="NumPadKeyTextView" parent="@android:style/TextAppearance.Widget.TextView">
        <item name="android:layout_width">@dimen/create_payment_key_width</item>
        <item name="android:layout_height">@dimen/create_payment_key_height</item>
        <item name="android:background">@drawable/rounded_rectangle_num_pad_key</item>
        <item name="android:textColor">?attr/signal_text_primary</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textSize">24sp</item>
        <item name="android:gravity">center</item>
    </style>
    <style name="MediaPreviewButton">
        <item name="android:layout_marginEnd">@dimen/media_preview_button_horizontal_margin</item>
        <item name="android:layout_marginStart">@dimen/media_preview_button_horizontal_margin</item>
        <item name="android:background">@drawable/circle_touch_highlight_background</item>
        <item name="android:layout_width">@dimen/exo_media_preview_button_width</item>
        <item name="android:layout_height">@dimen/exo_media_preview_button_width</item>
    </style>
</resources>
