@extends('student.layouts.app') @section('content') {{-- ✅ MAIN CONTAINER: Changed pb-40 to pb-36 to remove the big gap above the reply box --}}
{{-- ✅ STICKY COMPACT HEADER: Stays fixed at top, saves space --}}

Assignment Details

{{ $homework->title ?: 'Untitled' }}

{{ \Carbon\Carbon::parse($homework->created_at)->format('d M, h:i A') }}

{{ $homework->subject_name ?? 'General' }}

{{-- ✅ REMOVED line-clamp-2 so full message is visible in header if short, or scrolls if long --}}

{{ $homework->message }}

@php $attachments = json_decode($homework->attachment ?? '[]', true) ?? []; @endphp @if(!empty($attachments))

Attached Photos

@foreach($attachments as $photo)
@endforeach
@endif
{{-- ✅ CONVERSATION THREAD --}}
@forelse($replies as $reply) @php $isStudent = !empty($reply->student_id); @endphp
{{ $isStudent ? substr($reply->student_name ?? 'S', 0, 1) : substr($reply->teacher_name ?? 'T', 0, 1) }}

{{ $reply->message }}

@if($reply->attachment) View Attachment @endif

{{ \Carbon\Carbon::parse($reply->created_at)->format('h:i A') }}

@empty

No replies yet. Start the conversation below.

@endforelse
{{-- ✅ FIXED REPLY BAR — Matches student layout max-w-md (448px) exactly --}}
@csrf
@endsection