@import '~scss/variables';
@import '~scss/mixins';

.tracing {
  padding: 0;
  height: auto;
}

.cardHeader {
  position: relative;
  padding: 14px 20px;
  font-size: $size-normal;
  font-weight: 600;
  line-height: 1.43;
  border-radius: 8px 8px 0 0;
  background-color: $lightest;
  box-shadow: 0 1px 0 0 #d8dee5;
  @include clearfix;

  .operations {
    float: right;
    margin: -6px 0;
  }
}

.cardContent {
  padding: 20px;
}

.item {
  border-radius: 4px;
  background-color: $lightest;
  cursor: pointer;
  transition: all $trans-speed ease-in-out;

  & + .item {
    margin-top: 8px;
  }

  &:hover {
    box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06);
  }
}

.header {
  position: relative;
  height: 35px;
  padding: 6px 80px 6px 20px;
  box-shadow: 0 1px 0 0 #d8dee5;

  .title {
    position: absolute;
    width: calc(100% - 130px);
    @include ellipsis;
    font-weight: $font-bold;
    font-size: $size-normal;
    font-family: $font-family-id;
    z-index: 1;
  }

  .duration {
    position: absolute;
    @include vertical-center;
    right: 20px;
    z-index: 1;

    :global .icon {
      margin-right: 8px;
    }
  }

  .durationBar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px 4px 0 0;
    background-color: rgba(162, 216, 187, 0.4);
  }
}

.content {
  display: flex;
  justify-content: space-between;
  padding: 12px 12px 12px 20px;

  .spanWrapper {
    min-width: 140px;
  }

  .spans,
  .errorSpans {
    display: inline-block;
    height: 20px;
    padding: 2px 9px;
    border-radius: 3px;
    border: solid 1px #d8dee5;
    background-color: #ffffff;
    font-weight: $font-bold;
    font-family: $font-family-id;
    line-height: 16px;
  }

  .errorSpans {
    margin-left: 4px;
    color: #f5222d;
    background: #fff1f0;
    border-color: #ffa39e;
  }

  .services {
    width: calc(100% - 400px);
    & > li {
      display: inline-block;
      padding: 2px 9px 2px 2px;
      margin-right: 8px;
      margin-bottom: 4px;
      border-radius: 3px;
      background-color: $bg-color;
      line-height: 16px;
      font-weight: $font-bold;
      font-family: $font-family-id;

      &:last-child {
        margin-right: 0;
      }

      .tag {
        display: inline-block;
        width: 12px;
        height: 16px;
        border-radius: 1px;
        margin-right: 8px;
        vertical-align: middle;
      }
    }
  }

  .startTime {
    width: 200px;
    text-align: right;
  }
}

.empty {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 380px);
  min-height: 306px;
  text-align: center;

  .icon {
    display: inline-block;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 100px 0 100px 100px;
    background-color: $bg-color;
  }

  p {
    color: #79879c;
    strong {
      color: #242e42;
    }
  }
}
