@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;
}

.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);
    .user-info {
      .user {
        display: flex;
        flex-flow: row;
        margin-bottom: 2px;
        .work-status {
          display: inline-flex;
          justify-content: center;
          justify-items: center;
          color: #ffffff;
          height: 100%;
          min-width: 32px;
          margin-right: 4px;
          border-radius: 24px;
          flex: 0 0 auto;
        }
        .detail {
          color: $font-dark;
          width: calc(100% - 40px);
          @include ellipsis(1);
        }
      }
      .dept {
        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;
  }
}
