<?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:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#F6F7FB"
    tools:context=".EditProfileActivity">

    <!-- Header -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="16dp"
        android:background="#FFFFFF"
        android:elevation="4dp"
        android:gravity="center_vertical">

        <ImageView
            android:id="@+id/btnBack"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:src="@drawable/ic_arrow_back"
            app:tint="#1F2937"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:clickable="true" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:text="Editar Perfil"
            android:textColor="#1F2937"
            android:textSize="20sp"
            android:textStyle="bold" />
    </LinearLayout>

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

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

            <!-- Profile Image -->
            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

                <com.google.android.material.imageview.ShapeableImageView
                    android:id="@+id/editProfileImage"
                    android:layout_width="120dp"
                    android:layout_height="120dp"
                    android:background="#E5E7EB"
                    android:scaleType="centerCrop"
                    app:shapeAppearanceOverlay="@style/ShapeAppearance.MaterialComponents.MediumComponent"
                    android:src="@drawable/logo" />

                <ImageView
                    android:layout_width="32dp"
                    android:layout_height="32dp"
                    android:layout_gravity="bottom|end"
                    android:background="@drawable/bg_circle_button"
                    android:padding="6dp"
                    android:src="@android:drawable/ic_menu_camera"
                    app:tint="#FFFFFF" />
            </FrameLayout>

            <TextView
                android:id="@+id/btnChangePhoto"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="Alterar Foto"
                android:textColor="#3B82F6"
                android:textStyle="bold"
                android:clickable="true"
                android:background="?attr/selectableItemBackground" />

            <!-- Form -->
            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="32dp"
                android:hint="Nome Completo"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/editName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textPersonName" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:hint="Email"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/editEmail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textEmailAddress" />
            </com.google.android.material.textfield.TextInputLayout>
            
            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:hint="Telefone (Opcional)"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/editPhone"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="phone" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btnSaveProfile"
                android:layout_width="match_parent"
                android:layout_height="60dp"
                android:layout_marginTop="40dp"
                android:text="Salvar Alterações"
                app:cornerRadius="12dp" />

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