@import "../styles/modules/importAll";

.Notification {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  min-height: 4rem;
  min-width: 30rem;
  max-width: calc(100vh - 4rem);
  z-index: 4;
  overflow: hidden;
  color: $white;
  transition: transform 0.5s ease;

  &.offscreen {
    transform: translate(0, 6rem);
  }

  &.error {
    background-color: $errorRed;
  }
  &.success {
    background-color: $lime2;
    &,
    .close {
      color: white;
    }
  }
  &.warn {
    background-color: $warnYellow;
  }
  &.info {
    background-color: $white;
    border: 1px solid $black;
    color: $black;
  }
  .message {
    display: block;
    padding: 1rem;
    margin-right: 2rem;
    line-height: 2rem;
  }
  .close {
    position: absolute;
    font-size: 1.5rem;
    line-height: 4rem;
    right: 1rem;
    top: 0;
    display: block;
    /* Increase clickable area without altering position */
    padding: 5rem;
    margin: -5rem;
    border-radius: 99rem;
  }
}

.exporting {
  .Notification {
    display: none;
  }
}