<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/reward_view"
  android:focusable="true"
  android:foreground="@drawable/click_indicator_light"
  android:layout_marginTop="@dimen/grid_1"
  android:layout_marginStart="@dimen/project_padding_x"
  android:layout_marginEnd="@dimen/project_padding_x"
  android:layout_marginBottom="@dimen/grid_2"
  android:layout_height="wrap_content"
  android:layout_width="match_parent"
  app:cardBackgroundColor="@color/white"
  app:cardCornerRadius="@dimen/card_corner_radius"
  app:cardElevation="1dp"
  app:cardPreventCornerOverlap="false">

  <FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

      <LinearLayout
        android:id="@+id/reward_selected_header"
        android:gravity="center_vertical"
        android:paddingStart="@dimen/grid_2"
        android:paddingEnd="@dimen/grid_2"
        android:layout_width="match_parent"
        android:layout_height="@dimen/grid_5"
        android:visibility="gone"
        tools:visibility="visible">

        <TextView
          style="@style/Caption1SecondaryMedium"
          android:background="@color/green"
          android:textColor="@color/white"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:gravity="center"
          android:paddingStart="@dimen/grid_2"
          android:paddingEnd="@dimen/grid_2"
          android:text="@string/rewards_selected_label_you_selected" />

      </LinearLayout>

      <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="@dimen/grid_2">

        <LinearLayout
          android:orientation="vertical"
          android:gravity="center_vertical"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <TextView
            style="@style/Title3"
            android:id="@+id/reward_minimum_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/reward_blue"
            tools:text="$20 AUD" />

          <TextView
            style="@style/Caption1Secondary"
            android:id="@+id/reward_usd_conversion_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="About $15 USD" />

        </LinearLayout>

        <LinearLayout
          android:orientation="vertical"
          android:paddingTop="@dimen/grid_1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <TextView
            style="@style/Headline"
            android:id="@+id/reward_title_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingEnd="@dimen/grid_2"
            android:paddingTop="@dimen/grid_1"
            android:maxLines="2"
            tools:text="Digital bundle" />

          <TextView
            style="@style/BodyPrimary"
            android:id="@+id/reward_description_text_view"
            android:paddingTop="@dimen/grid_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            tools:text="You'll receive a download link to the project, free of DRM!" />

        </LinearLayout>

        <LinearLayout
          android:id="@+id/reward_rewards_item_section"
          android:orientation="vertical"
          android:paddingTop="@dimen/grid_2"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <TextView
            style="@style/BodySecondary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/rewards_info_includes" />

          <android.support.v7.widget.RecyclerView
            android:id="@+id/reward_rewards_item_recycler_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        </LinearLayout>

        <include layout="@layout/reward_delivery_view" />

        <LinearLayout
          android:id="@+id/limit_and_backers_section"
          android:orientation="horizontal"
          android:paddingTop="@dimen/grid_2"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <TextView
            style="@style/BodyPrimaryMedium"
            android:id="@+id/reward_all_gone_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/rewards_info_all_gone" />

          <TextView
            style="@style/BodyPrimaryMedium"
            android:id="@+id/reward_limit_and_remaining_text_view"
            android:textColor="@color/orange"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="Limited (20 left of 30)" />

          <TextView
            style="@style/BodyPrimaryMedium"
            android:id="@+id/reward_limit_and_backers_separator_text_view"
            android:paddingStart="@dimen/grid_1"
            android:paddingEnd="@dimen/grid_1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            android:text="•"
            tools:ignore="HardcodedText"
            tools:visibility="visible" />

          <TextView
            style="@style/BodyPrimaryMedium"
            android:id="@+id/reward_backers_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="25 backers" />

        </LinearLayout>

      </LinearLayout>

    </LinearLayout>

    <View
      android:id="@+id/reward_white_overlay_view"
      android:visibility="invisible"
      android:alpha="0.6"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/white" />

  </FrameLayout>

</android.support.v7.widget.CardView>
