/* ==========================================================
   IROZON DESIGN SYSTEM — Toast (canonical, v1)
   Public API:
     <div class="iz-toast-region" aria-live="polite" aria-atomic="true">
       <div class="iz-toast" data-variant="success" data-visible="true" role="status">
         <span class="iz-toast__icon" aria-hidden="true">...</span>
         <span class="iz-toast__message">Invoice saved</span>
       </div>
     </div>

   A brief, auto-dismissing confirmation/error message — not a modal,
   never blocks interaction (pointer-events stay off until visible,
   see below). The region is a single fixed-position live region a
   consumer renders once per page/app shell; individual .iz-toast
   elements are added/removed inside it by application code, which
   also owns the show/auto-dismiss timing — this file is presentation
   and motion only, no JS.

   data-variant reuses the exact four semantic roles Badge/Status
   already define (neutral/success/warning/error) — no new colors.
   data-visible="true" (set one frame after mount, e.g. via
   requestAnimationFrame) drives the entrance transition; removing it
   before unmount drives the exit — same two-state shape
   .iz-dialog/.iz-nav-item already use elsewhere in this system.

   Accessibility: the region's aria-live/aria-atomic announces each
   toast's text content to assistive tech as it's inserted — put the
   full message in .iz-toast__message, never rely on the icon alone.
   role="status" on the toast itself is redundant with aria-live on an
   ATK level but documents intent for sighted-code readers; omit it
   only if a consumer has a good reason to. This component has no
   built-in dismiss control — if a consumer needs one, compose an
   .iz-button[data-icon-only] inside .iz-toast the same way
   .iz-field__control-action composes into a field.
   ========================================================== */

.iz-toast-region {
  position: fixed;
  inset-block-end: 28px;
  inset-inline-end: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.iz-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--r-md);
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-strong);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-body-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition:
    opacity var(--motion-duration-standard) var(--motion-ease-standard),
    transform var(--motion-duration-standard) var(--motion-ease-standard);
}
.iz-toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .iz-toast {
    transition: opacity var(--motion-duration-fast) linear;
    transform: none;
  }
}

.iz-toast[data-variant="success"] {
  background: color-mix(in srgb, var(--color-success) 16%, var(--color-surface));
  color: var(--color-success);
  border-color: color-mix(in srgb, var(--color-success) 32%, transparent);
}
.iz-toast[data-variant="warning"] {
  background: color-mix(in srgb, var(--color-warning) 18%, var(--color-surface));
  color: var(--color-warning);
  border-color: color-mix(in srgb, var(--color-warning) 34%, transparent);
}
.iz-toast[data-variant="error"] {
  background: color-mix(in srgb, var(--color-error) 16%, var(--color-surface));
  color: var(--color-error);
  border-color: color-mix(in srgb, var(--color-error) 32%, transparent);
}

.iz-toast__icon {
  font-size: 1.05em;
  font-weight: 800;
  flex: none;
}
.iz-toast__icon svg {
  inline-size: 16px;
  block-size: 16px;
  flex: none;
}
