<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="@color/colorBackground"
    tools:context=".AddStaffActivity">

    <com.google.android.material.button.MaterialButton
        android:id="@+id/btnVoltarAddStaff"
        style="@style/Widget.Material3.Button.TextButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:text="← Voltar"
        android:textAllCaps="false"
        android:textColor="@color/colorError"
        android:textSize="16sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/txtAdicionarTitulo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:text="Novo Funcionário"
        android:textColor="@color/colorTextPrimary"
        android:textSize="28sp"
        android:fontFamily="sans-serif-medium"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/btnVoltarAddStaff" />

    <TextView
        android:id="@+id/txtAdicionarDesc"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="32dp"
        android:layout_marginTop="8dp"
        android:text="Introduza os dados e atribuições deste membro:"
        android:textColor="@color/colorTextSecondary"
        android:textAlignment="center"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/txtAdicionarTitulo" />

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="24dp"
        android:layout_marginTop="32dp"
        app:cardCornerRadius="20dp"
        app:cardElevation="2dp"
        app:cardBackgroundColor="@color/colorSurface"
        app:layout_constraintTop_toBottomOf="@id/txtAdicionarDesc">

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

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Nome do Funcionário"
                android:textColor="@color/colorTextPrimary"
                android:textSize="15sp"
                android:fontFamily="sans-serif-medium" />

            <EditText
                android:id="@+id/nammeEditText"
                android:layout_width="match_parent"
                android:layout_height="54dp"
                android:layout_marginTop="10dp"
                android:background="@drawable/input_bg"
                android:hint="Ex: João Silva"
                android:inputType="textPersonName"
                android:paddingHorizontal="16dp"
                android:textColor="@color/colorTextPrimary" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="24dp"
                android:text="Zona de Trabalho"
                android:textColor="@color/colorTextPrimary"
                android:textSize="15sp"
                android:fontFamily="sans-serif-medium" />

            <LinearLayout
                android:id="@+id/zoneLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:orientation="horizontal"
                android:gravity="center_vertical">

                <Spinner
                    android:id="@+id/zonaSpinner"
                    android:layout_width="0dp"
                    android:layout_height="54dp"
                    android:layout_weight="1"
                    android:background="@drawable/input_bg" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnAddZone"
                    android:layout_width="54dp"
                    android:layout_height="54dp"
                    android:layout_marginStart="12dp"
                    app:cornerRadius="12dp"
                    app:backgroundTint="@color/colorPrimary"
                    android:insetTop="0dp"
                    android:insetBottom="0dp"
                    android:paddingTop="0dp"
                    android:paddingBottom="0dp"
                    android:text="+"
                    android:textColor="@color/white"
                    android:textSize="24sp" />
            </LinearLayout>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="24dp"
                android:text="Mesa a Atribuir"
                android:textColor="@color/colorTextPrimary"
                android:textSize="15sp"
                android:fontFamily="sans-serif-medium" />

            <LinearLayout
                android:id="@+id/mesaLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:orientation="horizontal">

                <Spinner
                    android:id="@+id/mesaSpinner"
                    android:layout_width="match_parent"
                    android:layout_height="54dp"
                    android:background="@drawable/input_bg" />
            </LinearLayout>

            <com.google.android.material.button.MaterialButton
                android:id="@+id/addButton"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:layout_marginTop="36dp"
                app:cornerRadius="14dp"
                app:backgroundTint="@color/colorPrimary"
                android:text="Adicionar Membro"
                android:textAllCaps="false"
                android:textColor="@color/white"
                android:textSize="16sp" />
        </LinearLayout>
    </com.google.android.material.card.MaterialCardView>

</androidx.constraintlayout.widget.ConstraintLayout>