:root {
  --toaster-color-success: #339966;
  --toaster-color-error: #e24d4c;
  --toaster-color-warning: #e9bd0c;
  --toaster-color-info: #3498db;
}

@media screen and (max-width: 530px) {
  .notificationsToast {
    width: 100%;
	z-index: 22;
  }
  .notificationsToast .toaster {
    width: 100%;
    font-size: 1rem;
    margin-left: 5px;
  }
}

.notificationsToast {
  position: fixed;
  top: 100px;
  right: 25px;
}
.notificationsToast :where(.toaster, .column) {
  display: flex;
  align-items: center;
  z-index: 3;
}

.notificationsToast .toaster {
  width: 370px;
  position: relative;
  overflow: hidden;
  list-style: none;
  border: 1px solid lightgray;
  border-radius: 4px;
  padding: 16px 27px;
  margin-bottom: 10px;
  justify-content: space-between;
  animation: show_toaster 0.3s ease forwards;
  color: white;
}
.toaster.success {
  background: var(--toaster-color-success);
}
.toaster.error {
  background: var(--toaster-color-error);
}
.toaster.warning {
  background: var(--toaster-color-warning);
}
.toaster.info {
  background: var(--toaster-color-info);
}
@keyframes show_toaster {
  0% { transform: translateX(100%); }
  40% { transform: translateX(-5%); }
  80% { transform: translateX(0%); }
  100% { transform: translateX(-10px); }
}

.notificationsToast .toaster.hide {
  animation: hide_toaster 0.3s ease forwards;
}
@keyframes hide_toaster {
  0% { transform: translateX(-10px); }
  40% { transform: translateX(0%); }
  80% { transform: translateX(-5%); }
  100% { transform: translateX(calc(100% + 20px)); }
}

/*********************** Progress bar ***********************/
.toaster::before {
  position: absolute;
  content: "";
  height: 3px;
  width: 100%;
  bottom: 0px;
  left: 0px;
  animation: progress 5s linear forwards;
  background: white;
}
@keyframes progress {
  100% { width: 0%; }
}

/*********************** Icon ***********************/
.toaster .column i {
  font-size: 1.75rem;
}

/*********************** Message body ***********************/
.toaster .column span {
  font-size: 1.07rem;
  margin-left: 12px;
}

/*********************** Close button ***********************/
.toaster i:last-child {
  cursor: pointer;
  padding-right: 5px;
}
.toaster i:last-child:hover {
  background-color: #000000;
  border-radius: 50px;
  padding: 5px;
}

/*********************** Inverted colors ***********************/
.toaster.inverted {
  background: white;
  color: inherit;

  /* Progress bar */
  &.success::before {
    background: var(--toaster-color-success);
  }
  &.error::before {
    background: var(--toaster-color-error);
  }
  &.warning::before {
    background: var(--toaster-color-warning);
  }
  &.info::before {
    background: var(--toaster-color-info);
  }

  /* Icon */
  &.success .column i {
    color: var(--toaster-color-success);
  }
  &.error .column i {
    color: var(--toaster-color-error);
  }
  &.warning .column i {
    color: var(--toaster-color-warning);
  }
  &.info .column i {
    color: var(--toaster-color-info);
  }

  /* Close button */
  i:last-child {
    color: #aeb0d7;
  }
}
