<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    android:background="@color/bg_base"
    tools:context=".ui.clubs.PlayerDetailFragment">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="16dp">

        <!-- Player Photo (Circular) -->
        <com.google.android.material.card.MaterialCardView
            android:id="@+id/cardLogo"
            android:layout_width="140dp"
            android:layout_height="140dp"
            app:cardCornerRadius="70dp"
            app:cardElevation="0dp"
            app:strokeWidth="2dp"
            app:strokeColor="@color/border"
            app:cardBackgroundColor="@color/bg_elevated"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            android:layout_marginTop="16dp">

            <ImageView
                android:id="@+id/image_detail_player_photo"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                tools:src="@drawable/ic_menu_camera"/>
        </com.google.android.material.card.MaterialCardView>

        <!-- JOGADOR Label -->
        <TextView
            android:id="@+id/label_player"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="@font/font_ibm_plex_mono"
            android:text="JOGADOR"
            android:textSize="10sp"
            android:textColor="@color/text_3"
            android:letterSpacing="0.08"
            android:layout_marginTop="20dp"
            app:layout_constraintTop_toBottomOf="@id/cardLogo"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

        <!-- Player Name -->
        <TextView
            android:id="@+id/text_detail_player_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:fontFamily="@font/font_bebas_neue"
            tools:text="João Carlos Pinto Castro"
            android:textSize="26sp"
            android:textColor="@color/text_1"
            android:letterSpacing="0.04"
            android:gravity="center"
            android:layout_marginTop="4dp"
            app:layout_constraintTop_toBottomOf="@id/label_player"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

        <!-- Info Card -->
        <com.google.android.material.card.MaterialCardView
            android:id="@+id/card_player_info"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            app:cardCornerRadius="12dp"
            app:cardElevation="0dp"
            app:strokeWidth="1dp"
            app:strokeColor="@color/border"
            app:cardBackgroundColor="@color/bg_surface"
            app:layout_constraintTop_toBottomOf="@id/text_detail_player_name"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent">

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

                <!-- Birthplace -->
                <LinearLayout
                    android:id="@+id/layout_birthplace"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:gravity="center_vertical"
                    android:paddingVertical="10dp">

                    <ImageView
                        android:layout_width="32dp"
                        android:layout_height="32dp"
                        android:src="@drawable/ic_location"
                        app:tint="@color/danger"
                        android:background="@drawable/circle_edit_background"
                        android:backgroundTint="#1aef4444"
                        android:padding="6dp"/>

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

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/font_ibm_plex_mono"
                            android:text="NATURALIDADE"
                            android:textSize="9sp"
                            android:textColor="@color/text_3"
                            android:letterSpacing="0.05"/>

                        <TextView
                            android:id="@+id/text_detail_birthplace"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/font_ibm_plex_sans"
                            tools:text="Vila do Conde"
                            android:textSize="14sp"
                            android:textColor="@color/text_1"
                            android:textStyle="bold"
                            android:layout_marginTop="2dp"/>
                    </LinearLayout>
                </LinearLayout>

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

                <!-- Birth Date -->
                <LinearLayout
                    android:id="@+id/layout_birthdate"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:gravity="center_vertical"
                    android:paddingVertical="10dp">

                    <ImageView
                        android:layout_width="32dp"
                        android:layout_height="32dp"
                        android:src="@drawable/ic_calendar"
                        app:tint="@color/accent"
                        android:background="@drawable/circle_edit_background"
                        android:backgroundTint="#1a3b82f6"
                        android:padding="6dp"/>

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

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/font_ibm_plex_mono"
                            android:text="DATA DE NASCIMENTO"
                            android:textSize="9sp"
                            android:textColor="@color/text_3"
                            android:letterSpacing="0.05"/>

                        <TextView
                            android:id="@+id/text_detail_birthdate"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/font_ibm_plex_sans"
                            tools:text="1993-03-17"
                            android:textSize="14sp"
                            android:textColor="@color/text_1"
                            android:textStyle="bold"
                            android:layout_marginTop="2dp"/>
                    </LinearLayout>
                </LinearLayout>

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

                <!-- Total Goals -->
                <LinearLayout
                    android:id="@+id/layout_total_goals"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:gravity="center_vertical"
                    android:paddingVertical="10dp">

                    <ImageView
                        android:layout_width="32dp"
                        android:layout_height="32dp"
                        android:src="@drawable/ic_soccer"
                        app:tint="@color/brand"
                        android:background="@drawable/circle_edit_background"
                        android:backgroundTint="@color/brand_dim"
                        android:padding="6dp"/>

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

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/font_ibm_plex_mono"
                            android:text="TOTAL DE GOLOS"
                            android:textSize="9sp"
                            android:textColor="@color/text_3"
                            android:letterSpacing="0.05"/>

                        <TextView
                            android:id="@+id/text_detail_total_goals"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/font_ibm_plex_sans"
                            android:text="A carregar..."
                            android:textSize="14sp"
                            android:textColor="@color/brand"
                            android:textStyle="bold"
                            android:layout_marginTop="2dp"/>
                    </LinearLayout>
                </LinearLayout>

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

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
