<!--
  Naming guidelines: https://github.com/kickstarter/styleguide/tree/master/android#style-inheritance
  Other resources: https://kickstarter.wiki/pages/android-links.html#styles
-->
<resources>
  <style name="None">
  </style>

  <style name="KSTheme" parent="KSThemeBase" />

  <style name="KSThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="popupMenuStyle">@style/PopupMenu</item>
    <item name="alertDialogTheme">@style/Dialog</item>

    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowAnimationStyle">@null</item>

    <item name="colorPrimary">@color/primary</item>
    <item name="colorPrimaryDark">@color/primary_dark</item>
    <item name="colorAccent">@color/accent</item>
    <item name="android:textColorLink">@color/accent</item>
    <item name="android:textColorPrimary">@color/text_primary</item>
    <item name="android:textColorSecondary">@color/text_secondary</item>
    <item name="android:windowBackground">@color/window_background</item>
    <item name="android:textAllCaps">false</item>
  </style>

  <!-- Activities -->
  <style name="ActivityFeedActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/activity_feed_background</item>
  </style>

  <style name="CheckoutActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="CommentsActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="DiscoveryBase" parent="KSTheme">
    <item name="android:windowBackground">@color/discovery_background</item>
  </style>

  <style name="DiscoveryActivity" parent="DiscoveryBase" />

  <style name="HelpActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="Login" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
    <item name="android:popupMenuStyle">@style/PopupMenu</item>
  </style>

  <style name="ProjectActivity" parent="KSTheme">
  </style>

  <style name="SearchActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="ThanksActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="WebViewActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="VideoPlayerBase" parent="KSTheme">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowBackground">@color/ksr_soft_black</item>
  </style>

  <style name="VideoPlayerActivity" parent="VideoPlayerBase" />

  <style name="BackingActivity" parent="KSTheme">
    <item name="android:windowBackground">@color/white</item>
  </style>

  <style name="TabTextAppearance">
    <item name="android:textAllCaps">false</item>
    <item name="android:textSize">@dimen/body</item>
  </style>

  <!-- Widgets -->
  <style name="PopupMenu" parent="Base.Widget.AppCompat.PopupMenu">
    <item name="android:popupBackground">@drawable/dialog_alert_rounded</item>
    <item name="android:dropDownVerticalOffset">@dimen/popup_menu_vertical_offset</item>
    <item name="android:dropDownHorizontalOffset">@dimen/popup_menu_horizontal_offset</item>
  </style>

  <style name="ProgressBar" parent="Base.Widget.AppCompat.ProgressBar">
    <item name="android:indeterminateOnly">false</item>
    <item name="android:progressDrawable">@drawable/progress_bar_horizontal</item>
  </style>

  <style name="Dialog" parent="Theme.AppCompat.Light.Dialog.Alert">
    <item name="colorAccent">@color/text_secondary</item>
  </style>

  <style name="Button" parent="Base.Widget.AppCompat.Button">
    <item name="android:textColor">@drawable/button_text_white</item>
    <item name="android:layout_centerInParent">true</item>
    <item name="android:singleLine">true</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:paddingStart">@dimen/grid_4</item>
    <item name="android:paddingEnd">@dimen/grid_4</item>
  </style>

  <style name="BorderButton" parent="Base.Widget.AppCompat.Button.Borderless">
    <item name="android:background">@drawable/button_white_border_dark_gray</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:textColor">@color/ksr_soft_black</item>
    <item name="android:layout_centerInParent">true</item>
    <item name="android:singleLine">true</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:paddingStart">@dimen/grid_4</item>
    <item name="android:paddingEnd">@dimen/grid_4</item>
  </style>

  <style name="RoundedButtonBase" parent="Button">
    <item name="android:paddingStart">@dimen/grid_6</item>
    <item name="android:paddingEnd">@dimen/grid_6</item>
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="RoundedButton" parent="Button" />

  <style name="FacebookButton" parent="Base.Widget.AppCompat.Button.Borderless">
    <item name="android:background">@drawable/button_facebook</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:textColor">@color/white</item>
    <item name="android:layout_centerInParent">true</item>
    <item name="android:singleLine">true</item>
    <item name="android:text">@string/login_tout_buttons_log_in_with_facebook</item>
    <item name="android:paddingStart">@dimen/grid_1</item>
    <item name="android:paddingEnd">@dimen/grid_4</item>
    <item name="android:drawableStart">@drawable/ic_social_facebook</item>
  </style>

  <style name="BlueRoundedButton" parent="RoundedButton">
    <item name="android:background">@drawable/button_blue_rounded</item>
  </style>

  <style name="GrayRoundedButton" parent="RoundedButton">
    <item name="android:background">@drawable/button_gray_rounded</item>
    <item name="android:textColor">@color/ksr_dark_grey_400</item>
  </style>

  <style name="GreenRoundedButton" parent="RoundedButton">
    <item name="android:background">@drawable/button_green_rounded</item>
  </style>

  <style name="BlueRoundedButtonBase" parent="RoundedButton">
    <item name="android:background">@drawable/button_blue_rounded</item>
  </style>

  <style name="TwitterButton" parent="Base.Widget.AppCompat.Button.Borderless">
    <item name="android:background">@drawable/button_twitter</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:textColor">@color/white</item>
    <item name="android:layout_centerInParent">true</item>
    <item name="android:singleLine">true</item>
    <item name="android:paddingStart">@dimen/grid_1</item>
    <item name="android:paddingEnd">@dimen/grid_4</item>
    <item name="android:drawableStart">@drawable/ic_social_twitter</item>
  </style>

  <style name="ProjectActionButton" parent="Button">
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">@dimen/project_action_button_height</item>
    <item name="android:textSize">@dimen/callout</item>
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="ActivitySampleSeeAllButton" parent="BorderButton">
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_marginTop">@dimen/grid_3</item>
    <item name="android:layout_marginBottom">@dimen/grid_4</item>
    <item name="android:text">@string/discovery_activity_sample_button_see_all_activity</item>
  </style>

  <style name="KSSettingsMailIcon">
    <item name="android:text">@string/mail_icon</item>
    <item name="android:focusable">true</item>
    <item name="android:layout_centerVertical">true</item>
    <item name="android:textSize">@dimen/callout</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_width">@dimen/settings_icon_fixed_width</item>
    <item name="android:gravity">center</item>
    <item name="android:paddingTop">@dimen/grid_1_half</item>
    <item name="android:background">@drawable/click_indicator_light</item>
  </style>

  <style name="EndSettingsWidgetBase">
    <item name="android:layout_centerVertical">true</item>
    <item name="android:textSize">@dimen/settings_icon</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:gravity">center</item>
    <item name="android:layout_alignParentRight">true</item>
  </style>

  <style name="EndSettingsWidget" parent="EndSettingsWidgetBase"/>

  <style name="KSSettingsPhoneIcon" parent="EndSettingsWidget">
    <item name="android:focusable">true</item>
    <item name="android:layout_marginRight">@dimen/grid_1</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_width">@dimen/settings_icon_fixed_width</item>
    <item name="android:background">@drawable/click_indicator_light</item>
    <item name="android:text">@string/phone_android_icon</item>
  </style>

  <style name="SettingsClickableSection">
    <item name="android:orientation">horizontal</item>
    <item name="android:gravity">center_vertical</item>
    <item name="android:focusable">true</item>
    <item name="android:background">@drawable/click_indicator_light_masked</item>
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">@dimen/grid_10</item>
  </style>

  <style name="SettingsSectionLabel" parent="CalloutPrimary">
    <item name="android:layout_weight">1</item>
    <item name="android:layout_width">0dp</item>
    <item name="android:layout_height">wrap_content</item>
  </style>

  <style name="SettingsSectionTitle" parent="BodySecondary">
    <item name="android:layout_marginTop">@dimen/grid_7</item>
    <item name="android:layout_marginBottom">@dimen/grid_2</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
  </style>

  <!-- Toolbars -->
  <style name="ToolbarBase" parent="Base.Widget.AppCompat.Toolbar">
    <item name="android:background">@color/white</item>
    <item name="android:foregroundGravity">center_vertical</item>
    <item name="android:layout_height">?attr/actionBarSize</item>
    <item name="android:layout_width">match_parent</item>
  </style>

  <style name="Toolbar" parent="ToolbarBase" />

  <style name="ToolbarIcon">
    <item name="android:background">@drawable/click_indicator_light</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_width">@dimen/button_icon_fixed_width</item>
    <item name="android:maxWidth">@dimen/button_icon_fixed_width</item>
    <item name="android:gravity">center</item>
    <item name="android:textColor">@color/text_primary</item>
    <item name="android:textSize">@dimen/icon</item>
  </style>

  <style name="ToolbarIconBackButton" parent="ToolbarIcon">
    <item name="android:paddingStart">@dimen/grid_2</item>
    <item name="android:drawableStart">@drawable/ic_action_icon__arrow_left</item>
    <item name="android:focusable">true</item>
    <item name="android:contentDescription">@string/general_navigation_accessibility_button_navigate_back_label</item>
  </style>

  <style name="ToolbarIconDarkBackground" parent="ToolbarIcon">
    <item name="android:background">@drawable/button_selector</item>
    <item name="android:focusable">true</item>
    <item name="android:textColor">@color/white</item>
  </style>

  <style name="ToolbarTitleBase" parent="Headline">
    <item name="android:layout_height">wrap_content</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_centerVertical">true</item>
    <item name="android:color">@color/ksr_soft_black</item>
    <item name="android:textColorHint">@color/ksr_dark_grey_400</item>
    <item name="android:layout_marginStart">@dimen/grid_12</item>
  </style>

  <style name="ToolbarTitle" parent="ToolbarTitleBase" />

  <style name="ToolbarVectorIcon">
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_width">@dimen/button_icon_fixed_width</item>
    <item name="android:background">@drawable/click_indicator_light</item>
    <item name="android:gravity">center</item>
    <item name="android:layout_centerVertical">true</item>
  </style>

  <!-- Typography -->
  <style name="TextPrimary">
    <item name="android:textColor">@color/text_primary</item>
    <item name="android:textStyle">normal</item>
    <item name="android:fontFamily">@string/font_family_sans_serif</item>
  </style>
  
  <style name="TextSecondary">
    <item name="android:textColor">@color/text_secondary</item>
    <item name="android:textStyle">normal</item>
    <item name="android:fontFamily">@string/font_family_sans_serif</item>
  </style>

  <style name="TextWhite">
    <item name="android:textColor">@color/white</item>
    <item name="android:textStyle">normal</item>
    <item name="android:fontFamily">@string/font_family_sans_serif</item>
  </style>

  <style name="Caption2Primary" parent="TextPrimary">
    <item name="android:textSize">@dimen/caption_2</item>
    <item name="android:lineSpacingExtra">@dimen/caption_line_spacing_extra</item>
  </style>

  <style name="Caption1Primary" parent="TextPrimary">
    <item name="android:textSize">@dimen/caption_1</item>
    <item name="android:lineSpacingExtra">@dimen/caption_line_spacing_extra</item>
  </style>

  <style name="Caption1PrimaryMedium" parent="Caption1Primary">
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="Caption1Secondary" parent="TextSecondary">
    <item name="android:textSize">@dimen/caption_1</item>
    <item name="android:lineSpacingExtra">@dimen/caption_line_spacing_extra</item>
  </style>

  <style name="Caption1SecondaryMedium" parent="Caption1Secondary">
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="FootnotePrimary" parent="TextPrimary">
    <item name="android:textSize">@dimen/footnote</item>
  </style>

  <style name="FootnotePrimaryMedium" parent="FootnotePrimary">
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="FootnoteSecondary" parent="TextSecondary">
    <item name="android:textSize">@dimen/footnote</item>
  </style>

  <style name="BodyPrimary" parent="TextPrimary">
    <item name="android:textSize">@dimen/body</item>
    <item name="android:lineSpacingExtra">@dimen/body_line_spacing_extra</item>
  </style>

  <style name="BodyPrimaryMedium" parent="BodyPrimary">
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>
  
  <style name="BodySecondary" parent="TextSecondary">
    <item name="android:textSize">@dimen/body</item>
    <item name="android:lineSpacingExtra">@dimen/body_line_spacing_extra</item>
  </style>

  <style name="BodySecondaryMedium" parent="BodySecondary">
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="BodyWhite" parent="TextWhite">
    <item name="android:textSize">@dimen/body</item>
    <item name="android:lineSpacingExtra">@dimen/body_line_spacing_extra</item>
  </style>

  <style name="CalloutPrimary" parent="TextPrimary">
    <item name="android:textSize">@dimen/callout</item>
    <item name="android:lineSpacingExtra">@dimen/callout_line_spacing_extra</item>
  </style>

  <style name="CalloutPrimaryMedium" parent="CalloutPrimary">
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="CalloutSecondaryMedium" parent="TextSecondary">
    <item name="android:textSize">@dimen/callout</item>
    <item name="android:lineSpacingExtra">@dimen/callout_line_spacing_extra</item>
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="Subheadline" parent="TextPrimary">
    <item name="android:textSize">@dimen/subheadline</item>
  </style>

  <style name="Headline" parent="TextPrimary">
    <item name="android:textSize">@dimen/headline</item>
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="Title2" parent="TextPrimary">
    <item name="android:textSize">@dimen/title_2</item>
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="Title3" parent="TextPrimary">
    <item name="android:textSize">@dimen/title_3</item>
  </style>

  <style name="Title3Navy" parent="Title3">
    <item name="android:textColor">@color/ksr_text_navy_800</item>
  </style>

  <style name="Title3Medium" parent="TextPrimary">
    <item name="android:textSize">@dimen/title_3</item>
    <item name="android:fontFamily">@string/font_family_sans_serif_medium</item>
  </style>

  <style name="Title1" parent="TextPrimary">
    <item name="android:textSize">@dimen/title_1</item>
    <item name="android:fontFamily">@string/font_family_maison_neue_book</item>
  </style>

  <!-- Cards -->
  <style name="ActivityFeedCardBase">
    <item name="android:foreground">@drawable/click_indicator_light</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:layout_marginTop">@dimen/activity_feed_view_margin_top</item>
    <item name="android:layout_marginBottom">@dimen/activity_feed_view_margin_bottom</item>
    <item name="android:layout_width">match_parent</item>
    <item name="cardBackgroundColor">@color/white</item>
    <item name="cardCornerRadius">0dp</item>
    <item name="cardElevation">0dp</item>
    <item name="android:layout_marginStart">@dimen/activity_padding_x</item>
    <item name="android:layout_marginEnd">@dimen/activity_padding_x</item>
  </style>

  <style name="ActivityFeedCard" parent="ActivityFeedCardBase" />

  <style name="ActivitySampleCardBase">
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="cardBackgroundColor">@color/white</item>
    <item name="cardElevation">@dimen/card_elevation</item>
    <item name="android:focusable">true</item>
    <item name="android:layout_marginBottom">@dimen/grid_1</item>
    <item name="android:layout_marginTop">@dimen/grid_5</item>
    <item name="android:layout_marginStart">@dimen/card_margin_x</item>
    <item name="android:layout_marginEnd">@dimen/card_margin_x</item>
  </style>

  <style name="ActivitySampleCard" parent="ActivitySampleCardBase" />

  <!-- Rewards -->
  <style name="RewardLimitedText" parent="Caption1PrimaryMedium">
    <item name="android:textColor">@color/reward_orange_dark</item>
  </style>

</resources>
