<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/rootUploadOverview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/brand_window_bg"
    android:orientation="vertical"
    android:padding="16dp">

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

        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardBackgroundColor="@android:color/transparent"
            app:cardCornerRadius="22dp"
            app:cardElevation="3dp"
            app:strokeColor="@color/brand_header_stroke"
            app:strokeWidth="1dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/bg_header_surface"
                android:orientation="vertical"
                android:paddingStart="18dp"
                android:paddingTop="18dp"
                android:paddingEnd="18dp"
                android:paddingBottom="16dp">

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

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:orientation="vertical"
                        android:paddingEnd="12dp">

                        <TextView
                            android:id="@+id/subtitleUploadOverview"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:textColor="@color/brand_text_muted"
                            android:textSize="14sp" />

                        <TextView
                            android:id="@+id/titleUploadOverview"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="2dp"
                            android:textColor="@color/brand_purple"
                            android:textSize="22sp"
                            android:textStyle="bold" />
                    </LinearLayout>

                    <Spinner
                        android:id="@+id/uploadLangSpinner"
                        android:layout_width="wrap_content"
                        android:layout_height="@dimen/language_picker_height"
                        android:background="@drawable/bg_control_chip_dropdown"
                        android:minWidth="@dimen/language_picker_min_width"
                        android:popupBackground="@drawable/bg_spinner_popup" />
                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:layout_marginTop="14dp"
                    android:layout_marginBottom="12dp"
                    android:background="@color/brand_header_divider" />

                <TextView
                    android:id="@+id/summaryUploadOverview"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/bg_control_chip"
                    android:paddingStart="14dp"
                    android:paddingTop="10dp"
                    android:paddingEnd="14dp"
                    android:paddingBottom="10dp"
                    android:textColor="@color/brand_text_dark"
                    android:textSize="14sp"
                    android:textStyle="bold"
                    android:visibility="gone" />

                <ProgressBar
                    android:id="@+id/progressBarUploadDeterminate"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="8dp"
                    android:layout_marginTop="12dp"
                    android:max="100"
                    android:progressDrawable="@drawable/bg_progress_questionnaires"
                    android:visibility="gone" />
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/uploadListHost"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="12dp"
            android:layout_weight="1"
            app:cardBackgroundColor="@color/brand_surface"
            app:cardCornerRadius="16dp"
            app:cardElevation="0dp"
            app:strokeColor="@color/brand_card_stroke"
            app:strokeWidth="1dp">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/uploadListRecycler"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:clipToPadding="false"
                    android:paddingStart="10dp"
                    android:paddingTop="8dp"
                    android:paddingEnd="10dp"
                    android:paddingBottom="10dp"
                    android:scrollbars="vertical" />

                <TextView
                    android:id="@+id/emptyViewUpload"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:gravity="center"
                    android:lineSpacingExtra="3dp"
                    android:padding="24dp"
                    android:textColor="@color/brand_text_muted"
                    android:textSize="15sp"
                    android:visibility="gone" />

                <include
                    android:id="@+id/uploadListLoading"
                    layout="@layout/view_screen_loading_overlay"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" />
            </FrameLayout>
        </com.google.android.material.card.MaterialCardView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingTop="12dp">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/backButtonUpload"
                android:layout_width="0dp"
                android:layout_height="48dp"
                android:layout_marginEnd="8dp"
                android:layout_weight="1"
                android:textAllCaps="false"
                android:textColor="@color/brand_text_dark"
                app:backgroundTint="@color/brand_surface"
                app:cornerRadius="10dp"
                app:strokeColor="@color/brand_stroke"
                app:strokeWidth="1dp" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/confirmUploadButton"
                android:layout_width="0dp"
                android:layout_height="48dp"
                android:layout_marginStart="8dp"
                android:layout_weight="1"
                android:textAllCaps="false"
                android:textColor="@android:color/white"
                app:backgroundTint="@color/brand_upload_accent"
                app:cornerRadius="10dp" />
        </LinearLayout>
    </LinearLayout>
</LinearLayout>
