@import '../../_style/index.less';
@import '../../button/style/index.less';

.yonui-mobile-tool-bars-2 {
  background-color: @fill-base;
  font-size: 0;
  position: relative;
  height: 49*@hd;
  overflow: hidden;

  .yonui-mobile-tool-bars-wrapper {
    padding: 0 8*@hd;
    position: absolute;
    left: 0;
	  top: 0;
	  right: 0;
	  bottom: -17px;
    display: flex;
    align-items: center;
    overflow-x: scroll;
    overflow-y: hidden;
  }

  &.alignright .yonui-mobile-tool-bars-wrapper {
    flex-direction: row-reverse;
  }
}

.tool-bars-wrapper-item-common {
  flex-shrink: 0;
  margin: 0 8*@hd 17px 8*@hd;
  padding: 0;
}

.yonui-mobile-tool-bars-wrapper>:only-child {
  .tool-bars-wrapper-item-common;
  width: calc(~'100% - 16*@{hd}');
}

.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(2),
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(2)~.mdf-button,
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(2)~div {
  .tool-bars-wrapper-item-common;
  width: calc(~'50% - 16*@{hd}');
}

.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(3),
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(3)~.mdf-button,
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(3)~div {
  .tool-bars-wrapper-item-common;
  width: calc(~'33.33% - 16*@{hd}');
}

.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(4),
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(4)~.mdf-button,
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(4)~div {
  .tool-bars-wrapper-item-common;
  width: calc(~'25% - 16*@{hd}');
}

.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(n+5),
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(n+5)~.mdf-button,
.yonui-mobile-tool-bars-wrapper>:first-child:nth-last-child(n+5)~div {
  .tool-bars-wrapper-item-common;
  width: calc(~'22% - 16*@{hd}');
}
