<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/transparent">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/linearLayoutInvoiceType"
        android:layout_width="540dp"
        android:layout_height="720dp"
        android:background="@drawable/bg_rounded_surface"
        android:clipToOutline="true"
        android:paddingHorizontal="24dp"
        android:paddingTop="32dp"
        android:paddingBottom="32dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <!-- 上方：標題 (字距拉開) -->
        <TextView
            android:id="@+id/titleTextView"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/select_invoice_type"
            android:textColor="@color/primary"
            android:textSize="36sp"
            android:textStyle="bold"
            android:letterSpacing="0.15"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <!-- 中間：按鈕區域 (左右增加 padding, 按鈕高度使用維度變數) -->
        <LinearLayout
            android:id="@+id/cardContainer"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingHorizontal="32dp"
            app:layout_constraintBottom_toTopOf="@id/bottomButtonLayout"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/titleTextView">

            <!-- 卡片1：輸入載具 -->
            <androidx.cardview.widget.CardView
                android:id="@+id/cardVehicle"
                android:layout_width="match_parent"
                android:layout_height="@dimen/invoice_button_height"
                android:layout_marginBottom="12dp"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?attr/selectableItemBackground"
                app:cardBackgroundColor="@color/white"
                app:cardCornerRadius="12dp"
                app:cardElevation="2dp"
                app:cardUseCompatPadding="true">

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:text="@string/input_vehicle"
                        android:textColor="@color/black"
                        android:textSize="26sp"
                        android:textStyle="bold" />

                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <!-- 卡片2：捐贈發票 -->
            <androidx.cardview.widget.CardView
                android:id="@+id/cardDonation"
                android:layout_width="match_parent"
                android:layout_height="@dimen/invoice_button_height"
                android:layout_marginBottom="12dp"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?attr/selectableItemBackground"
                app:cardBackgroundColor="@color/white"
                app:cardCornerRadius="12dp"
                app:cardElevation="2dp"
                app:cardUseCompatPadding="true">

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:text="@string/donation_invoice_next"
                        android:textColor="@color/black"
                        android:textSize="26sp"
                        android:textStyle="bold" />

                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <!-- 卡片3：公司統編 -->
            <androidx.cardview.widget.CardView
                android:id="@+id/cardCustomerIdentifier"
                android:layout_width="match_parent"
                android:layout_height="@dimen/invoice_button_height"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?attr/selectableItemBackground"
                app:cardBackgroundColor="@color/white"
                app:cardCornerRadius="12dp"
                app:cardElevation="2dp"
                app:cardUseCompatPadding="true">

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:text="@string/company_tax_id"
                        android:textColor="@color/black"
                        android:textSize="26sp"
                        android:textStyle="bold" />

                </LinearLayout>
            </androidx.cardview.widget.CardView>

        </LinearLayout>

        <!-- 下方：返回按鈕 -->
        <LinearLayout
            android:id="@+id/bottomButtonLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="horizontal"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/buttonCancel"
                style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
                android:layout_width="match_parent"
                android:layout_height="64dp"
                android:backgroundTint="@color/warning"
                android:text="@string/return_to"
                android:textColor="@color/white"
                android:textSize="20sp"
                app:cornerRadius="8dp" />

        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
