<div class="rounded-lg border border-slate-200 p-3">
    <div class="flex flex-wrap items-start justify-between gap-2">
        <div>
            <p class="text-sm font-semibold text-slate-900">{{ $item->applicant?->name ?? 'Applicant' }}</p>
            <p class="text-xs text-slate-500">{{ $item->applicant?->jobPosting?->title ?? '—' }}</p>
        </div>
        @php
            $statusClass = match ($item->status) {
                'completed' => 'bg-emerald-100 text-emerald-700',
                'cancelled' => 'bg-slate-100 text-slate-600',
                default => 'bg-sky-100 text-sky-700',
            };
        @endphp
        <span class="rounded-full px-2 py-0.5 text-xs {{ $statusClass }}">{{ ucfirst($item->status) }}</span>
    </div>
    <p class="mt-1 text-xs text-slate-500">
        {{ ucfirst($item->interview_type) }}
        · {{ $showDate ? $item->scheduled_at?->format('Y-m-d h:i A') : $item->scheduled_at?->format('h:i A') }}
    </p>
    <div class="mt-1 flex flex-wrap items-center gap-3">
        @if($item->meeting_link)
            <a href="{{ $item->meeting_link }}" target="_blank" rel="noopener noreferrer" class="inline-block text-xs font-medium text-primary hover:underline">Join meeting</a>
        @endif
        @if($item->applicant?->resume_path)
            <a
                href="{{ route('applicants.resume.download', $item->applicant) }}"
                target="_blank"
                rel="noopener noreferrer"
                class="inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline"
            >
                <i class="bi bi-file-earmark-person"></i>
                {{ $item->applicant->name }} — Resume
            </a>
        @endif
    </div>
</div>
