#toastBox,
.toastBox {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  display: flex;
  align-self: flex-end;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem;
  z-index: 2147483647;
}

.toastItem {
  width: 400px;
  height: 80px;
  font-weight: 300;
  margin: 7px 0;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  position: relative;
  transform: translateX(100%);
  animation: slideIn 0.15s linear forwards;
  overflow: hidden;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0%);
  }
}

.toastItem .toastIcon {
  font-size: 2.5rem;
  margin-right: 1rem;
}

.toastItem::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  animation: toastProgress var(--toast-duration, 5000ms) linear forwards;
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}