<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
    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="wrap_content"
    android:layout_marginBottom="8dp"
    app:cardBackgroundColor="@color/card_background"
    app:cardCornerRadius="8dp"
    app:cardElevation="2dp"
    app:strokeColor="@color/card_stroke"
    app:strokeWidth="1dp">

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

        <!-- Player Number Indicator -->
        <TextView
            android:id="@+id/playerNumber"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:background="@drawable/bg_button_secondary"
            android:gravity="center"
            android:textColor="@color/text_primary"
            android:textSize="12sp"
            android:textStyle="bold"
            android:text="4" />

        <!-- Player Name Input -->
        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            android:hint="@string/player_name_hint"
            app:boxBackgroundColor="@color/white"
            app:boxStrokeColor="@color/primary"
            app:boxStrokeWidth="1dp"
            app:endIconMode="clear_text"
            app:hintTextColor="@color/text_hint"
            style="@style/Widget.Material3.TextInputLayout.OutlinedBox">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/playerName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textPersonName"
                android:maxLines="1"
                android:textSize="14sp" />

        </com.google.android.material.textfield.TextInputLayout>

        <!-- Remove Button with Material Design -->
        <com.google.android.material.button.MaterialButton
            android:id="@+id/removePlayerButton"
            style="@style/Widget.Material3.Button.IconButton.Filled"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:contentDescription="@string/remove_player"
            app:icon="@android:drawable/ic_delete"
            app:iconTint="@color/error"
            app:backgroundTint="@color/surface"
            app:iconSize="20dp" />

    </LinearLayout>

</com.google.android.material.card.MaterialCardView>
