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

    <style name="Signal.Widget.ImageView.ActionButton" parent="ThemeOverlay.Material3">
        <item name="tint">@color/signal_colorOnSecondaryContainer</item>
        <item name="android:background">@drawable/selectable_icon_button</item>
        <item name="android:layout_width">56dp</item>
        <item name="android:layout_height">56dp</item>
        <item name="android:layout_marginStart">@dimen/conversation_settings_button_strip_spacing_half</item>
        <item name="android:layout_marginEnd">@dimen/conversation_settings_button_strip_spacing_half</item>
        <item name="android:scaleType">centerInside</item>
    </style>

    <style name="Signal.Widget.TextView.ActionButton" parent="ThemeOverlay.Material3">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:gravity">center_horizontal</item>
        <item name="android:layout_marginTop">12dp</item>
        <item name="android:textAppearance">@style/Signal.Text.BodyMedium</item>
        <item name="android:textColor">@color/signal_colorOnBackground</item>
        <item name="android:maxLines">2</item>
    </style>

    <style name="Signal.Widget.Button.Base.Primary" parent="Widget.Material3.Button">
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
    </style>

    <style name="Signal.Widget.Button.Large.Primary" parent="@style/Signal.Widget.Button.Base.Primary">
        <item name="android:minHeight">44dp</item>
        <item name="materialThemeOverlay">@style/ThemeOverlay.Signal.Button.Primary</item>
    </style>

    <style name="Signal.Widget.Button.Large.Primary.Inverse" parent="@style/Signal.Widget.Button.Large.Primary">
        <item name="android:minHeight">44dp</item>
        <item name="android:textColor">@color/signal_button_primary_inverse_text_selector</item>
        <item name="background">?attr/selectableItemBackground</item>
    </style>

    <style name="Signal.Widget.Button.Large.Danger" parent="@style/Signal.Widget.Button.Large.Primary">
        <item name="backgroundTint">@color/signal_alert_primary</item>
    </style>

    <style name="Signal.Widget.Button.Medium.Primary" parent="@style/Signal.Widget.Button.Base.Primary">
        <item name="android:minHeight">40dp</item>
        <item name="materialThemeOverlay">@style/ThemeOverlay.Signal.Button.Primary</item>
    </style>

    <style name="Signal.Widget.Button.Small.Primary" parent="Widget.Material3.Button.OutlinedButton">
        <item name="android:textAllCaps">false</item>
        <item name="android:paddingTop">6dp</item>
        <item name="android:paddingBottom">7dp</item>
        <item name="android:paddingStart">14dp</item>
        <item name="android:paddingEnd">14dp</item>
        <item name="android:minHeight">32dp</item>
        <item name="android:textSize">13sp</item>
        <item name="android:fontFamily">sans-serif-medium</item>
        <item name="android:letterSpacing" tools:targetApi="21">0.01</item>
        <item name="strokeWidth">1.5dp</item>
        <item name="cornerRadius">18dp</item>
        <item name="android:textColor">@color/signal_button_secondary_text_selector</item>
        <item name="strokeColor">@color/signal_button_secondary_stroke</item>
        <item name="backgroundTint">@color/transparent</item>
        <item name="rippleColor">@color/signal_button_secondary</item>
    </style>

    <style name="Signal.Widget.Button.Small.Secondary" parent="Widget.Material3.Button.UnelevatedButton">
        <item name="android:textAllCaps">false</item>
        <item name="android:paddingTop">6dp</item>
        <item name="android:paddingBottom">7dp</item>
        <item name="android:paddingStart">14dp</item>
        <item name="android:paddingEnd">14dp</item>
        <item name="android:minHeight">0dp</item>
        <item name="android:textSize">13sp</item>
        <item name="android:fontFamily">sans-serif-medium</item>
        <item name="android:letterSpacing" tools:targetApi="21">0.01</item>
        <item name="android:elevation" tools:ignore="NewApi">0dp</item>
        <item name="android:textColor">@color/signal_button_secondary_text_selector</item>
        <item name="background">@color/signal_background_tertiary</item>
        <item name="rippleColor">@color/core_ultramarine</item>
        <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.Circle</item>
    </style>

    <style name="Widget.Signal.Button.Small" parent="Widget.Material3.Button.TonalButton">
        <item name="android:minHeight">32dp</item>
        <item name="android:paddingStart">16dp</item>
        <item name="android:paddingEnd">16dp</item>
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
        <item name="cornerRadius">16dp</item>
        <item name="android:textAppearance">@style/Signal.Text.LabelMedium</item>
        <item name="materialThemeOverlay">@style/ThemeOverlay.Signal.Button.Small</item>
    </style>

    <style name="ThemeOverlay.Signal.Button.Primary" parent="ThemeOverlay.Material3.Button">
        <item name="colorOnContainer">@color/signal_colorOnPrimary</item>
        <item name="colorContainer">@color/signal_colorPrimary</item>
    </style>

    <style name="ThemeOverlay.Signal.Button.Tonal" parent="ThemeOverlay.Material3.Button">
        <item name="colorOnContainer">@color/signal_colorOnPrimaryContainer</item>
        <item name="colorContainer">@color/signal_colorPrimaryContainer</item>
    </style>

    <style name="ThemeOverlay.Signal.Button.Small" parent="ThemeOverlay.Material3.Button">
        <item name="colorOnContainer">@color/signal_colorOnSurfaceVariant</item>
        <item name="colorContainer">@color/signal_colorSurface1</item>
    </style>

    <style name="Signal.Widget.Button.Base.Secondary" parent="Widget.Material3.Button.TextButton">
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
        <item name="android:textAllCaps">false</item>
        <item name="android:textColor">@color/signal_button_secondary_text_selector</item>
        <item name="iconGravity">textEnd</item>
        <item name="iconTint">@color/signal_button_secondary_text_selector</item>
        <item name="rippleColor">@color/signal_button_secondary_ripple</item>
    </style>

    <style name="Signal.Widget.Button.Large.Secondary" parent="@style/Signal.Widget.Button.Base.Secondary">
        <item name="android:minHeight">@dimen/signal_m3_large_button_height</item>
        <item name="strokeWidth">0dp</item>
    </style>

    <style name="Signal.Widget.Button.Medium.Secondary" parent="@style/Signal.Widget.Button.Base.Secondary">
        <item name="android:minHeight">36dp</item>
        <item name="strokeWidth">0dp</item>
    </style>

    <style name="Signal.Widget.Button.Medium.OutlinedButton" parent="Signal.Widget.Button.Medium.Secondary">
        <item name="strokeColor">@color/button_outline_color_selector</item>
        <item name="strokeWidth">1.5dp</item>
    </style>

    <style name="Signal.Widget.Button.Base.Tonal" parent="Widget.Material3.Button.TonalButton">
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
        <item name="materialThemeOverlay">@style/ThemeOverlay.Signal.Button.Tonal</item>
    </style>

    <style name="Signal.Widget.Button.Large.Tonal" parent="Signal.Widget.Button.Base.Tonal">
        <item name="android:minHeight">44dp</item>
    </style>

    <style name="Signal.Widget.Button.Medium.Tonal" parent="Signal.Widget.Button.Base.Tonal">
        <item name="android:paddingStart">24dp</item>
        <item name="android:paddingEnd">24dp</item>
        <item name="android:paddingTop">10dp</item>
        <item name="android:paddingBottom">10dp</item>
        <item name="android:minHeight">40dp</item>
    </style>

    <style name="Signal.Widget.Button.Large.Tonal.Icon" parent="Signal.Widget.Button.Base.Tonal">
        <item name="fabCustomSize">48dp</item>
        <item name="android:layout_width">48dp</item>
        <item name="android:layout_height">48dp</item>
        <item name="elevation">0dp</item>
        <item name="tint">@color/signal_colorOnSecondaryContainer</item>
    </style>

    <style name="Signal.Widget.CompoundButton.RadioButton" parent="Widget.Material3.CompoundButton.RadioButton">
        <item name="android:minWidth">0dp</item>
        <item name="buttonTint">@color/signal_selection_control_button_tint</item>
    </style>

    <style name="Signal.Widget.Button.Dialog" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
        <item name="android:textAppearance">@style/Signal.Text.LabelLarge</item>
        <item name="android:textColor">@color/signal_button_secondary_text_selector</item>
    </style>

    <style name="Signal.ShapeOverlay.Rounded" parent="ShapeAppearance.MaterialComponents.MediumComponent">
        <item name="cornerFamily">rounded</item>
        <item name="cornerSize">8dp</item>
    </style>

    <style name="ShapeAppearance.Signal.MaterialAlertDialog" parent="ShapeAppearance.Material3.MediumComponent">
        <item name="cornerFamily">rounded</item>
        <item name="cornerRadius">28dp</item>
    </style>

    <style name="Signal.DayNight.Popup.OverflowMenu" parent="ThemeOverlay.Material3">
        <item name="overlapAnchor">false</item>
        <item name="android:popupElevation" tools:ignore="NewApi">4dp</item>
        <item name="android:dropDownHorizontalOffset">-14dp</item>
        <item name="android:dropDownVerticalOffset">1px</item>
        <item name="android:popupBackground">@drawable/rounded_rectangle_surface_2_18</item>
    </style>

    <style name="Signal.MaterialAlertDialog" parent="MaterialAlertDialog.Material3">
        <item name="shapeAppearance">@style/Signal.ShapeOverlay.Rounded</item>
    </style>

    <style name="Signal.MaterialAlertDialog.Wide">
        <item name="backgroundInsetStart">0dp</item>
        <item name="backgroundInsetEnd">0dp</item>
    </style>

    <style name="Signal.DayNight.Popup" parent="@style/ThemeOverlay.AppCompat.Light" />

    <style name="Signal.DayNight.Toolbar.Overflow" parent="@style/Signal.Toolbar.Overflow.Light" />

    <style name="Signal.DayNight.TitleTextStyle" parent="@style/TextSecure.TitleTextStyle" />

    <style name="Signal.DayNight.Dialog.FullScreen" parent="Signal.DayNight">
        <item name="android:windowAnimationStyle">@style/TextSecure.Animation.FullScreenDialog</item>
    </style>

    <style name="Signal.Media.Dialog.AddMessageDialog" parent="TextSecure.MediaPreview">
        <item name="android:windowAnimationStyle">@style/TextSecure.Animation.AddMessageDialog</item>
    </style>

    <style name="ThemeOverlay.Signal.MaterialAlertDialog" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
        <item name="alertDialogStyle">@style/Signal.MaterialAlertDialog</item>
        <item name="android:background">@color/signal_colorSurface1</item>
        <item name="android:dialogCornerRadius" tools:ignore="NewApi">28dp</item>
        <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialog.Signal.Title.Text</item>
        <item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialog.Signal.Body.Text</item>
        <item name="buttonBarPositiveButtonStyle">@style/Signal.Widget.Button.Dialog</item>
        <item name="buttonBarNeutralButtonStyle">@style/Signal.Widget.Button.Dialog</item>
        <item name="buttonBarNegativeButtonStyle">@style/Signal.Widget.Button.Dialog</item>
        <item name="textColorAlertDialogListItem">@color/signal_colorOnSurfaceVariant</item>
        <item name="android:checkedTextViewStyle">@style/Widget.Signal.CheckedTextView</item>
    </style>
    
    <style name="ThemeOverlay.Signal.MaterialAlertDialog.Wide">
        <item name="alertDialogStyle">@style/Signal.MaterialAlertDialog.Wide</item>
    </style>

    <style name="Widget.Signal.CheckedTextView" parent="Widget.Material3.CheckedTextView">
        <item name="android:textAppearance">@style/Signal.Text.BodyLarge</item>
        <item name="android:textColor">@color/signal_colorOnSurfaceVariant</item>
        <item name="drawableTint">@color/signal_selection_control_button_tint</item>
        <item name="android:drawableTint" tools:ignore="NewApi">@color/signal_selection_control_button_tint</item>
    </style>

    <style name="MaterialAlertDialog.Signal.Title.Text" parent="MaterialAlertDialog.Material3.Title.Text">
        <item name="android:textAppearance">@style/Signal.Text.TitleLarge</item>
    </style>

    <style name="MaterialAlertDialog.Signal.Body.Text" parent="MaterialAlertDialog.Material3.Body.Text">
        <item name="android:textAppearance">@style/Signal.Text.BodyMedium</item>
    </style>

    <style name="Widget.Signal.Dialog.Body" parent="Signal.Text.BodyMedium">
        <item name="android:textColor">@color/signal_colorOnSurfaceVariant</item>
    </style>

    <style name="Signal.Widget.TimePicker" parent="Widget.MaterialComponents.TimePicker">
        <item name="shapeAppearance">@style/Signal.ShapeOverlay.Rounded</item>
    </style>

    <style name="Signal.Widget.TimePicker.ImageButton" parent="Widget.MaterialComponents.TimePicker.ImageButton">
        <item name="iconTint">@color/signal_icon_tint_primary</item>
    </style>

    <style name="Signal.ThemeOverlay.TimePicker" parent="@style/ThemeOverlay.MaterialComponents.TimePicker">
        <item name="textAppearanceOverline">@style/TextAppearance.Signal.Body2</item>
        <item name="colorSurface">@color/signal_background_dialog</item>
        <item name="borderlessButtonStyle">@style/Signal.Widget.Button.Dialog</item>
        <item name="colorPrimary">@color/signal_accent_primary</item>
    </style>

    <style name="ThemeOverlay.Signal.CircularProgressIndicator.Primary" parent="ThemeOverlay.Material3">
        <item name="circularProgressMaterialButtonStyle">@style/Signal.Widget.Button.Large.Primary</item>
        <item name="circularProgressIndicatorStyle">@style/Widget.Signal.CircularProgressIndicator.Medium.Indeterminate</item>
    </style>

    <style name="Widget.Signal.CircularProgressIndicator.Medium.Indeterminate" parent="Widget.Material3.CircularProgressIndicator.Medium">
        <item name="android:indeterminate">true</item>
    </style>

    <style name="Widget.Signal.CircularProgressIndicator.Medium.Indeterminate.Tonal">
        <item name="indicatorColor">@color/signal_colorPrimaryContainer</item>
    </style>
</resources>
