<?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="@drawable/soft_bg_gradient_light_blue_purple">

    <!-- 顶部栏 -->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="20dp"
        android:paddingEnd="20dp"
        android:paddingTop="16dp"
        android:paddingBottom="16dp">

        <!-- 返回按钮 -->
        <ImageView
            android:id="@+id/iv_back"
            android:layout_width="44dp"
            android:layout_height="44dp"
            android:layout_alignParentStart="true"
            android:layout_centerVertical="true"
            android:clickable="true"
            android:contentDescription="Back"
            android:focusable="true"
            android:src="@drawable/slim_back_arrow_svg" />

        <!-- 搜索框 -->
        <LinearLayout
            android:id="@+id/layout_search_box"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_toEndOf="@id/iv_back"
            android:layout_alignParentEnd="true"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="20dp"
            android:layout_centerVertical="true"
            android:orientation="horizontal"
            android:background="@drawable/small_bg_box_search"
            android:paddingStart="16dp"
            android:paddingEnd="16dp"
            android:paddingTop="12dp"
            android:paddingBottom="12dp"
            android:gravity="center_vertical"
            android:minHeight="48dp"
            android:clickable="true"
            android:focusable="false">

            <ImageView
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:src="@drawable/fast_ic_search_icon"
                android:layout_marginEnd="12dp" />

            <EditText
                android:id="@+id/et_search"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:hint="Search keyboards or categories..."
                android:textSize="16sp"
                android:textColor="@color/main_text_color"
                android:textColorHint="@color/color_gray"
                android:background="@android:color/transparent"
                android:maxLines="1"
                android:imeOptions="actionSearch"
                android:inputType="text"
                android:focusableInTouchMode="true"
                android:minHeight="24dp" />

            <!-- 清除按钮（在搜索框内） -->
            <ImageView
                android:id="@+id/iv_clear"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:src="@drawable/open_ic_clear_button"
                android:padding="4dp"
                android:contentDescription="Clear"
                android:clickable="true"
                android:focusable="true"
                android:visibility="gone"
                android:layout_marginStart="8dp" />

        </LinearLayout>

    </RelativeLayout>

    <!-- 初始提示状态 -->
    <LinearLayout
        android:id="@+id/layout_initial"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:gravity="center"
        android:paddingStart="20dp"
        android:paddingEnd="20dp"
        android:paddingTop="40dp">

        <ImageView
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:src="@drawable/fast_ic_search_icon"
            android:tint="@color/color_gray"
            android:layout_marginBottom="16dp" />

        <com.app.brush.guitar.ink.iguana.IsotopeTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Search for keyboards"
            android:textSize="18sp"
            android:textColor="@color/main_text_color"
            android:layout_marginBottom="8dp"
            app:apply_font="true" />

        <com.app.brush.guitar.ink.iguana.IsotopeTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Enter keywords to find your favorite keyboard themes"
            android:textSize="14sp"
            android:textColor="@color/color_gray"
            android:gravity="center"
            app:apply_font="true" />

    </LinearLayout>

    <!-- 搜索结果列表 -->
    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recycler_search"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:paddingStart="20dp"
        android:paddingEnd="20dp"
        android:paddingTop="8dp"
        android:visibility="gone" />

    <!-- 空状态 -->
    <LinearLayout
        android:id="@+id/layout_empty"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:gravity="center"
        android:visibility="gone">

        <ImageView
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:src="@drawable/fast_ic_search_icon"
            android:tint="@color/color_gray"
            android:layout_marginBottom="16dp" />

        <com.app.brush.guitar.ink.iguana.IsotopeTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="No results found"
            android:textSize="16sp"
            android:textColor="@color/color_gray"
            app:apply_font="true" />

    </LinearLayout>

</LinearLayout>


