@props(['tone' => 'neutral'])

{{-- The same pairing as x-portal.chip, in paragraph form: a rejection reason,
     a cancellation, a note from the office. --}}
@php
    [$fill, $ink] = match ($tone) {
        'success' => ['var(--brand-success)', 'var(--portal-success-ink)'],
        'warning' => ['var(--brand-warning)', 'var(--portal-warning-ink)'],
        'danger' => ['var(--brand-danger)', 'var(--portal-danger-ink)'],
        default => ['var(--portal-muted)', 'var(--portal-ink)'],
    };
@endphp

<p {{ $attributes->merge(['class' => 'rounded-lg px-2 py-1 text-[11px] leading-relaxed']) }}
   style="background: color-mix(in oklab, {{ $fill }} 12%, var(--portal-surface)); color: {{ $ink }};">
    {{ $slot }}
</p>
