<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
    android:background="#80808080">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_marginLeft="40dp"
        android:layout_marginRight="40dp"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="16dp"
        app:cardElevation="8dp"
        app:cardCornerRadius="8dp">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="16dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:gravity="center_horizontal"
                android:spacing="20dp">

                <!-- Header Text -->
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Lisk mobile requires the following permissions to be granted on your mobile device"
                    android:textSize="24sp"
                    android:textColor="?android:attr/textColorPrimary"
                    android:textStyle="bold"
                    android:layout_marginBottom="16dp" />

                <!-- App Logo and Name -->
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:gravity="center_horizontal"
                    android:spacing="10dp">

                    <ImageView
                        android:layout_width="100dp"
                        android:layout_height="100dp"
                        android:src="@mipmap/ic_launcher" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/app_name"
                        android:textSize="24sp"
                        android:textColor="?android:attr/textColorPrimary"
                        android:textStyle="bold" />
                </LinearLayout>

                <!-- Permissions Explanation -->
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Permissions Used:"
                    android:textSize="19.2sp"
                    android:textColor="?android:attr/textColorPrimary"
                    android:textStyle="bold"
                    android:layout_marginTop="20dp" />

                <!-- Camera Permission -->
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_marginTop="10dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:gravity="center_vertical">

                        <ImageView
                            android:layout_width="24dp"
                            android:layout_height="24dp"
                            android:src="@android:drawable/ic_menu_camera"
                            android:layout_marginEnd="10dp"
                            android:tint="#4070F4" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="Camera"
                            android:textSize="18sp"
                            android:textColor="?android:attr/textColorPrimary"
                            android:textStyle="bold" />
                    </LinearLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Access is required to take photos, scan QR codes, etc."
                        android:textSize="16sp"
                        android:textColor="?android:attr/textColorPrimary"
                        android:layout_marginLeft="34dp" />
                </LinearLayout>
                
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_marginTop="10dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:gravity="center_vertical">

                        <ImageView
                            android:layout_width="24dp"
                            android:layout_height="24dp"
                            android:src="@android:drawable/ic_menu_save"
                            android:layout_marginEnd="10dp"
                            android:tint="#4070F4" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="File Storage"
                            android:textSize="18sp"
                            android:textColor="?android:attr/textColorPrimary"
                            android:textStyle="bold" />
                    </LinearLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Necessary to save, read, and write data."
                        android:textSize="16sp"
                        android:textColor="?android:attr/textColorPrimary"
                        android:layout_marginLeft="34dp" />
                </LinearLayout>
                
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_marginTop="10dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:gravity="center_vertical">

                        <ImageView
                            android:layout_width="24dp"
                            android:layout_height="24dp"
                            android:src="@android:drawable/ic_menu_mylocation"
                            android:layout_marginEnd="10dp"
                            android:tint="#4070F4" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="Motion Detection"
                            android:textSize="18sp"
                            android:textColor="?android:attr/textColorPrimary"
                            android:textStyle="bold" />
                    </LinearLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="This enables the motion detection sensors to be activated."
                        android:textSize="16sp"
                        android:textColor="?android:attr/textColorPrimary"
                        android:layout_marginLeft="34dp" />
                </LinearLayout>

                 <Button
                    android:id="@+id/closeButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Close"
                    android:textStyle="bold"
                    android:layout_marginTop="20dp" />

            </LinearLayout>
        </ScrollView>
    </androidx.cardview.widget.CardView>
</RelativeLayout>
