* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: #ececec;
}
.buttons {
  margin: 50px;
  position: relative;
}
button {
  padding: 10px 20px;
  width: 120px;
  font-size: 14px;
  background: #333;
  color: #fff;
  outline: 0;
  border: 0;
  margin: 0 10px;
  cursor: pointer;
}
.notification {
  position: relative;
  top: 130px;
  left: 60px;
  display: flex;
  align-items: center;
  background: #fff;
  padding: 0 10px;
  width: 408px;
  height: 60px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  margin: 10px 0;
  animation: appear 500ms linear forwards;
  transform: translateX(-100%);
}
@keyframes appear {
  100% {
    transform: translateX(0);
  }
}

.notification::after {
  content: "";
  width: 100%;
  height: 5px;
  background: green;
  position: absolute;
  bottom: 0;
  left: 0;
  animation: move 5s forwards;
}
@keyframes move {
  100% {
    width: 0;
  }
}
#notificationBox {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  align-items: flex-start;
  flex-direction: column;
}
.notification i {
  color: green;
  font-size: 30px;
  margin: 0 10px 0 0;
}
.notification.error i {
  color: red;
}
.notification.invalid i {
  color: orange;
}
.notification.error::after {
  background: red;
}
.notification.invalid::after {
  background: orange;
}
