@layer components {
  .toast {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    z-index: 50;
    display: grid;
    justify-items: center;
    gap: var(--space-sm);
    width: max-content;
    max-width: calc(100vw - 2 * var(--space-md));
    translate: -50% 0;
  }

  .toast__message {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem var(--space-lg);
    font-weight: var(--weight-emphasis);
    line-height: 1.3;
    color: var(--on-navy);
    background: var(--navy);
    border-radius: var(--radius-pill);
    box-shadow: var(--menu-shadow);
    transition: opacity 1s ease;
  }

  .toast__message--leaving {
    opacity: 0;
  }

  .toast__icon {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
  }

  @media (max-width: 720px) {
    .toast {
      bottom: var(--space-md);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .toast__message {
      transition: none;
    }
  }
}
