%chat-message{
  @extend %journal-message;
}
#easy_im{
  &_top_links{
    //border-bottom: 1px solid $servicebar-component-border;
    text-align: center;
    padding: 0.5*$gap 0;
    margin-bottom: $gap;
    a{
      padding: 0 0.5*$gap;
      color: darken($servicebar-component-background,40%);
      &:hover{
        color: $color-important;
      }
      &+a{
        border-left: 1px solid $servicebar-component-border;
      }
    }
    &+div{
      clear: both;
    }
  }
}
//#easy_instant_message_content{
//  height: 47px;
//}
.easy-instant-message{
  &-list{
    &-unread-mark{
      display: block;
      color: $color-negative;
    }
    &-item{
      &.im-send{
        &.to-me{
          //margin-right: $gap;
        }
        &.by-me{
          //margin-left: $gap;
          .avatar-container{
            float: right;
            margin-right: 0;
            margin-left: $gap;
          }
        }
        time{
          float: right;
        }
      }
      .author{
        opacity: 0.5;
        margin-bottom: 0.5*$gap;
      }
      &-message{
        @extend %chat-message;
      }
      .avatar-container{
        margin-left: 0;
      }
    }
  }
}
#easy_instant_messages_list_window .servicebar-content {
  top: $form-input-height + 2*$gap;
  bottom: 0;
}

.EP_easyim {
  .easyim {
    &__container {
      @extend %box-sizing-border-box;
      right: $servicebar-width !important;
      bottom: 0 !important;
      top: $topmenu-height;
      left: auto;
      position: fixed !important;
      background: $servicebar-component-background;
      border-color: $servicebar-component-border;
      width: $servicebar-component-width !important;
      z-index: 899;
    }
    &__body {
      margin: 1.5*$gap;
      @extend %box-appearance;
      border: 1px solid $color-service-border;
      @extend %absolute;
      top: 56px;
      height: initial !important;
    }
    &__header {
      position: relative !important;
      background-color: $white !important;
      margin: 1.5*$gap;
      padding: 0 !important;
      height: 1.5*$box-padding !important;
      border: 1px solid $color-service-border;
      @extend %box-appearance;
    }
    &__contact__name {
      color: $servicebar-component-background;
    }
    &__search-form {
      @extend %flex;
      @extend %align-items-center;
    }
    &__top-close {
      display: none !important;
    }
    &__search-input {
      all: initial !important;
      font-family: $font-family;
      font-size: $font-size;
      color: $color-text !important;
      margin-left: 0.5*$gap - 2;
      width: 100% !important;

      &::-webkit-input-placeholder {
        color: $servicebar-component-background !important;
        opacity: 0.5;
        font-family: $font-family;
        font-size: $font-small;
      }

      &:-moz-placeholder {
        color: $servicebar-component-background !important;
        opacity: 0.5;
        font-family: $font-family;
        font-size: $font-small;
      }

      &::-moz-placeholder {
        color: $servicebar-component-background !important;
        opacity: 0.5;
        font-family: $font-family;
        font-size: $font-small;
      }

      &:-ms-input-placeholder {
        color: $servicebar-component-background !important;
        opacity: 0.5;
        font-family: $font-family;
        font-size: $font-small;
      }
    }
    &__search-btn{
      @include icon-parent(magnifier);
      color: $servicebar-component-background;
      font-size: $font-h2;
      padding-top: 0.5*$gap - 1;
      img{
        display: none;
      }
    }
    &__back-btn, &__contact__history {
      background-color: $servicebar-component-background;
    }
    &__conversation__messages {
      background-color: $white;
    }
    &__message__content {
      background-color: $color-main;
      &--grey {
        background-color: $gray;
      }
    }
    &__contact__pmi {
      color: $servicebar-component-background;
    }
  }
}

li > span#easy_servicebar_component_beak {
  display: initial;
  a {
    cursor: pointer;
  }
}