/* ========== NOTIFICATIONS ========== */

.notification {
  position: absolute;
  width: -moz-max-content;
  width: max-content;
  left: 0;
  right: 0;
  top: 0.9rem;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.375rem;
  background-color: #fff;
  color: #000;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-1.875rem);
  opacity: 0;
  visibility: hidden;
  animation: fade-in 3s linear;
  z-index: 1032;
}

.notification__icon {
  height: 1.3rem;
  width: 1.3rem;
  margin-right: 0.3rem;
}

.notification__body {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 1rem 0.5rem;
  font-size: 16px;
  gap: 2px;
}

.notification__progress__success {
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  width: calc(100% - 0.5rem);
  height: 0.2rem;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(to right, #28c937, #28c937);
  border-radius: inherit;
  animation: progress 2.5s 0.3s linear;
}

.notification__progress__error {
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  width: calc(100% - 0.5rem);
  height: 0.2rem;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(to right, #ec0000, #ec0000);
  border-radius: inherit;
  animation: progress 2.5s 0.3s linear;
}

@keyframes fade-in {
  5% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  95% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progress {
  to {
    transform: scaleX(1);
  }
}