<div class="mb-4 p-4 bg-green-100 text-green-800 border border-green-200 rounded-lg" role="alert" id="api-key-created-{{ key_id }}">
  <div class="flex flex-col">
    <div class="flex justify-between">
      <span class="font-semibold">API Key Created</span>
      <button type="button" class="text-green-600 hover:text-green-800" 
              @click="$el.closest('#api-key-created-{{ key_id }}').remove()">
        <i aria-hidden="true" data-lucide="x" class="h-4 w-4"></i>
      </button>
    </div>
    <p class="mt-1">Copy this key now. You won't be able to see it again!</p>
    <div class="mt-2 flex">
      <code class="bg-white p-2 rounded border border-green-300 text-xs w-full font-mono break-all">{{ raw_key }}</code>
      <button type="button" class="ml-2 px-2 bg-green-200 rounded hover:bg-green-300 text-green-800"
              x-data="{copy(text) { navigator.clipboard.writeText(text); }}"
              @click="copy('{{ raw_key }}')">
        <i aria-hidden="true" data-lucide="copy" class="h-4 w-4"></i>
      </button>
    </div>
  </div>
</div>
