@import 'variables.less';
@import 'mixins.less';

.meeds-chat-drawer {
  .chat-top-drawer-avatar {
    width: 36px;
    height: 36px;
    background-size: cover;
  }

  .last-message-timestamp {
    height: 28px;
  }

  .chat-room-item {
    .chat-room-name {
      width: 240px;
    }

    .chat-room-last-message {
      width: 260px;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
    }

    .unread-messages {
      width: 24px;
      height: 24px;
    }
  }
}

#matrixChatButton {
  .v-badge__badge{
    line-height: 20px;
    padding: 0;
  }
}

.matrix-user-status {
  margin-top: auto;
  margin-left: auto;
  line-height: normal;
  border-radius: 50%;
  line-height: 20px;
  border: 2px solid #FFFFFF;
}

.matrix-status-online {
  background-color: @successColor !important;
}

.matrix-status-unavailable {
  background-color: @errorColor !important;
}

.matrix-status-offline {
  background-color: @greyColorLighten1Default !important;
}
.chat-button-status-online {
  color: @successColor !important;
}

.chat-button-status-unavailable {
  color: @errorColor !important;
}

.chat-button-status-offline {
  color: @greyColorLighten1Default !important;
}

.content-align {
  align-content: center;
}
.size-3 {
  width: 12px;
  height: 12px;
}
.size-2 {
  width: 8px;
  height: 8px;
}

.size-6 {
  width: 24px;
  height: 24px;
}

.size-7 {
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
}

.size-8 {
  width: 32px;
  height: 32px;
}

.size-9 {
  width: 36px;
  height: 36px;
}

.size-12 {
  width: 48px;
  height: 48px;
}
.size-13 {
  width: 52px;
  height: 52px;
}

.meeds-chat-contact-avatar {
  background-size: cover;
  background-position: center;
  border: 2px solid @white;
  z-index: 1;
}
.meeds-chat-contact-avatar-name {
  line-height: 1 !important;
  align-content: flex-start;
}

.chat-message-timestamp-chip {
  background: #F0F0F0BF !important;
  opacity: 0.8 !important;
}
.chat-message-content-timestamp {
  margin-top: auto;
  align-self: flex-end;
  line-height: 1;
}


.text-font-extra-small-size {
  font-size: 8px !important;
}
.border-top-right-radius-16 {
  border-top-right-radius: 16px !important;
}
.border-bottom-right-radius-16 {
  border-bottom-right-radius: 16px !important;
}
.border-top-right-radius-0 {
  border-top-right-radius: 2px !important;
}
.border-bottom-right-radius-0 {
  border-bottom-right-radius: 2px !important;
}
.border-top-left-radius-16 {
  border-top-left-radius: 16px !important;
}
.border-bottom-left-radius-16 {
  border-bottom-left-radius: 16px !important;
}
.border-top-left-radius-0 {
  border-top-left-radius: 2px !important;
}
.border-bottom-left-radius-0 {
  border-bottom-left-radius: 2px !important;
}

.border-radius-16 {
  border-radius: 16px !important;
}

.mt-0-5 {
  margin-top: 2px !important;
}

.mt--4 {
  left: -4px ~'; /** orientation=lt */ ';
  right: -4px ~'; /** orientation=rt */ ';
  top: -16px;
}

.mb-0_5 {
  margin-bottom: 2px !important;
}

#ChatDiscussionDrawer, #meedsChatDrawer {
  #chatMessagesContainer {
    height: 100%;
    overflow: auto;
    overscroll-behavior: none;

    .v-chip::before {
      opacity: 0 !important;
    }

    .chat-message-content-body {
      width:fit-content;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-start;
      position: relative;
      a {
        color: unset;
        text-decoration: underline;
      }
    }

    .chat-message-from-self {
      border-radius: 16px;
      margin-left: auto;
      .message-file {
        max-width: 320px !important;
        .message-file-name {
          line-height: 28px;
          &:hover {
            text-decoration: underline;
          }
        }
      }
    }

    .chat-message-from-others {
      border-radius: 16px;

      .message-file {
        max-width: 304px !important;
        .message-file-name {
          line-height: 28px;
          &:hover {
            text-decoration: underline;
          }
        }
      }
    }

    .my-message-text {
      background-color: #476A9C;
      color: #FFFFFF;
      max-width: 340px;
    }
    .my-message-text i{
      color: #FFFFFF;
    }

    .others-message-text {
      background-color: @primaryBackground;
      max-width: 328px;
    }
    .others-message-text i {
      color: #20282c;
    }
    .others-audio-message {
      min-width: 299px;
    }
  }
  .meeds-chat-composer {
    background-color: @drawerBackgroundColor;
    height: 40px;
    max-height: 300px;
    border-radius: 16px;
    width: 100%;
    overflow-y: hidden;
    outline: none;
    border: 1px solid @greyColorLighten1
  }

  .message-reaction-item {
    border-radius: 16px;
    background: #F0F0F0 0% 0% no-repeat padding-box;
  }
  .current-user-reaction {
    border: 2px solid #476A9C;
  }
  .other-user-reaction {
    border: 2px solid #FFF;
  }

  .matrix-chat-send-message-button {
    .v-icon {
      color: @whiteColorDefault !important;
    }
  }

  @keyframes fadePulseScale {
    0%, 100% {
      opacity: 0.3;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.4);
    }
  }

  .writing-dot {
    animation-name: fadePulseScale;
    animation-duration: 1.5s;
    margin: 0 2;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
  }

  .writing-dot:nth-child(1) {
    animation-delay: 0s;
  }

  .writing-dot:nth-child(2) {
    animation-delay: 0.3s;
  }

  .writing-dot:nth-child(3) {
    animation-delay: 0.6s;
  }
}

.VuetifyApp .chat-action-menu-item {
  min-height: 36px !important;
  min-width: 100px !important;
}

#ChatDiscussionDrawer.fullPageHeader,
#ChatDiscussionDrawer.fullPageHeader_no_room,
#meedsChatDrawer.fullPageHeader,
#meedsChatDrawer.fullPageHeader_no_room {
  .drawerTitle {
    flex: none !important;
    width: 404px;
    background-color: @primaryBackground !important;

    align-self: stretch;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    .filter {
      .v-input__slot {
        background-color: @primaryBackground !important;
      }
    }
  }

  .drawerIcons {
    width: 100%;

    button:nth-child(1) {
      margin-left: auto ~'; /** orientation=lt */ ';
      margin-right: auto ~'; /** orientation=rt */ ';
    }
  }
}
