<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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:background="@color/white_bg"
    android:overScrollMode="never">

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

        <ImageView
            android:id="@+id/back_btn"
            android:layout_width="35sp"
            android:layout_height="35sp"
            android:layout_marginStart="15dp"
            android:layout_marginTop="15dp"
            android:layout_marginEnd="15dp"
            android:layout_marginBottom="15dp"
            android:contentDescription="@string/back_button"
            android:padding="5dp"
            android:paddingStart="-15dp"
            android:paddingEnd="0dp"
            android:src="@drawable/arrow_back" />

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

            android:layout_marginHorizontal="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/add_reminder"
            android:textAppearance="@style/TextAppearance.Material3.TitleLarge"

            android:textColor="@color/black"

            />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="35sp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/medicine_name"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

        <EditText
            android:id="@+id/medic_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"
            android:layout_marginVertical="10dp"

            android:background="@drawable/edit_text_bg_2"
            android:drawableStart="@drawable/ic_medicine"
            android:drawablePadding="10dp"
            android:fontFamily="@font/nunito_regular"
            android:hint="@string/enter_your_medicine_name"

            android:inputType="textCapWords"
            android:padding="10dp"

            android:paddingVertical="15dp"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

            android:textColor="@color/black"
            android:textColorHint="@android:color/darker_gray"

            android:maxLength="50"

            android:singleLine="true"

            android:digits="@string/allowed_alphanumeric_space_special"

            />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/dosage"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="15dp"

            android:layout_marginVertical="10dp"
            android:background="@drawable/edit_text_bg_2"
            android:orientation="vertical"

            >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:weightSum="10"

                >

                <EditText
                    android:id="@+id/dosage"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="7.5"

                    android:autofillHints="@null"

                    android:background="@android:color/transparent"
                    android:drawableStart="@drawable/ic_dosage"
                    android:drawablePadding="10dp"
                    android:fontFamily="@font/nunito_regular"
                    android:hint="@string/enter_dosage"

                    android:inputType="numberDecimal"
                    android:maxLength="5"

                    android:padding="10dp"
                    android:paddingVertical="15dp"

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

                    android:textColor="@color/black"
                    android:textColorHint="#A1A1A1" />

                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"

                    android:background="@android:color/darker_gray" />

                <!--                <RelativeLayout-->
                <!--                    android:id="@+id/dosage_drop"-->
                <!--                    android:layout_width="0dp"-->
                <!--                    android:layout_height="match_parent"-->
                <!--                    android:layout_weight="2">-->

                <!--                    <ImageView-->
                <!--                        android:layout_width="15dp"-->
                <!--                        android:layout_height="25dp"-->
                <!--                        android:src="@drawable/ic_down"-->
                <!--                        android:layout_centerInParent="true"-->
                <!--                        app:tint="@color/black" />-->

                <!--                </RelativeLayout>-->

                <TextView
                    android:id="@+id/dose_short_name"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="2.5"

                    android:fontFamily="@font/nunito_bold"
                    android:gravity="center"
                    android:text="@string/mg"
                    tools:text="gm"
                    android:textAlignment="center"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    android:textColor="@android:color/darker_gray"

                    android:paddingEnd="10dp"
                    android:paddingStart="0dp"
                    app:drawableEndCompat="@drawable/ic_down"
                    app:drawableTint="@color/black" />

            </LinearLayout>

            <com.skydoves.powerspinner.PowerSpinnerView
                android:id="@+id/dosage_spinner"
                android:layout_width="match_parent"
                android:layout_height="0dp"

                android:layout_marginHorizontal="15dp"

                android:background="@color/white_bg"

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

                android:textColorHint="#A1A1A1"
                app:fontFamily="@font/nunito_regular"

                app:spinner_arrow_animate="true"
                app:spinner_arrow_drawable="@drawable/ic_down"
                app:spinner_arrow_gravity="end"

                app:spinner_arrow_padding="8dp"
                app:spinner_arrow_show="false"

                app:spinner_arrow_tint="@color/black"
                app:spinner_divider_color="@color/black"

                app:spinner_divider_show="true"
                app:spinner_divider_size="0.4dp"
                app:spinner_item_height="46dp"
                app:spinner_popup_animation="dropdown"
                app:spinner_popup_background="@drawable/edit_text_bg_2"
                app:spinner_popup_elevation="14dp"
                app:spinner_popup_end_padding="15dp"
                app:spinner_popup_max_height="200dp"
                app:spinner_popup_start_padding="15dp"
                tools:text="Tablespoon" />

        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/medication_type"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

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

            android:layout_marginHorizontal="15dp"

            android:layout_marginVertical="10dp"
            android:background="@drawable/edit_text_bg_2"
            android:orientation="horizontal">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"

                android:contentDescription="@string/medication_type"

                app:srcCompat="@drawable/ic_med_type"

                />

            <com.skydoves.powerspinner.PowerSpinnerView
                android:id="@+id/medications_spinner"
                android:layout_width="match_parent"
                android:layout_height="match_parent"

                android:layout_marginHorizontal="5dp"

                android:layout_marginVertical="5dp"

                android:background="@color/white_bg"
                android:gravity="center_vertical"
                android:hint="@string/enter_medication_type"

                android:padding="10dp"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                android:textColor="@color/black"

                android:textColorHint="#A1A1A1"
                app:fontFamily="@font/nunito_regular"
                app:spinner_arrow_animate="true"

                app:spinner_arrow_drawable="@drawable/ic_down"
                app:spinner_arrow_gravity="end"

                app:spinner_arrow_padding="8dp"
                app:spinner_arrow_tint="@color/black"
                app:spinner_divider_color="@color/black"
                app:spinner_divider_show="true"
                app:spinner_divider_size="0.4dp"
                app:spinner_item_height="46dp"
                app:spinner_popup_animation="dropdown"
                app:spinner_popup_background="@drawable/edit_text_bg_2"
                app:spinner_popup_elevation="14dp"
                app:spinner_popup_max_height="200dp"


                />

        </LinearLayout>

        <TextView
            android:id="@+id/frequency_title_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/frequency"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

        <LinearLayout
            android:id="@+id/frequency_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"

            android:layout_marginVertical="10dp"
            android:background="@drawable/edit_text_bg_2"
            android:orientation="horizontal">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"

                android:contentDescription="@string/medication_type"

                app:srcCompat="@drawable/ic_freq"

                />

            <com.skydoves.powerspinner.PowerSpinnerView
                android:id="@+id/frequency_spinner"
                android:layout_width="match_parent"
                android:layout_height="match_parent"

                android:layout_marginHorizontal="5dp"

                android:layout_marginVertical="5dp"

                android:background="@color/white_bg"
                android:gravity="center_vertical"
                android:hint="@string/enter_frequency"

                android:padding="10dp"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                android:textColor="@color/black"

                android:textColorHint="#A1A1A1"
                app:fontFamily="@font/nunito_regular"
                app:spinner_arrow_animate="true"

                app:spinner_arrow_drawable="@drawable/ic_down"
                app:spinner_arrow_gravity="end"

                app:spinner_arrow_padding="8dp"
                app:spinner_arrow_tint="@color/black"
                app:spinner_divider_color="@color/black"
                app:spinner_divider_show="true"
                app:spinner_divider_size="0.4dp"
                app:spinner_item_height="46dp"
                app:spinner_popup_animation="dropdown"
                app:spinner_popup_background="@drawable/edit_text_bg_2"
                app:spinner_popup_elevation="14dp"
                app:spinner_popup_max_height="200dp" />

        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/set_reminder"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="10dp"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:weightSum="10">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="7"
                android:fontFamily="@font/nunito_medium"
                android:text="@string/everyday"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:textColor="@color/black" />

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/everyday_check"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_weight="3"
                app:showText="false"
                app:switchMinWidth="60dp"
                app:thumbTint="@color/color_primary"
                app:track="@drawable/switch_track_1" />

        </LinearLayout>

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

            android:layout_marginHorizontal="15dp"

            android:layout_marginVertical="5dp"
            android:baselineAligned="false"
            android:gravity="center_vertical"

            android:orientation="horizontal"

            android:paddingVertical="5dp"

            android:weightSum="7">

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1">

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

                    android:layout_centerInParent="true"

                    android:background="@drawable/ic_user_outline_bg"
                    android:fontFamily="@font/nunito_regular"

                    android:gravity="center"
                    android:text="@string/s"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"

                android:layout_weight="1">

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

                    android:layout_centerInParent="true"
                    android:background="@drawable/ic_user_outline_bg"

                    android:fontFamily="@font/nunito_regular"
                    android:gravity="center"

                    android:text="@string/m"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"

                android:layout_weight="1">

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

                    android:layout_centerInParent="true"
                    android:background="@drawable/ic_user_outline_bg"
                    android:fontFamily="@font/nunito_regular"

                    android:gravity="center"
                    android:text="@string/t"

                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"

                android:layout_weight="1">

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

                    android:layout_centerInParent="true"

                    android:background="@drawable/ic_user_outline_bg"
                    android:fontFamily="@font/nunito_regular"

                    android:gravity="center"
                    android:text="@string/w"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"

                android:layout_weight="1">

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

                    android:layout_centerInParent="true"
                    android:background="@drawable/ic_user_outline_bg"
                    android:fontFamily="@font/nunito_regular"

                    android:gravity="center"
                    android:text="@string/t"

                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"

                android:layout_weight="1">

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

                    android:layout_centerInParent="true"
                    android:background="@drawable/ic_user_outline_bg"
                    android:fontFamily="@font/nunito_regular"

                    android:gravity="center"
                    android:text="@string/f"

                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"

                android:layout_weight="1">

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

                    android:layout_centerInParent="true"
                    android:background="@drawable/ic_user_outline_bg"
                    android:fontFamily="@font/nunito_regular"

                    android:gravity="center"
                    android:text="@string/s"

                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium" />

            </RelativeLayout>

        </LinearLayout>

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

            android:layout_marginVertical="10dp"
            android:background="@drawable/edit_text_bg_2"
            android:drawablePadding="10dp"

            android:fontFamily="@font/nunito_regular"

            android:gravity="center_vertical"
            android:hint="@string/enter_time"
            android:padding="10dp"
            android:paddingVertical="15dp"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

            android:textColor="@color/black"
            android:textColorHint="@android:color/darker_gray"

            android:visibility="gone"

            app:drawableStartCompat="@drawable/ic_clock" />

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

            android:layout_marginVertical="10dp"
            android:background="@drawable/edit_text_bg_2"
            android:drawablePadding="10dp"

            android:fontFamily="@font/nunito_regular"

            android:gravity="center_vertical"
            android:hint="@string/enter_time_2"
            android:padding="10dp"
            android:paddingVertical="15dp"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

            android:textColor="@color/black"
            android:textColorHint="@android:color/darker_gray"

            android:visibility="gone"

            app:drawableStartCompat="@drawable/ic_clock" />

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

            android:layout_marginVertical="10dp"
            android:background="@drawable/edit_text_bg_2"
            android:drawablePadding="10dp"

            android:fontFamily="@font/nunito_regular"

            android:gravity="center_vertical"
            android:hint="@string/enter_time_3"
            android:padding="10dp"
            android:paddingVertical="15dp"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

            android:textColor="@color/black"
            android:textColorHint="@android:color/darker_gray"

            android:visibility="gone"

            app:drawableStartCompat="@drawable/ic_clock" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/quantity"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

        <EditText
            android:id="@+id/quantity"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"
            android:layout_marginVertical="10dp"
            android:autofillHints="@null"

            android:background="@drawable/edit_text_bg_2"
            android:drawableStart="@drawable/ic_quantity"
            android:drawablePadding="10dp"
            android:fontFamily="@font/nunito_regular"
            android:hint="@string/enter_quantity"

            android:inputType="numberDecimal"
            android:maxLength="5"

            android:padding="10dp"
            android:paddingVertical="15dp"

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

            android:textColor="@color/black"
            android:textColorHint="@android:color/darker_gray"

            />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="@font/nunito_medium"
                android:text="@string/refill_date"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:textColor="@color/black" />

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

                android:layout_marginStart="5dp"
                android:fontFamily="@font/nunito_regular"
                android:text="@string/optional"
                android:textAppearance="@style/TextAppearance.Material3.TitleSmall"

                android:textColor="@android:color/darker_gray"

                />

        </LinearLayout>

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="15dp"
            android:layout_marginVertical="10dp">

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

                android:background="@drawable/edit_text_bg_2"

                android:drawablePadding="10dp"

                android:fontFamily="@font/nunito_regular"
                android:gravity="center_vertical"
                android:hint="@string/enter_refill_date"
                android:padding="10dp"
                android:paddingVertical="15dp"

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

                android:textColorHint="@android:color/darker_gray"

                app:drawableStartCompat="@drawable/ic_calender_2" />

            <ImageView
                android:id="@+id/remove_date_btn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:layout_marginEnd="15dp"
                android:contentDescription="@string/close"
                android:src="@drawable/ic_close_outline"
                app:tint="@android:color/darker_gray" />

        </RelativeLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="15dp"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/instruction"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black" />

        <EditText
            android:id="@+id/instructions"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"
            android:layout_marginVertical="10dp"
            android:autofillHints="@null"

            android:background="@drawable/edit_text_bg_2"
            android:drawableStart="@drawable/ic_instruction"
            android:drawablePadding="10dp"
            android:fontFamily="@font/nunito_regular"
            android:hint="@string/enter_instructions"

            android:inputType="textCapSentences"
            android:maxHeight="150dp"

            android:maxLength="255"
            android:overScrollMode="always"

            android:padding="10dp"
            android:paddingVertical="15dp"

            android:scrollbarStyle="insideInset"
            android:scrollbars="vertical"

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

            android:digits="@string/allowed_alphanumeric_space_special"
            android:singleLine="true"

            />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/add_reminder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="15dp"
            android:layout_marginVertical="35dp"
            android:fontFamily="@font/nunito_regular"
            android:paddingVertical="15dp"
            android:text="@string/add_reminder"
            android:textAllCaps="false"
            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/white_bg"
            app:backgroundTint="@color/color_primary"
            app:cornerRadius="15dp" />

    </LinearLayout>

</androidx.core.widget.NestedScrollView>