:root {
	--toast-duration: 5000ms;
}

#toastBox {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-self: flex-end;
  flex-direction: column;
  /* gap: 0.5rem; */
  overflow: hidden;
  padding: 1rem;
  /* background: gray; */
  z-index: 9999;
}

.toastItem {
  width: 400px;
  height: 80px;
  background-color: rgb(from var(--dark-color, #333) r g b / 60%);
	backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* Safari */
  color: var(--dark-contrast-color, #ddd);
  font-weight: 300;
  margin: 7px 0;
  padding: 0 1rem;
  /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); */
  display: flex;
  align-items: center;
  position: relative;
  transform: translateX(100%);
  animation: slideIn 0.15s linear forwards;
}

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

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

.toastItem.success .toastIcon {
  color: var(--success-color, lime);
}

.toastItem.warning .toastIcon {
  color: var(--warning-color, orange);
}

.toastItem.error .toastIcon {
  color: var(--danger-color, red);
}

.toastItem.info .toastIcon {
  color: var(--info-color, cyan);
}

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

.toastItem.info::after {
  background: var(--info-color, cyan);
}
.toastItem.success::after {
  background: var(--success-color, lime);
}
.toastItem.warning::after {
  background: var(--warning-color, orange);
}
.toastItem.error::after {
  background: var(--danger-color, red);
}

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