@props(['type' => 'submit', 'variant' => 'primary', 'size' => 'md'])
@php
    $variants = [
        'primary' => 'bg-gradient-to-r from-ink via-charcoal to-ink bg-[length:200%_auto] text-ivory shadow-sm hover:bg-right hover:shadow-lg hover:-translate-y-0.5 focus:ring-ink/30',
        'accent' => 'bg-gradient-to-r from-champagne via-champagne-light to-champagne bg-[length:200%_auto] text-ink shadow-sm hover:bg-right hover:shadow-lg hover:-translate-y-0.5 focus:ring-champagne/40',
        'ghost' => 'bg-transparent text-ink/60 hover:bg-black/5 focus:ring-black/10',
        'danger' => 'bg-danger/10 text-danger hover:bg-danger/20 focus:ring-danger/30',
    ];
    $sizes = [
        'sm' => 'gap-1.5 rounded-md px-3 py-1.5 text-xs',
        'md' => 'gap-2 rounded-lg px-4 py-2 text-sm',
        'lg' => 'gap-2 rounded-xl px-5 py-2.5 text-sm',
    ];
@endphp
<button type="{{ $type }}" {{ $attributes->merge(['class' => 'btn inline-flex items-center justify-center font-medium transition-all duration-300 focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0 '.($sizes[$size] ?? $sizes['md']).' '.($variants[$variant] ?? $variants['primary'])]) }}>
    {{ $slot }}
</button>
