@import 'mixins/mixins';
@import 'common/var';

@mixin set-color($colorType) {
  @if ($colorType == 'value') {
    @include when(type-01) {
      color: $--invoice-value-color-01 !important;
    }
    @include when(type-14) {
      color: $--invoice-value-color-10;
    }
    @include when(type-08) {
      color: $--invoice-value-color-10;
    }
    @include when(type-10) {
      color: $--invoice-value-color-10;
    }
    @include when(type-04) {
      color: $--invoice-value-color-04;
    }
    @include when(type-81) {
      color: $--invoice-value-color-10;
    }
    @include when(type-82) {
      color: $--invoice-value-color-10;
    }
    @include when(type-03) {
      color: $--invoice-value-color-10;
    }
    @include when(type-15) {
      color: $--invoice-value-color-10;
    }
  } @else if($colorType == 'title') {
    @include when(type-01) {
      color: $--invoice-title-color-01;
    }
    @include when(type-14) {
      color: $--invoice-title-color-10;
    }
    @include when(type-08) {
      color: $--invoice-title-color-10;
    }
    @include when(type-10) {
      color: $--invoice-title-color-10;
    }
    @include when(type-04) {
      color: $--invoice-title-color-04;
    }
    @include when(type-81) {
      color: $--invoice-title-color-10;
    }
    @include when(type-82) {
      color: $--invoice-title-color-10;
    }
    @include when(type-03) {
      color: $--invoice-title-color-10;
    }
    @include when(type-15) {
      color: $--invoice-title-color-10;
    }
  }
}

@include b(invoice) {
  p,
  ul {
    margin: 0;
    padding: 0;
    li {
      list-style-type: none;
    }
  }

  div,
  p,
  li,
  span {
    font-size: $--invoice-font-size;
  }
  position: relative;
  box-sizing: content-box;
  z-index: 1;
  @include set-color('title');
  @include scroll-bar-invoice;
}

