.chat {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 3rem - 1px); /* height of footer and border*/
}

.send {
  display: flex;
  margin: 0 1rem 1rem;
}

.send-input {
  width: 100%;
  padding: var(--spacer);
  font-size: 1rem;
  font-family: inherit;
}

.send-button {
  padding: 1rem 2rem;
  border: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--primary);
  color: var(--primary-text);
  cursor: pointer;
}

.send-button:hover {
  background-color: var(--primary-active);
}

.messages {
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
}

.message {
  position: relative;
  margin-bottom: 1rem;
  padding-left: 4rem;
  list-style: none;
}

.message-thumbnail {
  position: absolute;
  left: 0;
  display: block;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  cursor: pointer;
}

.message-header {
  display: flex;
  justify-content: space-between;
}

.message-button {
  display: contents;
}

.sender {
  display: block;
  font-weight: bold;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  background-color: transparent;
  font-size: 1rem;
}

.sender:hover {
  text-decoration: underline;
}

.time {
  float: right;
  margin-left: 1rem;
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--secondary);
}

.end-message {
  list-style: none;
  height: 1px;
}

.exit {
  display: none;
}

.text {
  word-break: break-all;
}

.members {
  display: block;
  font-weight: normal;
  font-size: 0.8rem;
}

@media screen and (max-width: 799px) {
  .chat {
    position: absolute;
    top: 0;
    height: calc(100vh - 3rem - 1px);
    background-color: var(--negative);
    transition: all 0.2s ease-in-out;
  }

  .channel-view .chat {
    transform: translateX(100%);
  }

  .chat-view .chat {
    transform: translateX(0%);
  }

  .exit {
    display: block;
    height: 3rem;
    width: 2rem;
    margin-left: 1rem;
    border: 0;
    color: transparent;
    background: url("images/left.svg") center no-repeat transparent;
    background-size: 2rem;
    opacity: 0.7;
    cursor: pointer;
  }

  .exit:hover {
    opacity: 1;
  }
}
