{{-- resources/views/livewire/group-search.blade.php --}}
<div>
    <x-input type="search" 
             wire:model.live="search" 
             placeholder="Buscar grupos..."
             class="w-full" />
    
    <div class="mt-2 space-y-2">
        @foreach($groups as $group)
            <div wire:click="selectGroup({{ $group->id }})"
                 @class([
                     'p-3 cursor-pointer rounded-lg transition-colors',
                     'bg-green-100 dark:bg-green-900' => $selectedGroup === $group->id,
                     'hover:bg-gray-100 dark:hover:bg-gray-700' => $selectedGroup !== $group->id
                 ])>
                <p class="text-gray-800 dark:text-gray-200">{{ $group->name }}</p>
                <p class="text-sm text-gray-600 dark:text-gray-400">{{ $group->users_count }} miembros</p>
            </div>
        @endforeach
    </div>
</div>