<?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/detalhesReservasRoot"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    tools:context=".DetalhesReservasActivity">

    <com.google.android.material.button.MaterialButton
        android:id="@+id/btnVoltar"
        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/colorTextSecondary"
        android:textSize="16sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/txtTituloDetalhes"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Detalhes das reservas"
        android:textColor="@color/colorTextPrimary"
        android:textSize="26sp"
        android:fontFamily="sans-serif-medium"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/btnVoltar"
        android:layout_marginTop="20dp" />

    <TextView
        android:id="@+id/txtDescricaoDetalhes"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="32dp"
        android:layout_marginTop="8dp"
        android:text="Selecione uma reserva para ver os detalhes e atualizar o estado."
        android:textColor="@color/colorTextSecondary"
        android:textSize="14sp"
        android:textAlignment="center"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/txtTituloDetalhes" />

    <ListView
        android:id="@+id/listReservas"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="24dp"
        android:layout_marginEnd="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginBottom="16dp"
        android:divider="@color/colorDivider"
        android:dividerHeight="1dp"
        android:scrollbars="none"
        android:clipToPadding="false"
        app:layout_constraintTop_toBottomOf="@id/txtDescricaoDetalhes"
        app:layout_constraintBottom_toTopOf="@id/cardDetalhes"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/cardDetalhes"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginEnd="24dp"
        android:layout_marginBottom="32dp"
        app:cardBackgroundColor="@color/colorSurface"
        app:cardCornerRadius="20dp"
        app:cardElevation="10dp"
        app:strokeWidth="1dp"
        app:strokeColor="@color/colorDivider"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <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="Reserva selecionada"
                android:textColor="@color/colorTextPrimary"
                android:textSize="18sp"
                android:fontFamily="sans-serif-medium" />

            <TextView
                android:id="@+id/txtReservaInfo"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:text="Selecione uma reserva"
                android:textColor="@color/colorTextSecondary"
                android:textSize="15sp" />

            <TextView
                android:id="@+id/txtReservaNotas"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:text=""
                android:textColor="@color/colorTextSecondary"
                android:textSize="14sp" />

            <TextView
                android:id="@+id/txtReservaEstado"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="Estado:"
                android:textColor="@color/colorSuccess"
                android:textSize="14sp"
                android:textStyle="bold" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:orientation="horizontal">

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnConfirmarReserva"
                    android:layout_width="0dp"
                    android:layout_height="54dp"
                    android:layout_marginEnd="4dp"
                    android:layout_weight="1"
                    app:cornerRadius="12dp"
                    app:backgroundTint="@color/colorPrimary"
                    android:text="Confirmar"
                    android:textAllCaps="false"
                    android:textColor="@color/white" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnCancelarReserva"
                    style="@style/Widget.Material3.Button.TonalButton"
                    android:layout_width="0dp"
                    android:layout_height="54dp"
                    android:layout_marginHorizontal="4dp"
                    android:layout_weight="1"
                    app:cornerRadius="12dp"
                    android:text="Recusar"
                    android:textAllCaps="false"
                    android:textColor="@color/colorTextPrimary" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnApagarReserva"
                    style="@style/Widget.Material3.Button.OutlinedButton"
                    android:layout_width="0dp"
                    android:layout_height="54dp"
                    android:layout_marginStart="4dp"
                    android:layout_weight="1"
                    app:cornerRadius="12dp"
                    app:strokeColor="@color/colorError"
                    android:text="Apagar"
                    android:textAllCaps="false"
                    android:textColor="@color/colorError"
                    android:visibility="gone" />
            </LinearLayout>

            <TextView
                android:id="@+id/txtMensagemReserva"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:text=""
                android:textColor="@color/colorSuccess"
                android:textSize="14sp" />
        </LinearLayout>
    </com.google.android.material.card.MaterialCardView>

</androidx.constraintlayout.widget.ConstraintLayout>
