<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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/itemContainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.flaviofaria.kenburnsview.KenBurnsView
        android:id="@+id/itemCompactBanner"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        tools:ignore="ContentDescription,ImageContrastCheck"
        tools:srcCompat="@tools:sample/backgrounds/scenic[1]" />
    <ImageView
        android:id="@+id/itemCompactBannerNoKen"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        tools:ignore="ContentDescription,ImageContrastCheck"
        tools:srcCompat="@tools:sample/backgrounds/scenic[1]" />

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"
        android:visibility="visible"
        app:srcCompat="@drawable/linear_gradient_bg"
        tools:ignore="ContentDescription,ImageContrastCheck" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:layout_marginBottom="110dp"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:orientation="vertical"
        android:padding="24dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal">

            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="-16dp"
                android:layout_marginTop="-16dp"
                android:layout_marginEnd="-16dp"
                android:layout_marginBottom="-16dp"
                android:clipToPadding="false"
                android:padding="24dp">

                <androidx.cardview.widget.CardView
                    android:id="@+id/itemCompactCard"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:translationZ="8dp"
                    app:cardCornerRadius="16dp"
                    app:cardElevation="4dp">

                    <com.google.android.material.imageview.ShapeableImageView
                        android:id="@+id/itemCompactImage"
                        android:layout_width="108dp"
                        android:layout_height="160dp"
                        android:scaleType="centerCrop"
                        android:transitionName="mediaCover"
                        app:shapeAppearanceOverlay="@style/roundedImageView"
                        tools:ignore="ContentDescription,ImageContrastCheck"
                        tools:srcCompat="@tools:sample/backgrounds/scenic" />

                    <LinearLayout
                        android:id="@+id/itemCompactScoreBG"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="bottom|end"
                        android:background="@drawable/item_score"
                        android:backgroundTint="#BFFFFFFF"
                        android:backgroundTintMode="multiply"
                        android:orientation="horizontal"
                        android:paddingStart="8dp"
                        android:paddingEnd="6dp">

                        <TextView
                            android:id="@+id/itemCompactScore"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="2dp"
                            android:fontFamily="@font/poppins_bold"
                            android:paddingTop="2dp"
                            android:textColor="?attr/colorOnPrimary"
                            android:textSize="12sp"
                            tools:ignore="TextContrastCheck"
                            tools:text="0.0" />

                        <ImageView
                            android:id="@+id/imageView2"
                            android:layout_width="12dp"
                            android:layout_height="match_parent"
                            app:srcCompat="@drawable/ic_round_star_24"
                            app:tint="?attr/colorOnPrimary"
                            tools:ignore="ContentDescription" />

                    </LinearLayout>

                </androidx.cardview.widget.CardView>

                <androidx.cardview.widget.CardView
                    android:id="@+id/itemCompactOngoing"
                    android:layout_width="16dp"
                    android:layout_height="16dp"
                    android:layout_gravity="bottom"
                    android:alpha="0.8"
                    android:translationZ="8dp"
                    app:cardCornerRadius="8dp"
                    app:cardElevation="4dp">

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:background="@drawable/item_ongoing" />
                </androidx.cardview.widget.CardView>
            </FrameLayout>

            <LinearLayout
                android:id="@+id/itemCompactTitleContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:orientation="vertical"
                android:padding="8dp">

                <TextView
                    android:id="@+id/itemCompactTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:fontFamily="@font/poppins_bold"
                    android:maxLines="3"
                    android:textSize="16dp"
                    android:transitionName="mediaTitle"
                    tools:ignore="SpUsage"
                    tools:text="@string/slogan" />

                <TextView
                    android:id="@+id/itemCompactStatus"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:alpha="0.66"
                    android:ellipsize="marquee"
                    android:fontFamily="@font/poppins_bold"
                    android:marqueeRepeatLimit="marquee_forever"
                    android:paddingTop="4dp"
                    android:singleLine="true"
                    android:text="@string/status"
                    android:textColor="?attr/colorPrimary"
                    android:textSize="14dp"
                    tools:ignore="SpUsage,TextContrastCheck" />

            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:orientation="horizontal">

            <LinearLayout
                android:layout_width="108dp"
                android:layout_height="match_parent"
                android:gravity="center"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/itemCompactTotal"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="14dp"
                    tools:ignore="SpUsage"
                    tools:text="100" />

                <TextView
                    android:id="@+id/itemTotal"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:alpha="0.66"
                    android:ellipsize="end"
                    android:singleLine="true"
                    android:text="@string/eps"
                    android:textSize="14dp"
                    tools:ignore="SpUsage" />

            </LinearLayout>

            <TextView
                android:id="@+id/itemCompactGenres"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_weight="1"
                android:alpha="0.66"
                android:ellipsize="end"
                android:maxLines="1"
                android:textAlignment="viewEnd"
                android:textSize="14dp"
                android:transitionName="mediaTitle"
                tools:ignore="SpUsage"
                tools:text="@string/genres" />
        </LinearLayout>

    </LinearLayout>

</FrameLayout>