<?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="111dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="8dp"
    android:clickable="true"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:focusable="true"
    android:foreground="?attr/selectableItemBackground"
    app:cardBackgroundColor="@android:color/transparent"
    app:cardCornerRadius="10dp"
    app:cardElevation="0dp"
    app:strokeWidth="0dp">

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

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="180dp"
            android:clipChildren="false"
            android:clipToPadding="false">

            <ImageView
                android:id="@+id/book_cover"
                android:layout_width="match_parent"
                android:layout_height="174dp"
                android:layout_marginTop="6dp"
                android:background="@drawable/bg_cover_placeholder"
                android:importantForAccessibility="no"
                android:scaleType="centerCrop" />

            <TextView
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="top|end"
                android:background="@drawable/bg_circle_white"
                android:contentDescription="@null"
                android:fontFamily="sans"
                android:gravity="center"
                android:importantForAccessibility="no"
                android:text="♡"
                android:textColor="@color/home_secondary"
                android:textSize="32sp"
                android:translationX="4dp" />
        </FrameLayout>

        <TextView
            android:id="@+id/book_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone" />

        <TextView
            android:id="@+id/book_author"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone" />

        <TextView
            android:id="@+id/book_format"
            android:layout_width="wrap_content"
            android:layout_height="20dp"
            android:layout_marginTop="6.5dp"
            android:background="@drawable/bg_home_format"
            android:fontFamily="sans"
            android:gravity="center"
            android:maxLines="1"
            android:paddingStart="8dp"
            android:paddingEnd="8dp"
            android:singleLine="true"
            android:textColor="@color/home_tertiary"
            android:textSize="12sp" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="14.5dp"
            android:layout_marginTop="2dp"
            android:fontFamily="sans-serif-medium"
            android:gravity="center_vertical"
            android:includeFontPadding="false"
            android:maxLines="1"
            android:singleLine="true"
            android:text="@string/action_download"
            android:textAllCaps="false"
            android:textColor="@color/home_accent"
            android:textSize="12sp" />
    </LinearLayout>
</com.google.android.material.card.MaterialCardView>
