<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

    <!-- Scrollable content -->
    <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fillViewport="true">

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

            <!-- Empty history message (hidden by default) -->
            <TextView
                    android:id="@+id/empty_history_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/revanced_settings_search_empty_history_title"
                    android:textSize="18sp"
                    android:textStyle="bold"
                    android:textColor="?android:attr/textColorPrimary"
                    android:paddingStart="20dp"
                    android:paddingEnd="20dp"
                    android:paddingTop="16dp"
                    android:paddingBottom="16dp"
                    android:visibility="gone"
                    android:gravity="center" />

            <TextView
                    android:id="@+id/empty_history_summary"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/revanced_settings_search_empty_history_summary"
                    android:textSize="14sp"
                    android:textColor="?android:attr/textColorSecondary"
                    android:paddingStart="20dp"
                    android:paddingEnd="20dp"
                    android:paddingBottom="16dp"
                    android:visibility="gone"
                    android:gravity="center" />

            <!-- History header -->
            <TextView
                    android:id="@+id/search_history_header"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/revanced_settings_search_recent_searches"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:textColor="?android:attr/textColorPrimary"
                    android:paddingStart="20dp"
                    android:paddingEnd="20dp"
                    android:paddingTop="16dp"
                    android:paddingBottom="16dp"
                    android:clickable="false"
                    android:focusable="false" />

            <!-- History list -->
            <LinearLayout
                    android:id="@+id/search_history_list"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical" />

            <!-- Clear history button -->
            <TextView
                    android:id="@+id/clear_history_button"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:text="@string/revanced_settings_search_clear_history"
                    android:textSize="16sp"
                    android:textColor="?android:attr/colorAccent"
                    android:paddingStart="20dp"
                    android:paddingEnd="20dp"
                    android:paddingTop="16dp"
                    android:paddingBottom="16dp"
                    android:gravity="center"
                    android:background="?android:attr/selectableItemBackground"
                    android:clickable="true"
                    android:focusable="true" />

            <!-- Search Tips -->
            <LinearLayout
                    android:id="@+id/search_tips_card"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_marginStart="20dp"
                    android:layout_marginEnd="20dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"
                    android:background="?android:attr/selectableItemBackground"
                    android:gravity="center_vertical"
                    android:clickable="false"
                    android:focusable="false">

                <!-- Content -->
                <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:orientation="vertical">

                    <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@string/revanced_settings_search_tips_title"
                            android:textSize="18sp"
                            android:textStyle="bold"
                            android:textColor="?android:attr/textColorPrimary"
                            android:gravity="center" />

                    <TextView
                            android:id="@+id/revanced_settings_search_tips_summary"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:textSize="14sp"
                            android:textColor="?android:attr/textColorSecondary" />

                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</LinearLayout>