@mixin flex-cloumn-center() {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@mixin msg-left() {
  padding: 5px 0px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

@mixin row-justify() {
  text-align-last: justify;
  text-align: justify;
}

@mixin footer-span-10-color() {
  color: $--invoice-value-color-10;
  border-color: $--invoice-title-color-10;
  li {
    border-color: $--invoice-title-color-10;
  }
}

// 默认各列宽
@mixin feature-space-default() {
  :nth-child(1) {
    width: 31%;
  }
  :nth-child(2) {
    width: 8%;
  }
  :nth-child(3) {
    width: 5%;
  }
  :nth-child(4) {
    width: 6%;
  }
  :nth-child(5) {
    width: 20%;
  }
  :nth-child(6) {
    width: 13%;
  }
  :nth-child(7) {
    width: 5%;
  }
  :nth-child(8) {
    width: 12%;
  }
}
// 通行费各列宽
@mixin feature-space-txf() {
  :nth-child(1) {
    width: 22%;
  }
  :nth-child(2) {
    width: 16%;
  }
  :nth-child(3) {
    width: 6%;
  }
  :nth-child(4) {
    width: 10%;
  }
  :nth-child(5) {
    width: 10%;
  }
  :nth-child(6) {
    width: 14%;
  }
  :nth-child(7) {
    width: 7%;
  }
  :nth-child(8) {
    width: 15%;
  }
}

// 电票普票各列宽
@mixin feature-space-qd() {
  :nth-child(1) {
    width: 30%;
  }
  :nth-child(2) {
    width: 8%;
  }
  :nth-child(3) {
    width: 5%;
  }
  :nth-child(4) {
    width: 6%;
  }
  :nth-child(5) {
    width: 18%;
  }
  :nth-child(6) {
    width: 12.5%;
  }
  :nth-child(7) {
    width: 9.5%;
  }
  :nth-child(8) {
    width: 11%;
  }
}

@include b(invoice-header) {
  height: 90px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  header {
    position: absolute;
    width: 100%;
    left: 50%;
    transform: translate(-50%, 0%);
    z-index: 1;
  }
  @include m(title) {
    width: fit-content;
    margin: 0 auto;
    font-weight: 700;
  }
  @include m(title-line) {
    &::after {
      content: '';
      height: 2px;
      width: 30%;
      display: block;
      margin: 6px auto;
      text-decoration: double;
      border-top: 2px solid;
      border-bottom: 2px solid;
    }
  }
  @include m(sub-title) {
    font-size: 16px !important;
    font-weight: 700;
    text-align: center;
    span {
      font-size: 16px !important;
      margin: 0 18px;
    }
  }
  @include m(msg-center) {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 13%;
    transform: translate(0%, 70%);
    @include when(type-01) {
      div {
        color: #574b9d;
      }
    }
    @include when(type-04) {
      div {
        color: $--invoice-title-color-04;
      }
    }
    div {
      display: flex;
      font-size: 21px !important;
      span {
        color: #1855d7;
        font-size: 21px !important;
      }
    }
    div:nth-child(2) {
      letter-spacing: 1px;
    }
  }
  @include m(msg-left) {
    :nth-child(1) {
      font-size: 12px;
      letter-spacing: 2px;
      @include when(type-01) {
        color: $--invoice-title-color-01;
      }
      @include when(type-04) {
        color: $--invoice-title-color-04;
      }
      @include when(type-81) {
        color: $--invoice-title-color-10;
      }
    }
    :nth-child(2) {
      font-size: 12px;
      letter-spacing: 3px;
    }
  }
  @include m(msg-right) {
    margin-right: 15px;
    div:nth-child(1) {
      margin-left: 32px;
      span {
        display: block;
      }
      :last-child {
        letter-spacing: 3px;
      }
    }
    div:nth-child(2) {
      position: absolute;
      transform: translate(-140%, -30%);
      letter-spacing: 1px;
      @include when(type-01) {
        color: $--invoice-title-color-01;
      }
      @include when(type-04) {
        color: $--invoice-title-color-04;
      }
      @include when(type-81) {
        color: $--invoice-title-color-10;
      }
    }
    div:nth-child(3) {
      letter-spacing: 1px;
    }
  }
  div:first-child {
    article {
      height: 100%;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      box-sizing: border-box;
      section {
        margin-bottom: 4px;
      }
      .jqbh {
        margin-bottom: 4px !important;
      }
      .txf {
        position: absolute;
        margin: -30px 0 0 105px;
        color: $--invoice-value-color-10;
        font-size: 18px;
        font-weight: 600;
      }
    }
    //专用发票
    @include when(type-01) {
      height: 100%;
      .ai-invoice-header--title {
        font-size: 18px !important;
      }
      article {
        color: $--invoice-value-color-01;
        .ai-invoice-header--msg-left {
          margin-left: 5%;
        }
      }
    }
    //电票普票, #start daniel 20200225 添加margin-top: -8px; end#
    @include when(type-10) {
      height: 100%;
      header {
        margin-top: 3%;
      }
      .ai-invoice-header--title {
        font-size: 22px !important;
        margin-top: -8px;
      }
      article {
        padding: 0 25px 0px 15px;
        div {
          min-height: 18px;
          margin-bottom: 1px;
          span:first-child {
            min-width: 56px;
            display: inline-block;
            text-align-last: justify;
            text-align: justify;
          }
          span:last-child {
            color: $--invoice-value-color-10;
          }
        }
      }
    }
    @include when(type-81) {
      height: 100%;
      header {
        margin-top: 3%;
      }
      .ai-invoice-header--title {
        font-size: 22px !important;
        margin-top: -8px;
      }
      article {
        align-items: center;
        padding: 0 25px 0px 15px;
        div {
          min-height: 18px;
          margin-bottom: 1px;
          span:first-child {
            min-width: 56px;
            display: inline-block;
            text-align-last: justify;
            text-align: justify;
          }
          span:last-child {
            color: $--invoice-value-color-10;
            // color: red;
          }
        }
      }
    }
    //普票
    @include when(type-04) {
      height: 100%;
      .ai-invoice-header--title {
        font-size: 18px !important;
      }
      article {
        color: $--invoice-value-color-04;
        .ai-invoice-header--msg-left {
          margin-left: 12%;
          div {
            font-size: 14px !important;
            letter-spacing: 0px;
          }
        }
      }
    }
  }
}

@include b(invoice-msg) {
  article {
    display: flex;
    border: $--invoice-border-theme;
    div {
      box-sizing: border-box;
      span {
        display: inline-block;
      }
    }
    p {
      font-size: 12px;
    }
  }
  @include when(type-01) {
    p {
      color: $--invoice-value-color-01;
    }
  }
  @include when(type-08) {
    p {
      color: $--invoice-value-color-10;
    }
  }
  @include when(type-10) {
    p {
      color: $--invoice-value-color-10;
    }
  }
  @include when(type-14) {
    p {
      color: $--invoice-value-color-10;
    }
  }
  @include when(type-04) {
    p {
      color: $--invoice-value-color-04;
    }
  }
  @include when(type-81) {
    p {
      color: $--invoice-value-color-10;
    }
  }
  @include when(type-82) {
    p {
      color: $--invoice-value-color-10;
    }
  }
  @include when(type-03) {
    p {
      color: $--invoice-value-color-10;
    }
  }
  @include m(left1) {
    width: 3%;
    border-right: $--invoice-border-theme;
    @include msg-left();
    @include when(type-81) {
      width: 3.5%;
    }
  }
  @include m(left2) {
    width: 2%;
    border-left: $--invoice-border-theme;
    border-right: $--invoice-border-theme;
    @include msg-left();
    @include when(type-81) {
      width: 3.5% !important;
    }
  }
  @include m(right1) {
    width: 54%;
    min-height: 74px;
    padding: 1px 0px 1px 8px;
    @include when(type-81) {
      @include flex-cloumn-center();
      div {
        min-height: 20px;
        line-height: 20px;
        :nth-child(1) {
          min-width: 0;
        }
      }
    }
    div {
      display: flex;
      align-items: center;
      min-height: 18px;
      line-height: 18px;
      :nth-child(1) {
        min-width: $--invoice-label-width-pc;
        display: inline-block;
        text-align-last: justify;
        text-align: justify;
      }
    }
    .small-font {
      font-size: 11px !important;
      min-height: 11px;
      line-height: 12px;
    }
  }
  @include m(right1_max) {
    width: 96%;
    justify-content: start !important;
  }
  @include m(right2) {
    box-sizing: border-box;
    width: 41%;
    padding: 0px 10px;
    // word-wrap: break-word;
    .remark {
      // word-wrap: break-word;
      word-wrap: break-word;
      word-break: break-all;
      overflow: hidden;
    }
    @include when(type-81) {
      @include flex-cloumn-center();
    }
    @include e(right2) {
      height: 100%;
      padding-left: 3px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      span {
        letter-spacing: 4px;
        word-break: break-all;
      }
    }
  }
}
@include b(invoice-feature-default-ul) {
  ul {
    @include feature-space-default();
  }
}
@include b(invoice-feature-txf-ul) {
  ul {
    @include feature-space-txf();
  }
}

@include b(invoice-feature-qd-ul) {
  ul {
    @include feature-space-qd();
  }
}

@include b(invoice-feature) {
  position: relative;
  border-right: $--invoice-border-theme;
  ul {
    display: flex;
    li {
      display: flex;
      box-sizing: border-box;
      padding: 2px 4px;
      word-break: break-all;
    }
  }
  .ai-invoice-feature--list,
  .ai-invoice-feature--btn,
  .ai-invoice-feature--list-end :nth-child(n + 2),
  .ai-invoice-feature--footer span {
    @include when(type-01) {
      color: $--invoice-value-color-01;
      border-color: $--invoice-title-color-01;
      li {
        border-color: $--invoice-title-color-01;
      }
    }
    @include when(type-10) {
      @include footer-span-10-color();
    }
    @include when(type-08) {
      @include footer-span-10-color();
    }
    @include when(type-14) {
      @include footer-span-10-color();
    }
    @include when(type-81) {
      @include footer-span-10-color();
    }
    @include when(type-82) {
      @include footer-span-10-color();
    }
    @include when(type-04) {
      color: $--invoice-value-color-04;
      border-color: $--invoice-title-color-04;
      li {
        border-color: $--invoice-title-color-04;
      }
    }
    @include when(type-61) {
      @include footer-span-10-color();
    }
  }
  @include m(line) {
    position: absolute;
    height: calc(100% - 30px);
    width: 100%;
    z-index: -1;
    li {
      border-left: $--invoice-border-theme;
    }
    :nth-child(2) {
      height: calc(100% + 30px);
    }
  }
  @include m(header) {
    li {
      justify-content: center;
    }
  }
  @include m(btn) {
    height: 160px;
    :nth-child(1) {
      display: flex;
      flex-direction: column;
      span {
        @include when(type-01) {
          background-color: $--invoice-value-color-01;
        }
        @include when(type-08) {
          background-color: $--invoice-title-color-10;
        }
        @include when(type-10) {
          background-color: $--invoice-title-color-10;
        }
        @include when(type-14) {
          background-color: $--invoice-title-color-10;
        }
        @include when(type-04) {
          background-color: $--invoice-value-color-04;
        }
        @include when(type-81) {
          background-color: $--invoice-title-color-10;
        }
        @include when(type-82) {
          background-color: $--invoice-title-color-10;
        }
        @include when(type-03) {
          background-color: $--invoice-title-color-10;
        }
        @include when(type-61) {
          background-color: $--invoice-title-color-10;
        }
        width: fit-content;
        height: fit-content;
        transform: translate(50%, 200%);
        color: #fff !important;
        padding: 5px 24px;
        display: block;
        box-sizing: border-box;
        border-radius: 2px;
        cursor: pointer;
      }
    }
    :nth-child(n + 3) {
      text-align: right;
    }
  }
  @include m(list) {
    :nth-child(3) {
      justify-content: center;
    }
    :nth-child(n + 4) {
      justify-content: flex-end;
    }
  }
  @include m(list-txf) {
    :nth-child(4) {
      justify-content: center;
    }
    :nth-child(5) {
      justify-content: center;
    }
    :nth-child(8) {
      justify-content: flex-end;
    }
  }
  @include m(list-scroll) {
    height: 160px;
    overflow-y: auto;
  }
  @include e(add-width) {
    // width: calc(12% + 8px) !important;
  }
  @include m(list-end) {
    :nth-child(1) {
      justify-content: center;
    }
    :nth-child(n + 4) {
      justify-content: flex-end;
      font-size: 13px;
    }
  }
  @include m(footer) {
    display: flex;
    box-sizing: border-box;
    height: $--invoice-row-height;
    line-height: $--invoice-row-height;
    border-top: $--invoice-border-theme;
    align-items: center;
    .footer-title {
      width: 31%;
      box-sizing: border-box;
      text-align: center;
      border-left: $--invoice-border-theme;
      // border-right:$--invoice-border-theme;
    }
    .footer-title-txf {
      width: 22%;
    }
    .footer-title-qd {
      border-right: $--invoice-border-theme;
    }
    :nth-child(2) {
      flex: 1;
      display: flex;
      align-items: center;
      span:nth-child(1) {
        margin-left: 10px;
        font-size: 18px !important;
        width: fit-content;
      }
      span:nth-child(2) {
        font-size: 12px !important;
      }
    }
    :nth-child(3) {
      width: 24%;
      span {
        font-size: 13px !important;
        vertical-align: middle;
      }
    }
  }
}

@include b(invoice-footer) {
  display: flex;
  box-sizing: border-box;
  padding: 10px 0px 0px 15px;
  p {
    line-height: 1 !important;
  }
  @include when(type-01) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-01;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-01;
      }
    }
  }
  @include when(type-08) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-10;
      }
    }
  }
  @include when(type-10) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-10;
      }
    }
  }
  @include when(type-14) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-10;
      }
    }
  }
  @include when(type-04) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-04;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-04;
      }
    }
  }
  @include when(type-81) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-10;
      }
    }
  }
  @include when(type-82) {
    p {
      span:nth-child(1) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(2) {
        color: $--invoice-value-color-10;
      }
    }
  }

  :nth-child(1) {
    width: 28%;
  }
  :nth-child(2) {
    width: 21%;
  }
  :nth-child(3) {
    width: 21%;
  }
}

