<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="16dp">

    <TextView
        android:id="@+id/text_greeting"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Olá, utilizador!"
        android:textSize="24sp"
        android:textStyle="bold"
        android:textColor="@color/primary_color"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"/>

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/card_next_medication"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        app:layout_constraintTop_toBottomOf="@id/text_greeting">

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

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Próxima Medicação"
                android:textStyle="bold"
                android:textSize="18sp"
                android:textColor="@color/primary_color"/>

            <TextView
                android:id="@+id/next_med_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Paracetamol 500mg"
                android:textSize="16sp"
                android:layout_marginTop="8dp"/>

            <TextView
                android:id="@+id/next_med_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Hoje, 14:00"
                android:textSize="14sp"
                android:textColor="@android:color/darker_gray"
                android:layout_marginTop="4dp"/>
        </LinearLayout>
    </com.google.android.material.card.MaterialCardView>

    <com.google.android.material.button.MaterialButton
        android:id="@+id/button_book_appointment"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:text="Marcar Consulta"
        android:textSize="16sp"
        android:layout_marginTop="24dp"
        app:icon="@android:drawable/ic_menu_my_calendar"
        app:iconGravity="textStart"
        app:layout_constraintTop_toBottomOf="@id/card_next_medication"/>

</androidx.constraintlayout.widget.ConstraintLayout>
