<div class="witness-design-index">
    <div class="d-flex flex-wrap justify-content-between align-items-center gap-2 mb-4">
        <div>
            <h3 class="mb-1">Witness Statement — Design Exercise</h3>
            <p class="text-muted mb-0">
                Four working concepts over the same shared backend and demo data
                ({{ $client->fullName }}). Each is independently navigable and demonstrates
                every state.
            </p>
        </div>
        <a href="{{ route('clients.witness.design.compare', $client) }}" class="btn btn-outline-primary" wire:navigate>
            <span class="mdi mdi-table-compare" aria-hidden="true"></span> Comparison &amp; recommendation
        </a>
    </div>

    <div class="row g-3">
        @foreach($concepts as $i => $concept)
            <div class="col-12 col-md-6">
                <div class="card border-0 shadow-sm h-100">
                    <div class="card-body d-flex flex-column">
                        <div class="d-flex align-items-center gap-2 mb-2">
                            <span class="badge bg-secondary-subtle text-secondary-emphasis">Concept {{ $i + 1 }}</span>
                            @if($concept['recommended'])
                                <span class="badge bg-success">Recommended</span>
                            @endif
                        </div>
                        <h5 class="card-title d-flex align-items-center gap-2">
                            <span class="mdi mdi-{{ $concept['icon'] }} text-primary" aria-hidden="true"></span>
                            {{ $concept['name'] }}
                        </h5>
                        <p class="text-muted small mb-2">{{ $concept['tagline'] }}</p>
                        <p class="small mb-3"><strong>Best for:</strong> {{ $concept['best'] }}</p>

                        <div class="mt-auto d-flex flex-wrap gap-2">
                            <a href="{{ route($concept['route'], $client) }}" class="btn btn-primary btn-sm" wire:navigate>
                                <span class="mdi mdi-open-in-app" aria-hidden="true"></span> Open concept
                            </a>
                            <div class="btn-group btn-group-sm" role="group" aria-label="Preview states">
                                <a class="btn btn-outline-secondary" href="{{ route($concept['route'], $client) }}?state=empty">Empty</a>
                                <a class="btn btn-outline-secondary" href="{{ route($concept['route'], $client) }}?state=loading">Loading</a>
                                <a class="btn btn-outline-secondary" href="{{ route($concept['route'], $client) }}?state=validation">Validation</a>
                                <a class="btn btn-outline-secondary" href="{{ route($concept['route'], $client) }}?state=missing">Missing</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        @endforeach
    </div>

    <div class="alert alert-light border mt-4 small mb-0">
        <span class="mdi mdi-information-outline" aria-hidden="true"></span>
        All four concepts share one <code>WitnessStatementService</code>, one questionnaire config, one set of
        <code>x-witness.*</code> components and the same demo record — they differ only in information architecture and
        interaction. Actions (save answer, accept/reject suggestion, add/remove exhibit, generate) work identically in each.
    </div>
</div>
