@import url("https://fonts.googleapis.com/css?family=Raleway:400,400i,700");
html, body, h1, h2, h3, h4, h5, h6, p, ul, li, button {
  padding: 0;
  margin: 0;
}

html, body, .flexbox {
  width: 100%;
  height: 100%;
}

body {
  color: #2f2f2f;
  font-family: Raleway, sans-serif;
  font-size: 16px;
}

.flexbox {
  background-color: #7dd8ff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-box {
  background-color: #fff;
  margin: 20px;
  width: 100%;
  height: 100%;
  max-height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  border-radius: 13px;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}
.chat-box > .chat-box-header {
  width: 100%;
  padding: 20px 15px;
  border-bottom: solid 1px #cfcfcf;
  box-sizing: border-box;
}
.chat-box > .chat-box-body {
  height: 100%;
  display: flex;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.chat-box > .chat-box-body #chat_messages {
  width: 100%;
  padding: 20px 15px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.chat-box > .chat-box-body #chat_messages .message {
  width: 80%;
  padding: 20px 15px;
  margin: 2px 0;
  overflow: hidden;
  border-radius: 13px;
  transition: height 0.3s ease-in-out;
}
.chat-box > .chat-box-body #chat_messages .message.hide {
  height: 0;
}
.chat-box > .chat-box-body #chat_messages .my-message {
  color: #fff;
  background-color: #006ae3;
  align-self: flex-end;
}
.chat-box > .chat-box-body #chat_messages .other-message {
  background-color: #e2e2e2;
}
.chat-box > .chat-box-body #chat_messages .profile {
  margin: 2px 0;
  overflow: hidden;
  transition: height 0.3s ease-in-out;
}
.chat-box > .chat-box-body #chat_messages .profile.hide {
  height: 0;
}
.chat-box > .chat-box-body #chat_messages .profile img {
  display: inline-block;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  border-radius: 50%;
}
.chat-box > .chat-box-body #chat_messages .my-profile {
  color: #afafaf;
  align-self: flex-end;
}
.chat-box > .chat-box-body #chat_messages .other-profile {
  color: #afafaf;
}
.chat-box #typing {
  color: #afafaf;
  width: 100%;
  height: 0;
  padding: 0 15px;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0;
  transition: 0.3s height ease-in-out, 0.3s opacity ease-in-out;
}
.chat-box #typing.active {
  height: 80px;
  opacity: 1;
}
.chat-box #typing span:not(.n) {
  background-color: #afafaf;
  width: 10px;
  height: 10px;
  margin-top: 20px;
  display: inline-block;
  border-radius: 50%;
}
.chat-box #typing span:not(.n):nth-child(1) {
  animation: typing 1.2s infinite;
}
.chat-box #typing span:not(.n):nth-child(2) {
  animation: typing 1.2s infinite 0.1s;
}
.chat-box #typing span:not(.n):nth-child(3) {
  animation: typing 1.2s infinite 0.2s;
}
.chat-box > .chat-box-footer {
  width: 100%;
  padding: 20px 15px;
  border-top: solid 1px #cfcfcf;
  box-sizing: border-box;
  display: flex;
}
.chat-box > .chat-box-footer > #chat_input {
  color: #2f2f2f;
  font-family: Raleway, sans-serif;
  font-size: 16px;
  background-color: #d2d2d2;
  width: 100%;
  height: 40px;
  max-height: 120px;
  border: none;
  padding: 10px 15px;
  resize: none;
  box-sizing: border-box;
  border-radius: 13px;
  transition: 0.3s background-color;
}
.chat-box > .chat-box-footer > #chat_input:focus {
  background-color: #efefef;
}
.chat-box > .chat-box-footer > #send {
  background: none;
  border: none;
  margin-left: 10px;
  padding: 5px;
  cursor: pointer;
  border-radius: 50%;
}

@media (min-width: 480px) {
  .chat-box {
    width: 480px;
  }
}
@keyframes typing {
  0% {
    transform: translateY(0px);
  }
  33.3333% {
    transform: translateY(-5px);
  }
  66.6667% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(0px);
  }
}
button::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button {
  outline: none;
}

h3 > small {
  color: #afafaf;
  font-weight: normal;
}