<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/home_background">

    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/main_fragment_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@id/mini_reader_panel"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ProgressBar
        android:id="@+id/mini_reader_progress"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="0dp"
        android:layout_height="3dp"
        android:max="100"
        android:progress="0"
        android:progressBackgroundTint="@color/home_border"
        android:progressTint="@color/home_progress"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/mini_reader_panel"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/mini_reader_panel"
        android:layout_width="0dp"
        android:layout_height="60dp"
        android:background="@color/home_background"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <ImageView
            android:id="@+id/mini_reader_cover"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_marginStart="16dp"
            android:contentDescription="@null"
            android:scaleType="centerCrop"
            android:src="@drawable/default_cover"
            android:translationY="1.75dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/mini_reader_title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            android:ellipsize="end"
            android:fontFamily="sans"
            android:maxLines="1"
            android:textColor="@color/home_primary"
            android:textSize="13.75sp"
            android:translationY="-0.25dp"
            app:layout_constraintBottom_toTopOf="@id/mini_reader_author"
            app:layout_constraintEnd_toStartOf="@id/mini_reader_open"
            app:layout_constraintStart_toEndOf="@id/mini_reader_cover"
            app:layout_constraintTop_toTopOf="@id/mini_reader_cover"
            app:layout_constraintVertical_chainStyle="packed" />

        <TextView
            android:id="@+id/mini_reader_author"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginTop="0dp"
            android:layout_marginEnd="8dp"
            android:ellipsize="end"
            android:fontFamily="sans"
            android:maxLines="1"
            android:textColor="@color/home_secondary"
            android:textSize="11.5sp"
            android:translationY="-0.25dp"
            app:layout_constraintBottom_toBottomOf="@id/mini_reader_cover"
            app:layout_constraintEnd_toStartOf="@id/mini_reader_open"
            app:layout_constraintStart_toEndOf="@id/mini_reader_cover"
            app:layout_constraintTop_toBottomOf="@id/mini_reader_title" />

        <TextView
            android:id="@+id/mini_reader_open"
            android:layout_width="80dp"
            android:layout_height="48dp"
            android:layout_marginEnd="16dp"
            android:background="@drawable/bg_home_mini_button"
            android:clickable="true"
            android:focusable="true"
            android:fontFamily="sans"
            android:gravity="center"
            android:maxLines="1"
            android:singleLine="true"
            android:text="@string/home_continue"
            android:textColor="@color/home_primary"
            android:textSize="17sp"
            android:textStyle="bold"
            android:translationY="2dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="@drawable/bg_bottom_navigation"
        android:elevation="0dp"
        android:minHeight="56dp"
        android:paddingTop="0dp"
        android:paddingBottom="0dp"
        app:itemActiveIndicatorStyle="@style/Widget.Aletheia.BottomNavigation.ActiveIndicator"
        app:itemHorizontalTranslationEnabled="false"
        app:itemIconSize="24dp"
        app:itemIconTint="@color/bottom_nav_item_colors"
        app:itemPaddingBottom="10.75dp"
        app:itemPaddingTop="8dp"
        app:itemTextColor="@color/bottom_nav_item_colors"
        app:itemTextAppearanceActive="@style/TextAppearance.Aletheia.BottomNavigation.Active"
        app:itemTextAppearanceInactive="@style/TextAppearance.Aletheia.BottomNavigation.Inactive"
        app:labelVisibilityMode="labeled"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:menu="@menu/bottom_nav_menu" />

</androidx.constraintlayout.widget.ConstraintLayout>
