<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="16dp"
    android:layout_marginEnd="16dp"
    android:layout_marginBottom="10dp"
    android:clickable="true"
    android:focusable="true"
    android:foreground="?attr/selectableItemBackground"
    app:cardBackgroundColor="@color/white"
    app:cardCornerRadius="16dp"
    app:cardElevation="0dp"
    app:strokeColor="@color/border_color"
    app:strokeWidth="1dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:padding="14dp">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:layout_weight="1">

            <ImageView
                android:id="@+id/book_cover"
                android:layout_width="72dp"
                android:layout_height="104dp"
                android:background="@color/surface_strong"
                android:importantForAccessibility="no"
                android:scaleType="centerCrop" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_weight="1"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/book_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:fontFamily="@font/open_sans_semibold"
                    android:maxLines="3"
                    android:textColor="@color/ink_color"
                    android:textSize="16sp" />

                <TextView
                    android:id="@+id/book_author"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="4dp"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:textColor="@color/ink_soft_color"
                    android:textSize="13sp" />

            </LinearLayout>
        </LinearLayout>

        <com.google.android.material.button.MaterialButton
            android:id="@+id/download_button"
            style="@style/Widget.Aletheia.Button.Primary"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_marginStart="8dp"
            android:insetTop="0dp"
            android:insetBottom="0dp"
            android:minWidth="40dp"
            android:minHeight="40dp"
            android:padding="8dp"
            app:icon="@drawable/ic_download"
            app:iconGravity="textStart"
            app:iconPadding="0dp" />
    </LinearLayout>

</com.google.android.material.card.MaterialCardView>