@include b(invoice-reel) {
  width: 336px;
  height: calc(604px - 32px);
  // overflow-y: auto;
  box-sizing: border-box;
  padding: 0px 8px;
  header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    p {
      height: 20px;
      line-height: 20px;
      font-size: 20px;
      color: $--invoice-title-color-10;
      span {
        width: fit-content;
        font-size: 7px;
        letter-spacing: 2px;
      }
    }
    p:first-child {
      letter-spacing: 3px;
      // margin-left: 17px;
    }
    p:last-child {
      letter-spacing: 30px;
      margin: 8px 0px 0px 14px;
    }
    margin-bottom: 36px;
  }
  article {
    box-sizing: border-box;
    p {
      box-sizing: border-box;
      min-height: 22px;
      line-height: 22px;
      color: $--invoice-value-color-10;
      :nth-child(odd) {
        color: $--invoice-title-color-10;
      }
      :nth-child(even) {
        color: $--invoice-value-color-10;
      }
      :nth-child(1) {
        width: fit-content;
        margin-right: 20px;
      }
      :nth-child(3) {
        margin: 0 20px;
      }
    }
  }
  @include m(top) {
    div {
      display: flex;
      word-wrap: break-word;
      line-height: 22px;
      :nth-child(odd) {
        letter-spacing: 1px;
        color: $--invoice-title-color-10;
      }
      :nth-child(even) {
        color: $--invoice-value-color-10;
      }
      :nth-child(1) {
        width: fit-content;
        margin-right: 20px;
      }
      :nth-child(3) {
        margin: 0 20px;
      }
    }
    :nth-child(-n + 2) {
      :first-child {
        letter-spacing: 7px;
      }
      :last-child {
        font-size: 16px;
        letter-spacing: 3px;
      }
    }
    :nth-child(3) {
      :nth-child(1) {
        margin-right: 15px;
      }
      :nth-child(3) {
        margin: 0 15px;
      }
    }
    div:nth-child(n + 3) {
      :first-child {
        letter-spacing: 1px;
        min-width: fit-content;
        display: inline-block;
      }
      :nth-child(even) {
        font-size: 11px !important;
      }
    }
    div:nth-child(4) {
      min-height: 37px;
    }
    div:nth-child(7) {
      min-height: 37px;
    }
    div:last-child {
      margin-bottom: 5px;
    }
  }
  @include m(feature) {
    min-height: 154px;
    :first-child {
      p {
        color: $--invoice-title-color-10;
      }
    }
  }
  @include m(list) {
    display: flex;
    p {
      font-size: 12px !important;
    }
    :nth-child(1) {
      width: 114px;
    }
    :nth-child(2) {
      width: 55px;
    }
    :nth-child(3) {
      width: 76px;
    }
    :nth-child(4) {
      width: 15%;
    }
  }
  @include m(feature-item) {
    display: flex;
    p {
      font-size: 11px !important;
      height: fit-content;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-all;
      white-space: nowrap;
      padding-right: 2px;
    }
  }
  @include m(bottom) {
    // margin-bottom: 68px;
    :first-child {
      :last-child {
        font-size: 11px;
      }
    }
    p {
      display: flex;
      align-items: center;
      margin-bottom: 5px;
      :last-child {
        font-size: 16px;
      }
    }
    p:nth-child(2) {
      :last-child {
        letter-spacing: 2px;
      }
    }
  }
}

