<template>
  <div class="text-center py-16 px-4" role="alert">
    <div class="inline-flex items-center justify-center w-16 h-16 rounded-full mb-4" :style="{ background: 'var(--color-error-bg)', color: 'var(--color-error)' }">
      <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>
    </div>
    <h3 class="text-xl font-semibold mb-2" style="color: var(--text)">{{ title }}</h3>
    <p class="max-w-md mx-auto mb-6" style="color: var(--secondary)">{{ message }}</p>
    <button @click="$emit('retry')" class="hms-btn hms-btn-primary">Erneut versuchen</button>
  </div>
</template>

<script setup lang="ts">
withDefaults(defineProps<{ title?: string; message: string }>(), { title: 'Ein Fehler ist aufgetreten' })
defineEmits<{ retry: [] }>()
</script>
