.host {
  position: fixed;
  left: 50%;
  top: 56px; /* just below the 48px top bar */
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(520px, 80vw);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text-bright, #f5f5f5);
  background: var(--bg-tertiary, #2a2a2e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  box-shadow: var(--shadow-popover, 0 8px 28px rgba(0, 0, 0, 0.45));
  animation: toastIn 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.link {
  /* The host is pointer-events:none; re-enable just the link so the
     toast doesn't block clicks underneath but the link is clickable. */
  pointer-events: auto;
  flex-shrink: 0;
  color: var(--accent-blue, #6aa3ff);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

/* Tones — a subtle left tint; text stays readable on the dark chip. */
.warn {
  border-color: var(--accent-yellow, #d4a017);
  color: var(--accent-yellow, #d4a017);
}

.error {
  border-color: var(--accent-red, #c9413a);
  color: var(--accent-red, #e0726c);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
