<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/surface">

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

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/forge_dialog_title"
            android:textColor="@color/terminal_green"
            android:textSize="18sp"
            android:textStyle="bold"
            android:fontFamily="monospace"
            android:layout_marginBottom="16dp" />

        <!-- Phone number -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/forge_phone_label"
            android:textColor="@color/text_secondary"
            android:textSize="12sp"
            android:fontFamily="monospace"
            android:layout_marginBottom="4dp" />

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/forge_address"
            android:layout_width="match_parent"
            android:layout_height="44dp"
            android:hint="@string/forge_phone_hint"
            android:textColor="@color/text_primary"
            android:textColorHint="@color/text_muted"
            android:textSize="14sp"
            android:fontFamily="monospace"
            android:inputType="phone"
            android:background="@color/surface_dark"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:singleLine="true"
            android:layout_marginBottom="12dp" />

        <!-- Contact name (optional) -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/forge_name_label"
            android:textColor="@color/text_secondary"
            android:textSize="12sp"
            android:fontFamily="monospace"
            android:layout_marginBottom="4dp" />

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/forge_contact_name"
            android:layout_width="match_parent"
            android:layout_height="44dp"
            android:hint="@string/forge_name_hint"
            android:textColor="@color/text_primary"
            android:textColorHint="@color/text_muted"
            android:textSize="14sp"
            android:fontFamily="monospace"
            android:inputType="textPersonName"
            android:background="@color/surface_dark"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:singleLine="true"
            android:layout_marginBottom="12dp" />

        <!-- Message body -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/forge_body_label"
            android:textColor="@color/text_secondary"
            android:textSize="12sp"
            android:fontFamily="monospace"
            android:layout_marginBottom="4dp" />

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/forge_body"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/forge_body_hint"
            android:textColor="@color/text_primary"
            android:textColorHint="@color/text_muted"
            android:textSize="14sp"
            android:fontFamily="monospace"
            android:inputType="textMultiLine"
            android:background="@color/surface_dark"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:paddingTop="8dp"
            android:paddingBottom="8dp"
            android:minLines="3"
            android:maxLines="8"
            android:layout_marginBottom="12dp" />

        <!-- Direction toggle (Sent / Received) -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/forge_direction_label"
            android:textColor="@color/text_secondary"
            android:textSize="12sp"
            android:fontFamily="monospace"
            android:layout_marginBottom="4dp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="12dp">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/forge_type_received"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_weight="1"
                android:text="@string/forge_received"
                android:textSize="12sp"
                style="@style/Widget.Material3.Button"
                android:tag="selected" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/forge_type_sent"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_weight="1"
                android:text="@string/forge_sent"
                android:textSize="12sp"
                android:layout_marginStart="8dp"
                style="@style/Widget.Material3.Button.TonalButton" />
        </LinearLayout>

        <!-- Date / Time -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/forge_date_label"
            android:textColor="@color/text_secondary"
            android:textSize="12sp"
            android:fontFamily="monospace"
            android:layout_marginBottom="4dp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="12dp">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/forge_pick_date"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_weight="1"
                android:text="@string/forge_pick_date"
                android:textSize="12sp"
                style="@style/Widget.Material3.Button.TonalButton"
                android:tag="now" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/forge_pick_time"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_weight="1"
                android:text="@string/forge_pick_time"
                android:textSize="12sp"
                android:layout_marginStart="8dp"
                style="@style/Widget.Material3.Button.TonalButton"
                android:tag="now" />
        </LinearLayout>

        <!-- Read status -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical">

            <android.widget.CheckBox
                android:id="@+id/forge_read_status"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/forge_mark_read"
                android:textColor="@color/text_primary"
                android:textSize="14sp"
                android:fontFamily="monospace" />
        </LinearLayout>

    </LinearLayout>
</ScrollView>
