.yc-descriptions {
  display: flex;
  flex-direction: column;
  .yc-descriptions-title {
    color: var(--color-text-1);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5715;
  }
  .yc-descriptions-body {
    .yc-descriptions-table {
      width: 100%;
      border-collapse: collapse;
      tbody {
        display: table-row-group;
        vertical-align: middle;
        unicode-bidi: isolate;
        border-color: inherit;
        tr {
          display: table-row;
          vertical-align: inherit;
          unicode-bidi: isolate;
          border-color: inherit;
        }
      }
    }
  }
}
//table-layout
.yc-descriptions-table-layout-fixed {
  .yc-descriptions-body {
    .yc-descriptions-table {
      table-layout: fixed;
      .yc-descriptions-item-label {
        width: auto;
      }
    }
  }
}
// layout
.yc-descriptions-layout-horizontal,
.yc-descriptions-layout-vertical {
  .yc-descriptions-item-label {
    width: 1px;
    white-space: nowrap;
  }
  .yc-descriptions-item-value {
    white-space: pre-wrap;
    word-break: break-word;
  }
}
.yc-descriptions-layout-inline-horizontal {
  .yc-descriptions-item {
    padding: 7px 20px;
    & > div {
      display: inline-block;
      &:last-child {
        margin-left: 4px;
      }
    }
  }
}
.yc-descriptions-layout-inline-vertical {
  .yc-descriptions-item {
    & > div {
      &:last-child {
        margin-top: 2px;
      }
    }
  }
}
// bordered
.yc-descriptions-bordered {
  .yc-descriptions-body {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-medium);
    .yc-descriptions-row {
      &:not(:last-child) {
        border-bottom: 1px solid var(--color-border);
      }
    }
  }
  .yc-descriptions-item {
    border-right: 1px solid var(--color-border);
  }
  // 动态设置border不显示的位置
  &.yc-descriptions-layout-horizontal {
    .yc-descriptions-item-value:last-child {
      border-right: none;
    }
  }
  &.yc-descriptions-layout-vertical {
    .yc-descriptions-item-label,
    .yc-descriptions-item-value {
      &:last-child {
        border-right: none;
      }
    }
  }
  &.yc-descriptions-layout-horizontal,
  &.yc-descriptions-layout-vertical {
    .yc-descriptions-item-label,
    .yc-descriptions-item-value {
      border-right: 1px solid var(--color-border);
    }
    .yc-descriptions-item-label {
      background-color: var(--color-fill-1);
    }
  }
  &.yc-descriptions-layout-inline-vertical,
  &.yc-descriptions-layout-inline-horizontal {
    .yc-descriptions-item:last-child {
      border-right: none;
    }
  }
}
// size
@size: {
  @mini: {
    gap: 6px;
    item-padding: 8px;
  };
  @small: {
    gap: 8px;
    item-padding: 8px;
  };
  @medium: {
    gap: 10px;
    item-padding: 10px;
  };
  @large: {
    gap: 12px;
    item-padding: 14px;
  };
};
each(@size, .(@value,@name){
  @key:replace(~"@{name}", "@", "");
  .yc-descriptions-size-@{key} {
    gap: @value[gap];
    &.yc-descriptions-layout-inline-vertical {
      .yc-descriptions-item {
        padding: @value[item-padding] 20px;
      }
    }
  }  
});
