.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.toasts__item {
  transition: transform 400ms ease-in-out;
}

.toasts__item-body {
  padding: 0.875rem 1rem;
  border-radius: var(--rounded);
  max-width: 22rem;
  border: 1px solid var(--primary);
  cursor: pointer;
  background-color: white;
  color: var(--gray-900);
  font-size: 0.9375rem;
  line-height: 1.45;
  transform: translateX(calc(100% + 1.25rem));
  transition: transform 400ms ease-in-out;
}

.toasts__item--visible .toasts__item-body {
  transform: translateX(0);
}

.toasts__item--leaving {
  pointer-events: none;
}

.toasts__item--leaving .toasts__item-body {
  transform: translateX(calc(100% + 1.25rem));
}

.toasts__item-body button,
.toasts__item-body .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.75rem;
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: var(--rounded);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 300ms, transform 200ms;
}

@media (hover: hover) {
  .toasts__item-body button:hover,
  .toasts__item-body .button:hover {
    background: var(--secondary);
  }
}

.toasts__item-body button:active,
.toasts__item-body .button:active {
  transform: scale(0.98);
}
