@layer components {
  .toast-container {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: .5rem;
    max-height: 100vh;
    padding: 1rem;
    pointer-events: none;
  }
  .toast {
    position: fixed;
    top: auto;
    right: 1rem;
    bottom: 1rem;
    left: auto;
    margin: 0;
    min-width: 20rem;
    max-width: 26rem;
    padding: 1rem;
    background: var(--popover);
    color: var(--popover-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(.5rem);
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .toast:popover-open { opacity: 1; transform: translateY(0); }
  .toast[data-variant="destructive"] { background: var(--destructive); color: var(--destructive-foreground); border-color: var(--destructive); }
  .toast-content { display: flex; align-items: flex-start; gap: .75rem; }
  .toast-text { flex: 1; min-width: 0; }
  .toast-title { margin: 0; font-size: .875rem; font-weight: 500; line-height: 1.4; }
  .toast-description { margin: .125rem 0 0; color: var(--muted-foreground); font-size: .8125rem; line-height: 1.5; }
  .toast[data-variant="destructive"] .toast-description { color: var(--destructive-foreground); opacity: .85; }
  .toast-close { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted-foreground); cursor: pointer; }
  .toast-close:hover { background: var(--accent); color: var(--foreground); }
  .toast[data-variant="destructive"] .toast-close { color: var(--destructive-foreground); }
  @media (max-width: 640px) { .toast-container { left: 0; align-items: stretch; } .toast { min-width: 0; max-width: none; } }
}
