<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
    android:background="@color/bg_base"
    tools:context=".ui.clubs.ClubsFragment">

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

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/font_bebas_neue"
            android:text="CLUBES"
            android:textSize="28sp"
            android:textColor="@color/text_1"
            android:letterSpacing="0.04" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/font_ibm_plex_sans"
            android:text="Lista de clubes participantes na liga."
            android:textColor="@color/text_2"
            android:textSize="12sp"
            android:layout_marginTop="4dp" />
    </LinearLayout>

    <!-- Category Toggle -->
    <com.google.android.material.button.MaterialButtonToggleGroup
        android:id="@+id/toggleGroupEscalao"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="16dp"
        android:layout_marginBottom="14dp"
        app:checkedButton="@id/btnSeniores"
        app:singleSelection="true">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/btnSeniores"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:fontFamily="@font/font_ibm_plex_sans"
            android:text="Seniores"
            android:textColor="@color/toggle_text_color"
            android:textSize="12sp"
            android:textStyle="bold"
            app:backgroundTint="@color/toggle_bg_color"
            app:strokeColor="@color/border"
            app:strokeWidth="1dp"
            app:cornerRadius="8dp" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/btnJuniores"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:fontFamily="@font/font_ibm_plex_sans"
            android:text="Juniores"
            android:textColor="@color/toggle_text_color"
            android:textSize="12sp"
            android:textStyle="bold"
            app:backgroundTint="@color/toggle_bg_color"
            app:strokeColor="@color/border"
            app:strokeWidth="1dp"
            app:cornerRadius="8dp" />
    </com.google.android.material.button.MaterialButtonToggleGroup>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_clubs"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            android:paddingTop="4dp"
            android:paddingBottom="16dp"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

        <ProgressBar
            android:id="@+id/progress_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:indeterminateTint="@color/brand" />
    </FrameLayout>

</LinearLayout>
