<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@color/background_grey">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:background="@color/primary_dark"
        android:gravity="center_vertical"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:orientation="horizontal">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Process Refund"
            android:textColor="@color/white"
            android:textSize="20sp"
            android:textStyle="bold"/>

    </LinearLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="24dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:background="@drawable/rounded_card"
                android:padding="16dp"
                android:layout_marginBottom="16dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Sale ID"
                    android:textColor="@color/text_dark"
                    android:textSize="12sp"
                    android:layout_marginBottom="4dp"/>

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

                    <EditText
                        android:id="@+id/etRefundSaleId"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:hint="Enter Sale ID"
                        android:inputType="number"
                        android:layout_marginEnd="8dp"
                        android:layout_marginBottom="16dp"/>

                    <Button
                        android:id="@+id/btnLoadSale"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Load"
                        android:backgroundTint="@color/primary_medium"
                        android:textColor="@color/white"/>

                </LinearLayout>

                <TextView
                    android:id="@+id/tvSaleInfo"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Load a sale to see details"
                    android:textColor="#888888"
                    android:textSize="13sp"
                    android:layout_marginBottom="16dp"/>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Refund Reason"
                    android:textColor="@color/text_dark"
                    android:textSize="12sp"
                    android:layout_marginBottom="4dp"/>

                <EditText
                    android:id="@+id/etRefundReason"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="Enter reason for refund"
                    android:inputType="textMultiLine"
                    android:lines="3"
                    android:layout_marginBottom="16dp"/>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Payment Method"
                    android:textColor="@color/text_dark"
                    android:textSize="12sp"
                    android:layout_marginBottom="4dp"/>

                <Spinner
                    android:id="@+id/spinnerRefundPayment"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

        </LinearLayout>

    </ScrollView>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="@color/white"
        android:padding="16dp">

        <Button
            android:id="@+id/btnRefundBack"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginEnd="8dp"
            android:text="Back"
            android:backgroundTint="@color/primary_medium"
            android:textColor="@color/white"/>

        <Button
            android:id="@+id/btnProcessRefund"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginStart="8dp"
            android:text="Process Refund"
            android:backgroundTint="@color/accent_coral"
            android:textColor="@color/white"/>

    </LinearLayout>

</LinearLayout>
