<?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_marginHorizontal="16dp"
    android:layout_marginVertical="8dp"
    app:cardBackgroundColor="@color/bg_surface"
    app:cardCornerRadius="12dp"
    app:cardElevation="0dp"
    app:strokeWidth="1dp"
    app:strokeColor="@color/border">

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

        <!-- Header: Date, Time and Stadium -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/bg_elevated"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:paddingHorizontal="14dp"
            android:paddingVertical="10dp">

            <TextView
                android:id="@+id/text_match_info"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:fontFamily="@font/font_ibm_plex_mono"
                android:text="29/03/2026 10:00"
                android:textColor="@color/text_2"
                android:textSize="11sp" />

            <TextView
                android:id="@+id/text_match_stadium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="@font/font_ibm_plex_mono"
                android:text="Campo: Guilhabreu"
                android:textColor="@color/text_3"
                android:textSize="10sp" />
        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/border" />

        <!-- Body: Teams and Scores -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="horizontal"
            android:padding="16dp">

            <!-- Home Team -->
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1.2"
                android:gravity="center"
                android:orientation="vertical">

                <com.google.android.material.imageview.ShapeableImageView
                    android:id="@+id/img_home_logo"
                    android:layout_width="44dp"
                    android:layout_height="44dp"
                    android:padding="4dp"
                    android:background="@color/bg_elevated"
                    app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
                    app:strokeColor="@color/border"
                    app:strokeWidth="1dp"
                    android:scaleType="centerInside"
                    android:src="@drawable/ic_club_placeholder" />

                <TextView
                    android:id="@+id/text_home_team"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:fontFamily="@font/font_ibm_plex_sans"
                    android:text="J.U. Mosteiró"
                    android:textColor="@color/text_1"
                    android:textSize="12sp"
                    android:textStyle="bold"
                    android:gravity="center"
                    android:maxLines="2"
                    android:ellipsize="end" />
            </LinearLayout>

            <!-- Score Section -->
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_marginHorizontal="8dp"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/text_home_score"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/font_bebas_neue"
                    android:text="2"
                    android:textColor="@color/text_1"
                    android:textSize="36sp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/font_ibm_plex_sans"
                    android:text=":"
                    android:textColor="@color/text_3"
                    android:textSize="18sp"
                    android:layout_marginHorizontal="10dp" />

                <TextView
                    android:id="@+id/text_away_score"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/font_bebas_neue"
                    android:text="4"
                    android:textColor="@color/text_1"
                    android:textSize="36sp" />
            </LinearLayout>

            <!-- Away Team -->
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1.2"
                android:gravity="center"
                android:orientation="vertical">

                <com.google.android.material.imageview.ShapeableImageView
                    android:id="@+id/img_away_logo"
                    android:layout_width="44dp"
                    android:layout_height="44dp"
                    android:padding="4dp"
                    android:background="@color/bg_elevated"
                    app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
                    app:strokeColor="@color/border"
                    app:strokeWidth="1dp"
                    android:scaleType="centerInside"
                    android:src="@drawable/ic_club_placeholder" />

                <TextView
                    android:id="@+id/text_away_team"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:fontFamily="@font/font_ibm_plex_sans"
                    android:text="G.D.C. Rio Mau"
                    android:textColor="@color/text_1"
                    android:textSize="12sp"
                    android:textStyle="bold"
                    android:gravity="center"
                    android:maxLines="2"
                    android:ellipsize="end" />
            </LinearLayout>

        </LinearLayout>

        <!-- Match Report Button (Footer style) -->
        <com.google.android.material.button.MaterialButton
            android:id="@+id/btn_match_report"
            android:layout_width="match_parent"
            android:layout_height="38dp"
            android:layout_marginHorizontal="14dp"
            android:layout_marginBottom="14dp"
            android:backgroundTint="@color/bg_elevated"
            app:strokeColor="@color/border"
            app:strokeWidth="1dp"
            android:fontFamily="@font/font_ibm_plex_sans"
            android:text="Ficha de Jogo"
            android:textColor="@color/text_2"
            android:textSize="11sp"
            android:textStyle="bold"
            android:insetTop="0dp"
            android:insetBottom="0dp"
            app:cornerRadius="6dp"
            android:visibility="gone" />

    </LinearLayout>

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