@props(['title' => null, 'subtitle' => null, 'actions' => null, 'padding' => true])

<div {{ $attributes->merge(['class' => 'card']) }}>
    @if ($title || $subtitle || $actions)
        <div class="flex items-start justify-between gap-3 px-5 md:px-6 py-4 border-b border-ink-100">
            <div class="min-w-0">
                @if ($title)
                    <h3 class="text-base font-semibold text-ink-900 font-display">{{ $title }}</h3>
                @endif
                @if ($subtitle)
                    <p class="text-xs text-ink-500 mt-0.5">{{ $subtitle }}</p>
                @endif
            </div>
            @if ($actions)
                <div>{{ $actions }}</div>
            @endif
        </div>
    @endif

    <div @class(['card-pad' => $padding])>
        {{ $slot }}
    </div>
</div>
