<script setup lang="ts">
import type { Component } from 'vue'
import { Sparkles } from '@lucide/vue'

defineProps<{
  eyebrow?: string
  title: string
  description: string
  /** Dekoratives Icon oben rechts – analog zu den Frontend-Bannern */
  icon?: Component
}>()
</script>

<template>
  <section class="relative overflow-hidden rounded-[32px] border border-violet-200/60 bg-[linear-gradient(135deg,#ece2ff_0%,#f6ecff_42%,#fff2dd_100%)] px-7 py-9 shadow-[0_24px_60px_rgba(124,92,255,0.12)] sm:px-12 sm:py-11">
    <div class="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_88%_18%,rgba(255,255,255,0.7),transparent_42%)]" />

    <svg class="pointer-events-none absolute inset-0 h-full w-full" aria-hidden="true">
      <g fill="#f6b938" opacity="0.7">
        <circle cx="74%" cy="24%" r="3" />
        <circle cx="92%" cy="62%" r="2.5" />
        <circle cx="63%" cy="78%" r="2.5" />
      </g>
      <g fill="#a78bff" opacity="0.6">
        <circle cx="83%" cy="40%" r="2.5" />
        <circle cx="69%" cy="50%" r="2" />
      </g>
    </svg>

    <div
      v-if="icon"
      class="pointer-events-none absolute -right-6 top-1/2 hidden -translate-y-1/2 sm:block"
    >
      <div class="grid h-40 w-40 place-items-center rounded-full bg-white/35 text-amber-400/80 ring-1 ring-white/60 backdrop-blur-sm">
        <component :is="icon" class="h-[4.5rem] w-[4.5rem]" />
      </div>
    </div>

    <div class="relative max-w-2xl space-y-4">
      <span class="inline-flex items-center gap-2 rounded-full border border-white/70 bg-white/70 px-4 py-1.5 text-[11px] font-semibold uppercase tracking-[0.3em] text-violet-600 shadow-sm backdrop-blur">
        <Sparkles class="h-3.5 w-3.5 text-amber-500" />
        {{ eyebrow ?? 'Admin' }}
      </span>
      <h1 class="font-[Cormorant_Garamond] text-4xl leading-[1.02] text-violet-800 sm:text-5xl">
        {{ title }}
      </h1>
      <p class="max-w-xl text-sm leading-6 text-slate-600 sm:text-base">{{ description }}</p>
    </div>
  </section>
</template>
