/* -----------------------------------------------
Messages
----------------------------------------------- */

.b-message-container {
  position: fixed;
  top: 0;
  left: auto;
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: auto;
  z-index: 2000;
  pointer-events: none;
}

.b-message {
  display: flex;
  align-items: center;
  max-width: 95%;
  padding: 0.75rem 1.5rem;
  margin-bottom: 0.1rem;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  transition: all 0.4s ease-in-out;
  transform: translateY(100%);
  pointer-events: none;
  line-height: 1.2;
  &:hover {
    cursor: pointer;
  }
  &.is-visible {
    max-height: 100%;
    animation: messageIn 0.4s;
    pointer-events: all;
    .b-icon {
      visibility: visible;
      margin-right: 0.5rem;
    }
  }
  &.is-hidden {
    max-height: 0;
    visibility: hidden;
    animation: messageOut 0.4s;
    pointer-events: none;
    .b-icon {
      visibility: hidden;
    }
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(100%);
  }
}

@keyframes messageOut {
  from {
    opacity: 1;
    transform: translateY(100%);
  }
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}
