<!--
  ~ Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
  ~ SPDX-License-Identifier: GPL-3.0-only
  -->

<resources>

  <style name="AppTheme.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
    <item name="boxStrokeColor">@color/outlined_box_selector</item>
    <item name="hintTextColor">?attr/colorSecondary</item>
    <item name="materialThemeOverlay">
      @style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox
    </item>
  </style>

  <style name="ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox">
    <item name="colorControlActivated">@color/color_control_normal</item>
  </style>

  <style name="AppTheme.MaterialButton" parent="Widget.MaterialComponents.Button">
    <item name="android:textColor">@android:color/white</item>
    <item name="backgroundTint">?attr/colorSecondary</item>
    <item name="rippleColor">?attr/colorControlHighlight</item>
  </style>

  <style name="AppTheme.OutlinedButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
    <item name="android:textColor">?android:attr/textColorPrimary</item>
    <item name="rippleColor">@color/ripple_color</item>
    <item name="strokeColor">?attr/colorSecondary</item>
    <item name="backgroundTint">@color/toggle_button_selector</item>
  </style>

  <style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
    <item name="colorPrimary">@color/secondary_color</item>
    <item name="colorSecondary">@color/secondary_color</item>
  </style>

  <style name="AppTheme.Chip.Choice" parent="Widget.MaterialComponents.Chip.Choice">
    <item name="chipSurfaceColor">@color/chip_surface_color</item>
    <item name="android:textColor">@color/chip_text_color</item>
    <item name="shapeAppearanceOverlay">@style/ShapeAppearance.AppTheme.SmallComponent</item>
    <item name="android:textAppearance">?attr/textAppearanceButton</item>
  </style>

  <style name="ShapeAppearance.AppTheme.SmallComponent" parent="ShapeAppearance.MaterialComponents.SmallComponent">
    <item name="cornerFamily">rounded</item>
    <item name="cornerSize">8dp</item>
  </style>

  <style name="ActionMode" parent="@style/Widget.AppCompat.ActionMode">
    <item name="background">@color/primary_color</item>
  </style>

  <style name="BottomSheetDialogTheme" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
    <item name="android:windowIsFloating">false</item>
    <item name="android:statusBarColor">@android:color/transparent</item>
    <item name="android:windowTranslucentNavigation">false</item>
    <item name="android:windowIsTranslucent">false</item>
    <item name="android:backgroundDimEnabled">true</item>
    <item name="android:backgroundDimAmount">0.5</item>
    <item name="android:windowTranslucentStatus">false</item>
    <item name="android:colorBackground">@android:color/transparent</item>
  </style>

  <style name="NoBackgroundTheme" parent="@style/AppTheme">
    <item name="android:background">@android:color/transparent</item>
    <item name="android:backgroundDimEnabled">true</item>
    <item name="android:navigationBarColor">@android:color/transparent</item>
    <item name="android:statusBarColor">@android:color/transparent</item>
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowEnterAnimation">@android:anim/fade_in</item>
    <item name="android:windowExitAnimation">@android:anim/fade_out</item>
    <item name="colorPrimaryDark">@android:color/transparent</item>
    <item name="windowNoTitle">true</item>
  </style>

  <style name="DialogLikeTheme" parent="AppTheme">
    <item name="android:windowActionBar">false</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:backgroundDimEnabled">true</item>
    <!-- Needs to be set without android: prefix as per https://stackoverflow.com/a/33417456 -->
    <item name="windowNoTitle">true</item>
  </style>
</resources>