@include b(invoice-motor) {
  color: $--invoice-title-color-03;
  position: relative;
  table {
    width: 100%;
    border-collapse: collapse;
    padding: 2px;
    border-bottom: 1px solid $--invoice-title-color-03;
  }
  tr {
    border: 1px solid $--invoice-title-color-03;
    border-bottom: none;
    td:nth-child(1) {
      padding: 0 6px;
      text-align-last: justify;
      text-align: justify;
      border-left: none;
    }
  }
  td {
    min-height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 4px;
    border-left: 1px solid $--invoice-title-color-03;
  }
  td:nth-child(odd) {
    text-align: center;
    color: $--invoice-title-color-03;
  }
  td:nth-child(even) {
    color: $--invoice-value-color-03;
  }
}
@include b(invoice-motor-header) {
  height: 80px;
  position: relative;
  display: flex;
  header {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
  }
  article {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 4px;
    section {
      margin-bottom: 14px;
      line-height: 18px;
    }
    div {
      span:nth-child(odd) {
        color: $--invoice-title-color-03;
      }
      span:nth-child(even) {
        color: $--invoice-value-color-03;
      }
    }
  }
  @include m(title) {
    margin-bottom: 10px;
    font-size: 18px !important;
    letter-spacing: 14px;
  }
  @include m(sub-title) {
    font-size: 18px !important;
    font-weight: bold;
    letter-spacing: 24px;
  }
}
@include b(invoice-motor-msg) {
  @include m(row) {
    display: flex;
  }
  @include m(row1) {
    height: 74px;
  }
  @include m(row1_1) {
    width: 12%;
    span {
      width: 100%;
      display: inline-block;
      line-height: 18px;
    }
  }
  @include m(row1_2) {
    width: 33%;
    span {
      width: 100%;
      display: inline-block;
      min-height: 18px;
      line-height: 18px;
      font-size: 13px;
    }
  }
  @include m(row1_3) {
    width: 3%;
    span {
      line-height: 18px;
    }
  }
  @include m(row1_4) {
    width: 52%;
    span {
      line-height: 13px;
      letter-spacing: 0.2rem;
    }
  }
  @include m(row2_1) {
    width: 12%;
    span {
      width: 100%;
      display: inline-block;
    }
  }
  @include m(row2_2) {
    width: 36%;
    span {
      line-height: 18px;
    }
  }
  @include m(row2_3) {
    width: 17%;
  }
  @include m(row2_4) {
    width: 34%;
    font-size: 13px;
  }
  @include m(row3_1) {
    width: 12%;
  }
  @include m(row3_2) {
    width: 24%;
  }
  @include m(row3_3) {
    width: 9%;
  }
  @include m(row3_4) {
    width: 35%;
  }
  @include m(row3_5) {
    width: 5%;
  }
  @include m(row3_6) {
    width: 15%;
  }
  @include m(row4_1) {
    width: 12%;
  }
  @include m(row4_2) {
    width: 24%;
  }
  @include m(row4_3) {
    width: 12%;
  }
  @include m(row4_4) {
    width: 28%;
  }
  @include m(row4_5) {
    width: 9%;
  }
  @include m(row4_6) {
    width: 15%;
  }
  @include m(row5_1) {
    width: 12%;
  }
  @include m(row5_2) {
    width: 36%;
  }
  @include m(row5_3) {
    width: 20%;
  }
  @include m(row5_4) {
    width: 32%;
  }
  @include m(row6_1) {
    width: 12%;
  }
  @include m(row6_2) {
    width: 63%;
  }
  @include m(row6_3) {
    width: 6%;
    border-left: none !important;
  }
  @include m(row6_4) {
    width: 19%;
    border-left: none !important;
    span {
      font-size: 14px;
    }
  }
  @include m(row7_1) {
    width: 12%;
  }
  @include m(row7_2) {
    width: 53%;
  }
  @include m(row7_3) {
    width: 6%;
  }
  @include m(row7_4) {
    width: 29%;
  }
  @include m(row8_1) {
    width: 12%;
  }
  @include m(row8_2) {
    width: 53%;
    font-size: 13px;
  }
  @include m(row8_3) {
    width: 6%;
  }
  @include m(row8_4) {
    width: 29%;
  }
  @include m(row9_1) {
    width: 12%;
  }
  @include m(row9_2) {
    width: 41%;
  }
  @include m(row9_3) {
    width: 9%;
  }
  @include m(row9_4) {
    width: 38%;
  }
  @include m(row10) {
    td:nth-child(odd) {
      span {
        line-height: 18px;
      }
    }
  }
  @include m(row10_1) {
    width: 12%;
  }
  @include m(row10_2) {
    width: 11%;
    font-size: 13px;
  }
  @include m(row10_3) {
    width: 8%;
    @include row-justify();
  }
  @include m(row10_4) {
    width: 24%;
    span {
      font-size: 14px;
    }
  }
  @include m(row10_5) {
    width: 12%;
    @include row-justify();
  }
  @include m(row10_6) {
    width: 33%;
    :nth-child(1) {
      transform: scale(0.85);
      margin-left: -7.5%;
    }
  }
  @include m(row11) {
    td:nth-child(odd) {
      text-align: left;
      color: $--invoice-value-color-03;
    }
    td:nth-child(even) {
      text-align: center;
      color: $--invoice-title-color-03;
    }
  }
  @include m(row11_1) {
    width: 12%;
    color: $--invoice-title-color-03 !important;
  }
  @include m(row11_2) {
    width: 6%;
  }
  @include m(row11_3) {
    width: 18%;
    border-left: none !important;
    text-align: left !important;
    span {
      font-size: 14px;
    }
  }
  @include m(row11_4) {
    width: 12%;
  }
  @include m(row11_5) {
    width: 26%;
  }
  @include m(row11_6) {
    width: 6%;
  }
  @include m(row11_7) {
    width: 5%;
  }
  @include m(row11_8) {
    width: 9%;
  }
  @include m(row11_9) {
    width: 6%;
  }
}
@include b(invoice-motor-side) {
  position: absolute;
  right: -16px;
  bottom: 26px;
  writing-mode: vertical-lr;
  :nth-child(2) {
    letter-spacing: 10px;
    margin-top: 18px;
  }
  :nth-child(4) {
    margin-top: 54px;
  }
}
@include b(invoice-motor-footer) {
  width: 100%;
  display: flex;
  padding: 4px;
  div {
    span:nth-child(odd) {
      color: $--invoice-title-color-03;
    }
    span:nth-child(even) {
      color: $--invoice-value-color-03;
    }
  }
  div:nth-child(1) {
    width: 41%;
  }
  div:nth-child(2) {
    width: 36%;
  }
}

