<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="@color/white">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:orientation="vertical">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:gravity="center_vertical"
            android:elevation="5dp"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/back_btn"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginStart="5dp"
                android:contentDescription="@string/back_button"
                android:padding="5dp"
                android:layout_centerVertical="true"
                android:src="@drawable/quantum_ic_arrow_back_grey600_24"
                app:tint="@color/black" />

            <LinearLayout
                android:id="@+id/head_titles"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@id/back_btn"
                android:layout_toStartOf="@id/refresh_btn"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginEnd="15dp"
                android:layout_marginStart="5dp"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/senior_name_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:visibility="gone"

                    android:ellipsize="end"
                    android:fontFamily="@font/nunito_semibold"
                    android:singleLine="true"
                    tools:text="Aditya"

                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    android:textColor="@color/black"

                    />

                <TextView
                    android:id="@+id/last_updated"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:visibility="gone"
                    tools:text="Last updated at 02 sep 2023 at 05:35 pm"

                    android:ellipsize="end"
                    android:fontFamily="@font/nunito_regular"
                    android:singleLine="true"

                    android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
                    android:textColor="@android:color/black"

                    />

            </LinearLayout>

            <ImageView
                android:id="@+id/refresh_btn"
                android:visibility="gone"
                android:layout_centerVertical="true"
                android:layout_alignParentEnd="true"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginEnd="15dp"
                android:contentDescription="@string/back_button"
                android:padding="5dp"
                android:src="@drawable/ic_refresh"
                />

        </RelativeLayout>

        <TextView
            android:id="@+id/geofencing_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/geofencing"
            android:textColor="@color/black"

            android:textSize="@dimen/_18ssp"
            android:visibility="visible"

            />

        <TextView
            android:id="@+id/geofencing_sub_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"
            android:layout_marginVertical="15dp"
            android:fontFamily="@font/nunito_regular"
            android:text="@string/set_specific_geographic_areas_and_receive_instant_alerts_when_your_loved_one_leaves_the_geofenced_zone"

            android:textSize="@dimen/_14ssp"
            android:visibility="visible"

            />

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

            <fragment
                android:id="@+id/geofence_map"
                android:name="com.google.android.gms.maps.SupportMapFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="@dimen/_10sdp"

                android:layout_marginTop="@dimen/_10sdp"
                android:visibility="gone"

                app:cardBackgroundColor="@color/white"
                app:cardCornerRadius="20dp"

                app:cardElevation="5dp"
                app:strokeColor="@color/color_accent"

                app:strokeWidth="0.5dp"

                >

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:layout_marginHorizontal="15dp"
                    android:layout_marginVertical="10dp"
                    android:drawablePadding="15dp"
                    android:fontFamily="@font/nunito_regular"

                    android:text="@string/enter_new_address_here"
                    android:textColor="@android:color/darker_gray"

                    android:textSize="@dimen/_14ssp"
                    app:drawableStartCompat="@drawable/ic_search_outline"

                    />

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

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/update_geofence_box"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"

                android:layout_below="@id/search"
                android:layout_marginHorizontal="@dimen/_10sdp"

                android:layout_marginTop="@dimen/_10sdp"
                android:visibility="visible"

                app:cardBackgroundColor="@color/white"
                app:cardCornerRadius="10dp"

                app:cardElevation="5dp"
                app:strokeColor="@color/color_accent"

                app:strokeWidth="1dp"

                >

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

                    <TextView
                        android:id="@+id/distance_away_txt"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="15dp"

                        android:layout_marginTop="15dp"
                        android:fontFamily="@font/nunito_regular"
                        android:text="@string/destination_0_5m_away"
                        android:textColor="@color/black"

                        android:textSize="@dimen/_14ssp"
                        android:visibility="gone"

                        />

                    <TextView
                        android:id="@+id/senior_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"

                        android:layout_marginHorizontal="15dp"
                        android:layout_marginTop="5dp"
                        android:fontFamily="@font/nunito_bold"
                        android:text="@string/senior_address"

                        android:textColor="@color/black"
                        android:textSize="@dimen/_14ssp"

                        />

                    <TextView
                        android:id="@+id/home_address"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/senior_title"

                        android:layout_marginHorizontal="15dp"

                        android:layout_marginBottom="5dp"
                        android:layout_toStartOf="@id/set_gf"
                        android:ellipsize="end"
                        android:fontFamily="@font/nunito_regular"

                        android:maxLines="2"
                        android:text="@string/loading"

                        android:textColor="@android:color/black"
                        android:textSize="@dimen/_14ssp"

                        />

                    <ImageView
                        android:id="@+id/set_gf"
                        android:layout_width="25dp"
                        android:layout_height="25dp"

                        android:layout_alignParentEnd="true"

                        android:layout_marginVertical="8dp"
                        android:layout_marginEnd="8dp"

                        android:padding="3dp"
                        app:srcCompat="@drawable/ic_setting"
                        app:tint="@color/black" />

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/change_btn"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"

                        android:layout_below="@+id/home_address"
                        android:layout_marginHorizontal="15dp"
                        android:layout_marginBottom="5dp"

                        android:fontFamily="@font/nunito_regular"
                        android:text="@string/change"
                        android:textAllCaps="false"
                        android:textColor="@color/white"

                        />

                </RelativeLayout>

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

            <LinearLayout
                android:id="@+id/update_btns_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_margin="15dp"
                android:orientation="horizontal"
                android:visibility="gone"
                android:weightSum="2">

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/reset_btn"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"

                    android:fontFamily="@font/nunito_regular"
                    android:text="@string/cancel"
                    android:textAllCaps="false"
                    android:textColor="@color/black"

                    app:backgroundTint="@color/white"
                    app:cornerRadius="5dp"

                    />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/update_btn"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="15dp"

                    android:layout_weight="1"

                    android:fontFamily="@font/nunito_regular"
                    android:text="@string/update"
                    android:textAllCaps="false"
                    android:textColor="@color/white"

                    app:backgroundTint="@color/color_primary"
                    app:cornerRadius="5dp"

                    />

            </LinearLayout>

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/home_location_btn"
                android:visibility="visible"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"

                android:layout_marginStart="15dp"

                android:layout_marginTop="15dp"

                android:layout_marginEnd="15dp"
                android:layout_marginBottom="15dp"
                android:src="@drawable/img_pat_curr_location"
                app:backgroundTint="@color/white"
                app:cardCornerRadius="30dp"
                app:cardElevation="5dp">

                <ImageView
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_margin="8dp"
                    android:src="@drawable/img_home_marker" />

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

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/cg_location_Btn"
                android:visibility="visible"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"

                android:layout_alignParentBottom="true"
                android:layout_margin="15dp"
                android:src="@drawable/img_pat_curr_location"

                app:backgroundTint="@color/white"

                app:cardCornerRadius="30dp"
                app:cardElevation="5dp">

                <de.hdodenhof.circleimageview.CircleImageView
                    android:id="@+id/pat_cur_loc_"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_margin="8dp"
                    android:src="@drawable/img_pat_curr_location" />

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

        </RelativeLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/location_bs"
        android:visibility="gone"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="15dp"
        android:orientation="vertical"
        app:behavior_hideable="false"
        app:behavior_peekHeight="50dp"
        android:background="@drawable/top_round_corner"
        app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

        <View
            android:id="@+id/bs_dash"
            android:layout_width="25dp"
            android:layout_height="3dp"
            android:layout_gravity="center_horizontal"
            android:background="@android:color/darker_gray"
            />

        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="25dp"
            app:strokeWidth="1dp"
            app:strokeColor="@color/color_accent"
            app:cardCornerRadius="5dp"
            >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_margin="10dp"
                >

                <de.hdodenhof.circleimageview.CircleImageView
                    android:id="@+id/bs_senior_image"
                    android:layout_width="60dp"
                    android:layout_height="60dp"

                    android:src="@drawable/static_3" />

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="15dp"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/bs_senior_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"

                        android:text="@string/couldn_t_load"
                        android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                        android:textColor="@color/black"
                        android:fontFamily="@font/nunito_bold"

                        android:layout_gravity="center_vertical"

                        android:singleLine="true"
                        android:ellipsize="end"
                        />

                    <TextView
                        android:id="@+id/bs_senior_current_location_txt"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"

                        android:text="@string/couldn_t_load"
                        android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                        android:textColor="@color/black"
                        android:fontFamily="@font/nunito_medium"

                        android:layout_gravity="center_vertical"

                        />

                    <TextView
                        android:id="@+id/bs_distance_from_home"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"

                        tools:text="0.25 miles away from home"
                        android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                        android:textColor="@color/black"
                        android:fontFamily="@font/nunito_medium"

                        android:layout_gravity="center_vertical"
                        />

                </LinearLayout>

            </LinearLayout>

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


    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>