@import '../../../../assets/styles/responsive-base.scss';

:host {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;

  @include screen('phone') {
    user-select: none;
    -webkit-user-select: none;
  }
}

.chat-context-menu {
  display: flex;
  flex-direction: column;
  .context-menu-emojibar {
    display: flex;
  }
}

mat-divider {
  margin: 8px 0px !important;
}

.context-menu-emojibar {
  padding: 0 4px;

  span {
    margin: 0px;
    padding: 4px;
    border-radius: 4px;
  }
  img {
    width: 24px;
    cursor: pointer;
  }

  .expand-icon {
    align-self: center;
    mat-icon {
      height: 24px;
      width: 24px;
      font-size: 26px;
    }
  }
}

#new-message-sign {
  border-radius: 20px;
  display: inline-block;
  padding: 6px 16px;
  position: absolute;
  left: calc(50% - 40px);
  bottom: 10px;
  width: 80px;
  box-sizing: border-box;
  text-align: center;
  cursor: pointer;
  animation: showsup 0.1s linear;
}

@keyframes showsup {
  0% {
    bottom: -10px;
    opacity: 0;
  }
  100% {
    opacity: 1;
    bottom: 10px;
  }
}

#chat-container {
  display: flex;
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  flex-direction: column;
}

#chat-body {
  flex: 1 1 auto;
  position: relative;
}

#chat-scroll {
  position: absolute;
  overflow-y: auto;
  max-height: 100%;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  /* ios gui refresh bug workaround hack makes an invisible border */
  box-sizing: border-box;
  padding-bottom: 8px;
}

#chat-input {
  width: 100%;

  mat-icon {
    margin: 8px;
  }
}

app-markdown-editor,
app-slate-editor,
app-native-editor {
  flex: 1 1 100%;
  width: 100%;
}

.loading {
  position: sticky;
  top: 20px;
  left: 0;
  z-index: 200;
  right: 0;
  margin: auto;
}

#chat-box-top {
  margin-top: 20px;
}
.mat-small {
  text-align: center;
  margin-top: 20px;
}
#is-typing-container {
  opacity: 0;
  font-size: 12px;
  margin-left: 10px;
  margin-top: 4px;
  &.currently-typing {
    opacity: 1;
  }
}

.preview-edited-message {
  display: flex;
  justify-content: center;
  margin: 6px;
  padding: 8px;

  mat-icon {
    font-size: 24px;
    margin: 0 !important;
  }

  > div:first-of-type {
    flex: 1 1 auto;
  }

  > div:last-of-type {
    display: flex;
    align-items: center;
    align-items: center;
  }
}

.edited-prev-msg {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.footer-buttons {
  display: flex;
  justify-content: space-between;
  font-size: 13px;

  div {
    display: flex;
    align-items: center;
    margin: 2px 6px;
    mat-icon {
      margin-right: 4px;
    }
    cursor: pointer;
  }
}

#more-reactions {
  display: flex;
  align-items: center;
  width: 248px;
  flex-wrap: wrap;

  span {
    padding: 4px;
    border-radius: 4px;
    img {
      width: 27px;
      height: 27px;
      cursor: pointer;
      display: block;
    }
  }
}