@include b(invoice-used) {
  color: $--invoice-title-color-10;
  position: relative;
  table {
    width: 100%;
    border-collapse: collapse;
    padding: 2px;
    border-bottom: 1px solid $--invoice-title-color-10;
  }
  tr {
    border: 1px solid $--invoice-title-color-10;
    border-bottom: none;
    td:nth-child(1) {
      padding: 0 10px;
      text-align-last: justify;
      text-align: justify;
      border-left: none;
    }
  }
  td {
    min-height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 4px;
    border-left: 1px solid $--invoice-title-color-10;
  }
  td:nth-child(odd) {
    text-align: center;
    color: $--invoice-title-color-10;
  }
  td:nth-child(even) {
    color: $--invoice-value-color-03;
  }
}
@include b(invoice-used-header) {
  height: 80px;
  position: relative;
  display: flex;
  header {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
  }
  article {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 4px;
    section {
      margin-bottom: 14px;
      line-height: 18px;
    }
    div {
      span:nth-child(odd) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(even) {
        color: $--invoice-value-color-03;
      }
    }
  }
  @include m(title) {
    margin-bottom: 10px;
    font-size: 20px !important;
    letter-spacing: 14px;
  }
  @include m(sub-title) {
    font-size: 20px !important;
    font-weight: 500;
    letter-spacing: 24px;
  }
}
@include b(invoice-used-msg) {
  @include m(row) {
    display: flex;
  }
  @include m(row1) {
    height: 74px;
  }
  @include m(row1_1) {
    width: 11%;
    span {
      width: 100%;
      display: inline-block;
      line-height: 18px;
    }
  }
  @include m(row1_2) {
    width: 34%;
    span {
      width: 100%;
      display: inline-block;
      min-height: 18px;
      line-height: 18px;
      font-size: 13px;
    }
  }
  @include m(row1_3) {
    width: 3%;
    span {
      line-height: 18px;
    }
  }
  @include m(row1_4) {
    width: 52%;
    span {
      line-height: 13px;
      letter-spacing: 0.2rem;
    }
  }
  @include m(row2_1) {
    width: 19%;
    span {
      width: 100%;
      display: inline-block;
    }
  }
  @include m(row2_2) {
    width: 32%;
    span {
      line-height: 18px;
    }
  }
  @include m(row2_3) {
    width: 20%;
  }
  @include m(row2_4) {
    width: 29%;
    font-size: 13px;
  }
  @include m(row3_1) {
    width: 19%;
  }
  @include m(row3_2) {
    width: 52%;
  }
  @include m(row3_3) {
    width: 6%;
  }
  @include m(row3_4) {
    width: 23%;
  }
  @include m(row4_1) {
    width: 19%;
  }
  @include m(row4_2) {
    width: 32%;
  }
  @include m(row4_3) {
    width: 20%;
  }
  @include m(row4_4) {
    width: 29%;
  }
  @include m(row5_1) {
    width: 19%;
  }
  @include m(row5_2) {
    width: 52%;
  }
  @include m(row5_3) {
    width: 6%;
  }
  @include m(row5_4) {
    width: 23%;
  }
  @include m(row6_1) {
    width: 19%;
  }
  @include m(row6_2) {
    width: 20%;
  }
  @include m(row6_3) {
    width: 8%;
    @include row-justify();
  }
  @include m(row6_4) {
    width: 20%;
  }
  @include m(row6_5) {
    width: 10%;
    @include row-justify();
  }
  @include m(row6_6) {
    width: 23%;
  }
  @include m(row7_1) {
    width: 19%;
  }
  @include m(row7_2) {
    width: 20%;
  }
  @include m(row7_3) {
    width: 8%;
    @include row-justify();
  }
  @include m(row7_4) {
    width: 20%;
  }
  @include m(row7_5) {
    width: 10%;
    @include row-justify();
  }
  @include m(row7_6) {
    width: 23%;
  }
  @include m(row8_1) {
    width: 19%;
  }
  @include m(row8_2) {
    width: 52%;
  }
  @include m(row8_3) {
    width: 6%;
  }
  @include m(row8_4) {
    width: 23%;
  }
  @include m(row9_1) {
    width: 19%;
  }
  @include m(row9_2) {
    width: 81%;
  }
  @include m(row10_1) {
    width: 19%;
  }
  @include m(row10_2) {
    width: 44%;
    font-size: 13px;
  }
  @include m(row10_3) {
    width: 8%;
    @include row-justify();
  }
  @include m(row10_4) {
    width: 29%;
  }
  @include m(row11_1) {
    width: 19%;
  }
  @include m(row11_2) {
    width: 58%;
  }
  @include m(row11_3) {
    width: 6%;
  }
  @include m(row11_4) {
    width: 17%;
  }
  @include m(row12_1) {
    width: 19%;
  }
  @include m(row12_2) {
    width: 32%;
  }
  @include m(row12_3) {
    width: 8%;
    padding: 0 !important;
    @include row-justify();
    span {
      padding: 0 4px !important;
    }
    span:nth-child(3) {
      line-height: 32px;
      border-top: 1px solid $--invoice-title-color-10;
    }
  }
  @include m(row12_4) {
    width: 41%;
    padding: 0 !important;
    span {
      line-height: 32px;
      padding: 0 4px !important;
    }
    span:nth-child(1) {
      border-bottom: 1px solid $--invoice-title-color-10;
    }
  }
  @include m(row13_1) {
    width: 19%;
  }
  @include m(row13_2) {
    width: 56%;
    span {
      width: 110%;
      transform: scale(0.9);
      margin-left: -5.5%;
    }
  }
  @include m(row13_3) {
    width: 6%;
  }
  @include m(row13_4) {
    width: 17%;
  }
  @include m(row14_1) {
    width: 12%;
  }
  @include m(row14_2) {
    width: 88%;
    border-left: none !important;
  }
}
@include b(invoice-used-side) {
  position: absolute;
  right: -16px;
  top: 171px;
  writing-mode: vertical-lr;
  :nth-child(2) {
    letter-spacing: 20px;
    margin-top: 26px;
  }
}
@include b(invoice-used-footer) {
  width: 100%;
  display: flex;
  padding: 4px;
  div {
    span:nth-child(odd) {
      color: $--invoice-title-color-10;
    }
    span:nth-child(even) {
      color: $--invoice-value-color-03;
    }
  }
  div:nth-child(1) {
    width: 58%;
  }
  div:nth-child(2) {
    width: 35%;
  }
}

