@import './variables.scss';

.chat,
.popupChat {
  height: 100%;
  width: 100%;
  position: relative;
  min-height: 600px;
}

.popupChat {
  z-index: 100;
}

.sc-chat-window {
  width: 376px;
  height: calc(100% - 120px);
  max-height: 590px;
  box-sizing: border-box;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.3s ease-in-out;
  border-radius: $windowBorderRadius;
}

.popupChat .sc-chat-window {
  box-shadow: 0px 7px 40px 2px rgba(0, 0, 0, 0.3);
  position: fixed;
  right: 25px;
  bottom: 100px;
  min-height: 400px;
}

.sc-chat-window.closed {
  opacity: 0;
  visibility: hidden;
  bottom: 90px;
}

.sc-message-list {
  display: none;
  height: 80%;
  overflow-y: auto;
  background-color: white;
  background-size: 100%;
  padding: 40px 0 0 0;
  -webkit-overflow-scrolling: touch;
}

.sc-message-list.show {
  display: inline;
}

.sc-message-list.isLoading {
  display: flex;
  justify-content: center;
  align-items: center;
}

.onlineList {
  display: none;
  height: 80%;
  overflow-y: auto;
  background-color: white;
  background-size: 100%;
  padding: 40px 0 0 0;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.onlineList.show {
  display: flex;
}

.onlineList_wrapper {
  width: 100%;
  height: 100%;
}

.onlineList_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 10px 0 20px;
  box-sizing: border-box;
  margin-top: -40px;
  border-bottom: 1px solid $borderColor;
}

.closeOnlineList {
  padding: 0;
}

.onlineList_header_group {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.onlineList_onlineIcon {
  min-width: 18px;
  min-height: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: $onlineGreen;
  margin-right: 10px;
}

.onlineList_members_link {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 14px;
}

.onlineList_members {
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: scroll;
}

.onlineList_members_profile {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.onlineList_members_profile_name {
  margin: 0;
  color: $threeBoxBlack;

  &:visited {
    color: $threeBoxBlack;
  }
}

.sc-message--me {
  text-align: right;
}

.sc-message--them {
  text-align: left;
}

.x0.x1.x2 {
  display: flex;
  justify-content: center;
  align-items: center;
}

.x0.x3.x4.x5 {
  display: flex;
  justify-content: center;
  align-items: center;
}

.thread_loading {
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
}

@media (max-width: 450px) {
  .popupChat.isMobile {
    min-height: 0;
    height: 0;
    z-index: 0;
  }

  .chat .sc-chat-window {
    width: 100%;
    height: 100%;
    max-height: 100%;
    right: 0px;
    bottom: 0px;
  }

  .popupChat .sc-chat-window {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    right: 0px;
    bottom: 0px;
    border-radius: 0px;
    border: none;
    box-shadow: none;
    position: fixed;
    right: 0;
    bottom: 0;
  }

  .sc-chat-window.closed {
    opacity: 0;
    visibility: hidden;
    bottom: 0;
  }

  .sc-chat-window {
    transition: 0.1s ease-in-out;
  }

  .sc-chat-window.closed {
    bottom: 0px;
  }
}