<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/player_preroll"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FF050708"
    android:clickable="true"
    android:clipChildren="false"
    android:focusable="false"
    android:visibility="gone">

    <ImageView
        android:id="@+id/player_preroll_brand"
        android:layout_width="58dp"
        android:layout_height="50dp"
        android:layout_gravity="start|top"
        android:layout_marginStart="44dp"
        android:layout_marginTop="28dp"
        android:contentDescription="@string/player_preroll_brand_logo"
        android:scaleType="fitCenter"
        android:src="@drawable/emby_logo" />

    <LinearLayout
        android:id="@+id/player_preroll_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipChildren="false"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:paddingStart="44dp"
        android:paddingTop="84dp"
        android:paddingEnd="44dp"
        android:paddingBottom="22dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="224dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <FrameLayout
                android:id="@+id/player_preroll_video_host"
                android:layout_width="398dp"
                android:layout_height="224dp"
                android:layout_marginEnd="38dp"
                android:background="@drawable/player_preroll_video_background"
                android:clipToOutline="true"
                android:foreground="@drawable/player_preroll_video_frame"
                android:outlineProvider="background">

                <LinearLayout
                    android:id="@+id/player_preroll_countdown_container"
                    android:layout_width="80dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="end|bottom"
                    android:layout_marginEnd="18dp"
                    android:layout_marginBottom="16dp"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="5dp"
                        android:text="@string/player_preroll_starting_in"
                        android:textAllCaps="true"
                        android:textColor="#CCFFFFFF"
                        android:textSize="9sp"
                        android:textStyle="bold" />

                    <com.ponzischeme89.memby.ui.player.PrerollCountdownView
                        android:id="@+id/player_preroll_countdown"
                        android:layout_width="66dp"
                        android:layout_height="66dp"
                        android:contentDescription="@string/player_preroll_countdown_initial" />
                </LinearLayout>
            </FrameLayout>

            <LinearLayout
                android:id="@+id/player_preroll_schedule_panel"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="NOW"
                    android:textColor="#FF64C85A"
                    android:textSize="11sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/player_preroll_now_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="7dp"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:text="Northbound · The Crossing"
                    android:textColor="#FFFFFFFF"
                    android:textSize="26sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/player_preroll_now_metadata"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:text="S02E04  ·  48 mins"
                    android:textColor="#FFD0D6DB"
                    android:textSize="12sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/player_preroll_now_overview"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:ellipsize="end"
                    android:maxLines="3"
                    android:text="The crew follows a signal beyond the last charted crossing and finds the shore waiting for them."
                    android:textColor="#FFB1BAC1"
                    android:textSize="13sp" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingStart="4dp"
            android:paddingEnd="4dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="UPCOMING"
                android:textColor="#FF64C85A"
                android:textSize="11sp"
                android:textStyle="bold" />
        </LinearLayout>

        <GridLayout
            android:id="@+id/player_preroll_calendar"
            android:layout_width="match_parent"
            android:layout_height="170dp"
            android:layout_marginTop="5dp"
            android:columnCount="4"
            android:rowCount="2"
            android:useDefaultMargins="false" />
    </LinearLayout>
</FrameLayout>
