@extends('layouts.student')
@section('title', 'Message')
@section('content')
    <x-page-head title="Message" :subtitle="$messageRecipient->message->subject" />
    <x-panel>
        <p style="color:var(--text2); margin-bottom:12px;">From {{ $messageRecipient->message->sender?->name }} · {{ $messageRecipient->message->sent_at?->format('d M Y H:i') }}</p>
        <div style="white-space:pre-wrap;">{{ $messageRecipient->message->body }}</div>
        <div style="margin-top:16px;"><a href="{{ route('student.messages.index') }}" class="btn btn-outline">Back to inbox</a></div>
    </x-panel>
@endsection
