@import './dao-table-variable.scss';

// 小徽章
$small-badge-height: 16px;
.small-badge {
  display: inline-block;
  border: 1px solid $white-dark;
  border-radius: 2px;
  padding: 0 4px;
  height: $small-badge-height + 2px;
  line-height: $small-badge-height;
  margin: 0 5px;
  transform: translateY(-2px);
}
.small-badge-svg {
  width: 16px;
  height: 16px;
  transform: translateY(-2px);
}
.small-badge-span {
  font-size: $minor-size;
  line-height: $small-badge-height;
}

// 标签框
.label-container {
  display: inline-table;
  margin-right: 5px;
  vertical-align: middle;
}
.label-key, .label-value {
  border: 1px solid #e0e2e6;
  border-radius: 3px;
  display: inline-block;
  padding: 0px 6px;
  height: 24px;
  line-height: 24px;
  color: $black-dark;
}
.label-key {
  border-right-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background-color: #e0e2e6;
  margin-left: 5px;
}
.label-value {
  border-left-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background-color: $white-light;
  margin-right: 5px;
}

$arrow-height: 18px;
$arrow-inner-height: 16px;
$arrow-padding: 3px;
$arrow-width: 5px;

.arrow-container {
  display: inline-block;
  position: relative;
  border: 1px solid $grey-light;
  border-radius: 3px;
  height: $arrow-height;
  line-height: $arrow-inner-height;
  margin-right: 5px;
  cursor: pointer;
  &:hover {
    border-color: $grey-dark;
    .arrow-value {
      background-color: $grey-dark;
    }
  }
}

.arrow-svg {
  display: inline-block;
  overflow: hidden;
  border-radius: 3px;
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  position: absolute;
  top: -1px;
  left: -1px;
  width: $arrow-height !important;
  height: $arrow-height !important;
}

.arrow-key, .arrow-value {
  display: inline-block;
  position: relative;
  vertical-align: top;
  font-size: 13px;
  height: $arrow-inner-height;
  line-height: $arrow-height;
  padding: 0 $arrow-padding;
  font-family: Consolas, "Liberation Mono", Courier, monospace;
}

.arrow-key {
  margin-left: $arrow-height;
  background-color: #f2f4f7;
  padding-right: 2px;
  color: $black-light;
  z-index: 1;
  &::after {
    content: '';
    display: block;
    position: absolute;
    height: 0;
    width: 0;
    border-left: $arrow-width solid #f2f4f7;
    border-top: $arrow-inner-height * 0.5 solid transparent;
    border-bottom: $arrow-inner-height * 0.5 solid transparent;
    top: 0;
    left: 100%;
    z-index: 2;
  }
}
.arrow-value {
  background-color: $grey-light;
  padding-left: $arrow-height * 0.5;
  color: white;
}
