body {
  padding: 2rem;
  padding-top: 1rem;
  margin: 0;
  word-wrap: break-word;
  line-height: 1.2;
}

header {
  text-align: center;
  margin: 1rem auto 2rem;
  font-family: "Roboto", sans-serif;
  font-size: 1.3rem;
}

.chatbot-interface {
  display: flex;
  flex-direction: column;
  margin-top: 1vh;
}

.bot-face {
  flex-direction: row;
  justify-content: center;
  margin: 2rem auto;
}

.robot-img {
  height: 30vh;
}

.chat-container {
  margin-top: 2vh;
  display: flex;
  /* flex-direction: column; */
  justify-content: center;
}

.chat-form {
  display: flex;
}

.chat-input {
  width: 32vw;
  font-size: 1.15rem;
}

.btn-chat-send {
  width: 8vw;
  font-size: 1.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 0.5rem;
}

.chatbox-container {
  margin-top: 2vh;
  display: flex;
  justify-content: center;
}

.chatbox {
  width: 40vw;
  max-height: 30vh;
  border: 1px solid gray;
  display: flex;
  flex-direction: column-reverse; /* quick way to make scroll stay at bottom.. */
  padding: 10px;
  font-size: 1.2em;
  overflow: hidden;
  overflow-y: scroll;
}

.chat-item {
  color: black;
}

.chat-item-user {
  font-family: "Roboto", sans-serif;
  position: relative;
  background: #bedb7b;
  align-self: flex-start;
  min-width: 2rem;
  max-width: 11rem;
  padding: 0.8rem;
  border-top: 1px solid #d8e7b5;
  border-left: 1px solid #d8e7b5;
  border-radius: 0.6rem;
  font-size: 1.15rem;
  margin-bottom: 2rem;
  box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.05);
}

.chat-item-user:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  width: 0;
  height: 0;
  border: 20px solid transparent;
  border-top-color: #bedb7b;
  border-bottom: 0;
  border-left: 0;
  margin-left: -0.625rem;
  margin-bottom: -1.25rem;
}

.chat-item-user:last-of-type {
  display: none;
}

.chat-item-bot {
  font-family: Helvetica, sans-serif;
  max-width: 40rem;
  align-self: flex-end;
  padding: 0.8rem;
  padding-right: 0.6rem;
  background: #7ce4ee;
  border-top: 1px solid #98f6ff;
  border-right: 1px solid #98f6ff;
  border-radius: 0.6rem;
  position: relative;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  box-shadow: 2px -2px 4px 0px rgba(0, 0, 0, 0.05);
}

.chat-item-bot:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 1.5rem;
  width: 0;
  height: 0;
  border: 20px solid transparent;
  border-top-color: #7ce4ee;
  border-bottom: 0;
  border-right: 0;
  margin-left: -0.625rem;
  margin-bottom: -1.25rem;
}

.bot-text {
  margin: 0;
}

.instructions {
  margin: 1rem auto;
  font-family: helvetica, sans-serif;
  font-weight: normal;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.25;
}

@media only screen and (max-width: 48rem) {
  .instructions {
    font-size: 1.2rem;
  }

  .chat-item-bot,
  .chat-item-user,
  .btn-chat-send {
    font-size: 1rem;
  }

  .chat-item-bot {
    max-width: 80%;
  }

  .chatbox {
    width: 90vw;
    max-height: 40vh;
    margin-top: 0.5rem;
  }

  .chat-input {
    font-size: 1rem;
    width: 60vw;
  }

  .btn-chat-send {
    overflow: auto;
    text-overflow: unset;
    width: fit-content;
  }

  header {
    font-size: 1.2rem;
  }

  .bot-face {
    margin: 0 auto;
  }

  .main {
    display: flex;
    flex-direction: column-reverse;
  }
}
