{# Transient notice driven by state.toast (notify()). #}
<div x-show="toast.show" x-cloak
     x-transition:enter="rvx-transition rvx-duration-base rvx-ease-emphasized" x-transition:enter-start="rvx-opacity-0 rvx-translate-y-3" x-transition:enter-end="rvx-opacity-100 rvx-translate-y-0"
     x-transition:leave="rvx-transition rvx-duration-fast" x-transition:leave-start="rvx-opacity-100" x-transition:leave-end="rvx-opacity-0"
     class="rvx-fixed rvx-bottom-space20 rvx-inset-x-space16 sm:rvx-inset-x-auto sm:rvx-end-space24 rvx-z-toast rvx-flex rvx-justify-center"
     role="status" aria-live="polite">
  <div class="rvx-flex rvx-items-center rvx-gap-space12 rvx-max-w-sm rvx-rounded-card rvx-bg-surface-inverse rvx-text-fg-inverse rvx-px-space16 rvx-py-space12 rvx-shadow-popover rvx-text-sm">
    <span :class="{ 'rvx-text-success': toast.kind === 'success', 'rvx-text-danger': toast.kind === 'error', 'rvx-text-info': toast.kind === 'info' }" class="rvx-shrink-0">
      <template x-if="toast.kind === 'success'">{% include 'storefront/ui/icon.twig' with { name: 'check-circle', size: 20 } %}</template>
      <template x-if="toast.kind === 'error'">{% include 'storefront/ui/icon.twig' with { name: 'error', size: 20 } %}</template>
      <template x-if="toast.kind === 'info'">{% include 'storefront/ui/icon.twig' with { name: 'info', size: 20 } %}</template>
    </span>
    <p class="rvx-min-w-0" x-text="toast.message"></p>
    <button type="button" class="rvx-ms-auto rvx-shrink-0 rvx-text-fg-inverse/70 hover:rvx-text-fg-inverse" @click="toast.show = false" aria-label="{{ __('Dismiss', 'reviewx') }}">
      {% include 'storefront/ui/icon.twig' with { name: 'close', size: 18 } %}
    </button>
  </div>
</div>
