.chat-header {
  background: white;
  padding: 10px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2; }
  .chat-header .back-icon {
    margin-right: 10px;
    height: 20px;
    width: auto; }
  .chat-header .user-image {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 10px; }

.chat {
  position: relative;
  padding: 15px;
  margin: -15px; }
  .chat > * {
    position: relative;
    z-index: 2; }
  .chat .bgimage {
    opacity: 0.2;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1; }
  .chat .messages {
    max-height: 500px;
    overflow-y: scroll;
    display: flex;
    flex-direction: column-reverse;
    padding: 0 5px; }
  .chat .message {
    display: flex;
    flex-direction: column; }
    .chat .message .message-box {
      background: white;
      border-radius: 5px;
      box-shadow: 0 0 4px rgba(0, 0, 0, .2);
      margin: 10px 0;
      width: 70%;
      padding: 15px; }
      .chat .message .message-box p {
        margin: 0; }
      .chat .message .message-box .date {
        font-size: 13px;
        color: gray;
        margin-top: 5px;
        width: max-content;
        margin-left: auto; }
  .chat .message.mine {
    align-items: flex-end; }
    .chat .message.mine .message-box {
      background: #f5ffee; }
  .chat .message-input {
    display: flex;
    align-items: center;
    margin-top: 20px; }
    .chat .message-input input, .chat .message-input textarea {
      flex: 1;
      padding: 15px 10px;
      border: solid 1px lightgray;
      border-radius: 5px;
      font-size: 16px; }
    .chat .message-input .send {
      width: 25px;
      height: 25px;
      margin-left: 15px;
      cursor: pointer; }
