@charset 'utf-8';

$font-dark: #212121;
$font-mid: #666666;
$font-light: #848d95;
$font-white: #ffffff;
$line-basic: 1px solid #dddddd;
$bg-list-item-msg: #f0f4f6;
$bg-list-hover: #efefef;
$listH-row2: 60px;
$presence-size: 8px;
$thumbnail-msize: 40px;

@mixin ellipsis($row) {
  overflow: hidden;
  text-overflow: ellipsis;
  @if $row == 1 {
    display: block;
    white-space: nowrap;
    word-wrap: normal;
  } @else if $row >= 2 {
    display: -webkit-box;
    -webkit-line-clamp: $row;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
  }
}

%list-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: $listH-row2;
  border-bottom: $line-basic;
  padding: 20px;
}

%msg-status {
  display: inline-block;
  height: 40px;
  background-color: $bg-list-item-msg;
  font-size: 11px;
  padding: 2px 6px;
  vertical-align: middle;
  align-items: center;
  @include ellipsis(2);
  border-radius: 4px;
}

/*.list-item {
  @extend %list-item;
  &:hover {
    background-color: $bg-list-hover;
  }
  .mat-checkbox {
    padding-left: 10px;
  }
}*/

.item-default {
  display: flex;
  width: 100%;
  dt {
    flex: none;
    position: relative;
    .thumbnail {
      width: $thumbnail-msize;
      height: auto;
    }
  }

  .info {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 0;
    width: calc(100% - 50px);
    transform: translateY(2px);
    .detail {
      .user-info {
        display: flex;
        flex-flow: row;
        margin-bottom: 2px;
        .work-status {
          margin-right: 4px;
          border-radius: 4px;
          padding: 0 6px;
          color: #ffffff;
          font-size: 0.9em;
          width: 40px;
          justify-items: center;
          height: 100%;
        }
        .name {
          margin-bottom: 2px;
          color: $font-dark;
          width: calc(100% - 40px);
          @include ellipsis(1);
          b {
            font-weight: 600;
          }
          .grade {
            font-size: 0.9em;
          }
        }
      }
      .dept {
        font-size: 0.9em;
        color: $font-mid;
        @include ellipsis(1);
      }
      .msg-status {
        display: inline-block;
        float: right;
        @extend %msg-status;
      }
    }
  }
}
//가변에 따른 list-item width값 변경
.list-item {
  .presence[class*='pc'] {
    + .item-default {
      width: calc(100% - 20px);
    }
  }
  &.checkbox {
    .presence[class*='pc'] {
      + .item-default {
        width: calc(100% - 50px);
      }
    }
    .item-default {
      width: calc(100% - 30px);
      .info {
        .detail {
          width: 100%;
        }
        .msg-status {
          display: none;
        }
      }
    }
  }
}

.oraganization-tab {
  .list-item {
    .presence {
      display: none;
    }
    .item-default {
      width: calc(100% - 30px);
    }
  }
}
.org {
  .list-item {
    height: 70px;
  }
}
