<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/headerContainer"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingHorizontal="@dimen/additional_horizontal_spacing"
    android:layout_marginTop="?attr/actionBarSize"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="156dp"
        android:orientation="horizontal"
        android:gravity="bottom">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/image_readability_tint"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:layout_alignParentBottom="true">

            <View
                android:layout_width="148dp"
                android:layout_height="match_parent" />

            <Button
                android:id="@+id/butSubscribe"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/subscribe_label"
                android:visibility="gone"
                android:layout_marginVertical="4dp"
                tools:visibility="visible" />

            <ImageButton
                android:id="@+id/butShowInfo"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?attr/selectableItemBackground"
                android:contentDescription="@string/show_info_label"
                android:layout_marginLeft="-4dp"
                android:layout_marginStart="-4dp"
                android:scaleType="fitXY"
                android:padding="12dp"
                app:srcCompat="@drawable/ic_info_white"
                tools:visibility="visible" />

            <ImageButton
                android:id="@+id/butFilter"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?attr/selectableItemBackground"
                android:contentDescription="@string/filter"
                android:scaleType="fitXY"
                android:padding="12dp"
                app:srcCompat="@drawable/ic_filter_white"
                tools:visibility="visible" />

            <ImageButton
                android:id="@+id/butShowSettings"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?attr/selectableItemBackground"
                android:contentDescription="@string/show_feed_settings_label"
                android:scaleType="fitXY"
                android:padding="12dp"
                app:srcCompat="@drawable/ic_settings_white"
                tools:visibility="visible" />

        </LinearLayout>

        <ImageView
            android:layout_width="12dp"
            android:layout_height="12dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true"
            android:scaleType="fitXY"
            app:srcCompat="@drawable/ic_rounded_corner_left" />

        <ImageView
            android:layout_width="12dp"
            android:layout_height="12dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:scaleType="fitXY"
            app:srcCompat="@drawable/ic_rounded_corner_right" />

        <androidx.cardview.widget.CardView
            android:id="@+id/coverHolder"
            android:layout_width="124dp"
            android:layout_height="124dp"
            android:layout_marginBottom="24dp"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:layout_alignParentBottom="true"
            app:cardBackgroundColor="@color/non_square_icon_background"
            app:cardCornerRadius="8dp"
            app:cardPreventCornerOverlap="false"
            app:cardElevation="0dp">

            <ImageView
                android:id="@+id/imgvCover"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_centerVertical="true"
                android:importantForAccessibility="no"
                tools:src="@tools:sample/avatars" />

        </androidx.cardview.widget.CardView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toEndOf="@id/coverHolder"
            android:layout_alignTop="@id/coverHolder"
            android:layout_marginEnd="16dp"
            android:orientation="vertical">

            <TextView
                android:id="@+id/txtvTitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:maxLines="2"
                android:shadowColor="@color/black"
                android:shadowRadius="2"
                android:textColor="@color/white"
                style="@style/AntennaPod.TextView.Heading"
                tools:text="Podcast title" />

            <TextView
                android:id="@+id/txtvAuthor"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:maxLines="2"
                android:shadowColor="@color/black"
                android:shadowRadius="2"
                android:textColor="@color/white"
                android:textSize="@dimen/text_size_small"
                tools:text="Podcast author" />

        </LinearLayout>

    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:background="?android:attr/colorBackground">

        <TextView
            android:id="@+id/txtvFailure"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColor="?attr/icon_red"
            android:visibility="gone"
            android:text="@string/refresh_failed_msg"
            android:layout_marginHorizontal="16dp"
            android:layout_marginVertical="8dp"
            android:paddingHorizontal="16dp"
            android:paddingVertical="8dp"
            android:background="@drawable/bg_message_error"
            android:foreground="?android:attr/selectableItemBackground"
            tools:visibility="visible"
            tools:text="(!) Last refresh failed" />

        <TextView
            android:id="@+id/txtvInformation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="2dp"
            android:foreground="?android:attr/selectableItemBackground"
            android:visibility="gone"
            android:gravity="center"
            android:textColor="?attr/colorAccent"
            tools:visibility="visible"
            tools:text="(i) Information" />

        <TextView
            android:id="@+id/txtvUpdatesDisabled"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="2dp"
            android:visibility="gone"
            android:gravity="center"
            android:textColor="?attr/colorAccent"
            tools:visibility="visible"
            tools:text="Updates disabled" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/descriptionContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingHorizontal="16dp"
        android:paddingTop="16dp"
        android:background="?android:attr/colorBackground"
        android:orientation="vertical"
        android:visibility="gone">

        <TextView
            android:id="@+id/subscribeNagLabel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:paddingHorizontal="16dp"
            android:paddingVertical="8dp"
            android:background="@drawable/bg_message_info"
            android:textColor="?attr/colorAccent"
            android:text="@string/state_deleted_not_subscribed" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="4dp"
            android:text="@string/description_label"
            style="@style/TextAppearance.Material3.TitleMedium" />

        <TextView
            android:id="@+id/headerDescriptionLabel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:lineHeight="20dp"
            android:maxLines="3"
            android:layout_marginBottom="16dp"
            android:background="?android:attr/selectableItemBackground"
            style="@style/TextAppearance.Material3.BodyMedium"
            tools:text="@string/design_time_lorem_ipsum" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/preview_episodes"
            android:layout_marginBottom="4dp"
            style="@style/TextAppearance.Material3.TitleMedium" />

    </LinearLayout>

</LinearLayout>
