<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".view.DetailFragment">

    <ImageView
        android:id="@+id/imageDetail"
        android:layout_width="220dp"
        android:layout_height="0dp"
        android:layout_marginTop="30dp"
        android:scaleType="centerCrop"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.25"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageButton
        android:id="@+id/buttonExit"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dp"
        android:layout_marginTop="15dp"
        android:background="@android:color/transparent"
        android:src="@drawable/exit_button"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageButton
        android:id="@+id/buttonLike"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="15dp"
        android:layout_marginRight="15dp"
        android:background="@android:color/transparent"
        android:src="@drawable/empty_like"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:fontFamily="@font/mulish_black"
        android:textColor="@color/black"
        android:textSize="25dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/imageDetail" />

    <TextView
        android:id="@+id/currentSeason"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="10dp"
        android:fontFamily="@font/mulish_bold"
        android:text="Current season"
        android:textColor="@color/title"
        android:textSize="16dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/title" />

    <LinearLayout
        android:id="@+id/header"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/currentSeason">

        <LinearLayout
            android:layout_width="90dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="@drawable/background"
            android:gravity="center"
            android:orientation="vertical"
            android:paddingHorizontal="10dp">

            <TextView
                android:id="@+id/dateStart"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="30dp"
                android:fontFamily="@font/mulish_bold"
                android:maxLines="2"
                android:textAlignment="center"
                android:textColor="@color/black"
                android:textSize="20dp" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#E1DFDF" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="20dp"
                android:fontFamily="@font/mulish_bold"
                android:maxLines="1"
                android:text="Start"
                android:textColor="@color/text"
                android:textSize="18dp" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:gravity="center"
            android:orientation="vertical"
            android:paddingHorizontal="10dp">

            <TextView
                android:id="@+id/nbMatches"
                android:layout_width="100dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="30dp"
                android:fontFamily="@font/mulish_bold"
                android:maxLines="1"
                android:textAlignment="center"
                android:textColor="@color/black"
                android:textSize="26dp" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#E1DFDF" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="20dp"
                android:fontFamily="@font/mulish_bold"
                android:maxLines="1"
                android:text="Number matches"
                android:textColor="@color/text"
                android:textSize="18dp" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="90dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="@drawable/background"
            android:gravity="center"
            android:orientation="vertical"
            android:paddingHorizontal="10dp">

            <TextView
                android:id="@+id/dateEnd"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="30dp"
                android:fontFamily="@font/mulish_bold"
                android:maxLines="3"
                android:textAlignment="center"
                android:textColor="@color/black"
                android:textSize="20dp" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#E1DFDF" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="20dp"
                android:fontFamily="@font/mulish_bold"
                android:maxLines="1"
                android:text="End"
                android:textColor="@color/text"
                android:textSize="18dp" />

        </LinearLayout>

    </LinearLayout>

    <TextView
        android:id="@+id/latestMatch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="20dp"
        android:fontFamily="@font/mulish_bold"
        android:text="Latest Match"
        android:textColor="@color/title"
        android:textSize="20dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/header" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/listRecentsMatches"
        android:layout_width="wrap_content"
        android:layout_height="500dp"
        android:layout_marginTop="10dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/latestMatch"
        tools:itemCount="100" />

</androidx.constraintlayout.widget.ConstraintLayout>