<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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="match_parent"
    android:background="@color/app_background"
    android:fillViewport="true">

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

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:fontFamily="@font/open_sans_semibold"
            android:text="@string/reader_hub_title"
            android:textColor="@color/ink_color"
            android:textSize="30sp" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:text="@string/reader_hub_subtitle"
            android:textColor="@color/ink_soft_color"
            android:textSize="15sp" />

        <TextView
            android:id="@+id/downloaded_count"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="18dp"
            android:textColor="@color/ink_soft_color"
            android:textSize="13sp" />

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/current_book_card"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:clickable="true"
            android:focusable="true"
            android:visibility="gone"
            app:cardBackgroundColor="@color/white"
            app:cardCornerRadius="24dp"
            app:cardElevation="0dp"
            app:strokeColor="@color/border_color"
            app:strokeWidth="1dp">

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

                <ImageView
                    android:id="@+id/current_book_cover"
                    android:layout_width="164dp"
                    android:layout_height="234dp"
                    android:layout_gravity="center_horizontal"
                    android:scaleType="centerCrop" />

                <TextView
                    android:id="@+id/current_book_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="20dp"
                    android:ellipsize="end"
                    android:fontFamily="@font/open_sans_semibold"
                    android:gravity="center"
                    android:maxLines="2"
                    android:textColor="@color/ink_color"
                    android:textSize="21sp" />

                <TextView
                    android:id="@+id/current_book_author"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="6dp"
                    android:gravity="center"
                    android:textColor="@color/ink_soft_color"
                    android:textSize="14sp" />

                <ProgressBar
                    android:id="@+id/current_book_progress"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="5dp"
                    android:layout_marginTop="20dp"
                    android:max="100"
                    android:progressTint="@color/accent_color" />

                <TextView
                    android:id="@+id/current_book_progress_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="6dp"
                    android:gravity="center"
                    android:textColor="@color/ink_soft_color"
                    android:textSize="13sp" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/continue_reading_button"
                    android:layout_width="match_parent"
                    android:layout_height="54dp"
                    android:layout_marginTop="18dp"
                    android:text="@string/reader_hub_continue"
                    app:cornerRadius="27dp" />
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>

        <LinearLayout
            android:id="@+id/reader_empty_state"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="56dp"
            android:gravity="center"
            android:orientation="vertical"
            android:padding="24dp">

            <ImageView
                android:layout_width="72dp"
                android:layout_height="72dp"
                android:contentDescription="@null"
                android:src="@drawable/ic_nav_reader"
                app:tint="@color/accent_color" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:fontFamily="@font/open_sans_semibold"
                android:gravity="center"
                android:text="@string/reader_hub_empty_title"
                android:textColor="@color/ink_color"
                android:textSize="22sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:gravity="center"
                android:text="@string/reader_hub_empty_subtitle"
                android:textColor="@color/ink_soft_color"
                android:textSize="15sp" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/find_book_button"
                android:layout_width="wrap_content"
                android:layout_height="52dp"
                android:layout_marginTop="22dp"
                android:text="@string/reader_hub_open_catalog"
                app:cornerRadius="26dp" />
        </LinearLayout>
    </LinearLayout>
</androidx.core.widget.NestedScrollView>