@include b(invoice-air) {
  color: $--invoice-title-color-10;
  position: relative;
  table {
    width: 100%;
    padding: 2px;
  }
  tr {
    min-height: 32px;
    border: 1px solid $--invoice-title-color-10;
    &:nth-last-child(-n + 3) {
      height: 38px;
      line-height: 38px;
    }
    // 排除第2行和最后1行，其他行取消 border-bottom
    &:not(:nth-child(2)):not(:last-child) {
      border-bottom: none;
    }
    // 排除最后3行的td
    &:not(:nth-last-child(-n + 3)) {
      td {
        display: flex;
        flex-direction: column;
        border-left: 1px solid $--invoice-title-color-10;
      }
    }
    td:nth-child(1) {
      padding: 0 10px;
      border-left: none;
    }
  }
  td {
    padding: 0 4px;
    box-sizing: border-box;
    span {
      &:nth-child(odd) {
        color: $--invoice-title-color-10;
      }
      &:nth-child(even) {
        color: $--invoice-value-color-03;
      }
    }
  }
}
@include b(invoice-air-qrcode) {
  width: 50px;
  height: 50px;
  position: absolute;
  left: -60px;
  bottom: 12px;
}
@include b(invoice-air-header) {
  height: 86px;
  position: relative;
  display: flex;
  header {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
  }
  article {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 4px;
    section {
      position: relative;
      line-height: 36px;
      margin-bottom: -14px;
    }
    div {
      span:nth-child(odd) {
        color: $--invoice-title-color-10;
      }
      span:nth-child(even) {
        color: $--invoice-value-color-03;
      }
    }
  }
  @include m(title) {
    margin-bottom: 10px;
    font-size: 20px !important;
  }
}
@include b(invoice-air-msg) {
  @include m(row) {
    display: flex;
  }
  @include m(row1) {
    height: 70px;
    td {
      line-height: 24px;
    }
  }
  @include m(row2) {
    line-height: 32px;
    text-align: center;
    letter-spacing: -1px;
  }
  @include m(row3) {
    line-height: 28px;
    letter-spacing: -0.6px;
    td:not(:nth-child(1)) {
      text-align: center;
      color: $--invoice-value-color-03;
    }
    border-top: none !important;
  }
  @include m(row4) {
    height: 38px;
    letter-spacing: -1px;
    border-top: none !important;
    td:not(:nth-child(1)) {
      border-top: 1px solid $--invoice-title-color-10;
    }
    span:nth-child(2) {
      margin-top: 6px;
      text-align: center;
    }
  }
  @include m(btn) {
    width: fit-content;
    height: fit-content;
    line-height: 16px;
    padding: 5px 24px;
    box-sizing: border-box;
    border-radius: 2px;
    color: #fff !important;
    cursor: pointer;
    background-color: $--invoice-title-color-10;
  }

  @include m(row1_1) {
    width: 25%;
  }
  @include m(row1_2) {
    width: 33%;
  }
  @include m(row1_3) {
    width: 42%;
  }

  @include m(row2_1) {
    width: 21%;
  }
  @include m(row2_2) {
    width: 7%;
  }
  @include m(row2_3) {
    width: 8%;
  }
  @include m(row2_4) {
    width: 7.5%;
  }
  @include m(row2_5) {
    width: 8.5%;
  }
  @include m(row2_6) {
    width: 7%;
  }
  @include m(row2_7) {
    width: 14%;
  }
  @include m(row2_8) {
    width: 10%;
  }
  @include m(row2_9) {
    width: 10%;
  }
  @include m(row2_10) {
    width: 7%;
  }

  @include m(row3_1) {
    width: 21%;
  }
  @include m(row3_2) {
    width: 7%;
  }
  @include m(row3_3) {
    width: 8%;
  }
  @include m(row3_4) {
    width: 7.5%;
  }
  @include m(row3_5) {
    width: 8.5%;
  }
  @include m(row3_6) {
    width: 7%;
  }
  @include m(row3_7) {
    width: 14%;
  }
  @include m(row3_8) {
    width: 10%;
  }
  @include m(row3_9) {
    width: 10%;
  }
  @include m(row3_10) {
    width: 7%;
  }

  @include m(row4_1) {
    width: 21%;
  }
  @include m(row4_2) {
    width: 12%;
  }
  @include m(row4_3) {
    width: 10.5%;
  }
  @include m(row4_4) {
    width: 8.5%;
  }
  @include m(row4_5) {
    width: 9.5%;
  }
  @include m(row4_6) {
    width: 10.5%;
  }
  @include m(row4_7) {
    width: 11%;
  }
  @include m(row4_8) {
    width: 17%;
  }

  @include m(row5_1) {
    width: 32%;
    letter-spacing: -0.8px;
  }
  @include m(row5_2) {
    width: 16%;
  }
  @include m(row5_3) {
    width: 35%;
  }
  @include m(row5_4) {
    width: 17%;
    border-left: 1px solid $--invoice-title-color-10;
  }

  @include m(row6_1) {
    width: 32%;
    letter-spacing: -0.8px;
  }
  @include m(row6_2) {
    width: 49%;
  }
  @include m(row6_3) {
    width: 19%;
  }

  @include m(row7_1) {
    width: 51.5%;
  }
  @include m(row7_2) {
    width: 48.5%;
  }
}

