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