@props([ 'id', 'title', 'icon' => 'circle', 'subtitle' => null, 'optional' => false, 'collapsible' => true, ]) {{-- One card per group of fields. The card is a
with a real heading rather than a styled
: a receptionist running a screen reader gets the same "Contact details" landmark the sighted user gets from the icon tile, and can jump between groups instead of arrowing through forty inputs. `data-clinic-form-section` is what the progress rail counts. The collapse is driven from resources/js — an inline handler would be inline script, which this application's CSP refuses (see tests/Architecture/ContentSecurityTest). --}}
merge(['class' => 'clinic-form-section']) }} id="{{ $id }}" data-clinic-form-section="{{ $id }}">

{{ $title }} @if ($optional) {{ __('common.optional') }} @endif

@if ($subtitle)

{{ $subtitle }}

@endif
@if ($collapsible) @endif
{{-- The inner wrapper is not decoration: collapsing animates the body's grid-template-rows from 1fr to 0fr, which needs exactly one child to measure against. Padding sits on the inner element so a collapsed card closes flush instead of leaving a band of empty white. --}}
{{ $slot }}