@include b(invoice-railway) {
  position: relative;
  padding-top: 12px;
  color: $--invoice-value-color-03;
  background-color: #dcf1f6;
  span {
    font-size: 15px !important;
  }
}
@include b(invoice-railway-qrcode) {
  width: 76px;
  height: 76px;
  position: absolute;
  top: 50%;
  right: 50px;
  transform: translateY(-50%);
}
@include b(invoice-railway-header) {
  position: relative;
  text-align: center;
  header {
    margin-bottom: 20px;
    font-size: 22px;
    letter-spacing: 2px;
    font-weight: 500;
  }
  article {
    width: 100%;
    padding: 0 30px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
  }
}
@include b(invoice-railway-msg) {
  padding: 0 30px;
  @include m(row) {
    width: 100%;
    display: flex;
  }
  @include m(row1) {
    margin: 26px 0 10px 0;
    strong {
      letter-spacing: 2px;
      font-size: 22px !important;
      font-weight: 600;
    }
  }
  @include m(row2) {
    margin-bottom: 20px;
    span {
      font-size: 15px !important;
      font-weight: 600;
    }
  }
  @include m(row3) {
    margin-bottom: 20px;
  }
  @include m(row4) {
    margin-bottom: 20px;
  }
  @include m(row5) {
    margin-bottom: 20px;
  }
  @include m(row6) {
    margin-bottom: 54px;
  }
  @include m(row7) {
    margin-bottom: 8px;
  }

  @include m(row1_1) {
    width: calc(30% + 15px);
    text-align: right;
    strong {
    }
  }
  @include m(row1_2) {
    width: calc(40% - 15px);
    text-align: center;
    span {
      font-size: 15px !important;
      font-weight: 400;
      position: relative;
      display: inline-block;

      &::after {
        content: '';
        position: absolute;
        left: -50%;
        bottom: -100%;
        width: 80px;
        height: 2px;
        background-color: $--invoice-value-color-03;
      }
      &::before {
        text-align: right;
        content: '';
        position: absolute;
        right: calc(-100% + 16px);
        bottom: -100%;
        width: 0;
        height: 0;
        border-top: 6px solid transparent;
        border-bottom: 0px solid transparent;
        border-left: 16px solid $--invoice-value-color-03;
      }
    }
  }
  @include m(row1_3) {
  }
  @include m(row2_1) {
    width: 30%;
    text-align: right;
  }
  @include m(row2_2) {
    width: 40%;
  }

  @include m(row2_3) {
    width: 30%;
    text-align: left;
    margin-left: -15px;
  }

  @include m(row3_1) {
    width: 18%;
  }
  @include m(row3_2) {
    width: 17%;
  }
  @include m(row3_3) {
    width: 16%;
  }
  @include m(row4_1) {
    width: 35%;
    div {
      display: inline-block;
      font-size: 22px;
      font-weight: 400px !important;
    }
  }
  @include m(row4_2) {
    width: 16%;
  }
  @include m(row4_3) {
  }
  @include m(row5_1) {
    width: 35%;
  }
  @include m(row5_2) {
    width: 16%;
  }
  @include m(row5_3) {
  }
  @include m(row6_1) {
    width: 42%;
  }
  @include m(row6_2) {
    width: 10%;
  }
  @include m(row6_3) {
    width: 6%;
  }
  @include m(row6_4) {
    width: 42%;
  }
  @include m(row7_1) {
  }
}
@include b(invoice-railway-footer) {
  padding: 10px 30px;
  background-color: #a2dce8;
  @include m(row1) {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
  }
  @include m(row2) {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px dashed $--invoice-value-color-03;
    span {
      font-size: 15px;
    }
  }
}

@include b(invoice-railway-cover) {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
}
