/* 公有云全局新版样式 */
@import '../../../../yylib2/style/themes/gyy/base.less';
@import '../../../../yylib2/style/themes/gyy/mixin.less';
@import "./iconfont.less";

/* 新列表组件 */
@gray: #CCC;
@red: #F83F3F;
@blue: #3183FD;
@green: #60CC63;
@yellow: #FF9320;
@white: #fff;

@error-color: #f50;

/****顶部搜索栏区域样式****/
.yyui-ijz-header {
  position: relative;
  width: 100% !important;
  background-color: @white !important;
  text-align: center;
  margin-bottom: @layout_row_padding !important;
  padding: 9px 30px 13px 30px;
  height: auto;

  .ijz-left-bar {
    position: absolute;
    left: 30px;

    .ijz-caption {
      float: left;
      margin-top: 10px;
      margin-right: 10px;
      font-size: 18px;
      font-weight: 600;
      color: #333;
    }

    .yyui-breadcrumb {
      float: left;
      display: inline-block;
      margin-top: 3px;
      font-size: 14px;
      background-color: #fff !important;

      &.ant-breadcrumb > span {
        a {
          color: #999;
        }

        &:last-child {
          color: #333;
        }
      }
    }
  }

  .ijz-input-search {
    display: inline-flex;
    margin: 0 15px;
    height: 32px;
    top: 4px;
    width: 600px;

    .yyui-input .ant-input:hover,
    .yyui-input .ant-input:focus {
      border-color: @theme_color;
    }
  }
}

/*****筛选区域样式******/
.yyui-ijz-filter {
  background-color: @white;
  width: @content_width;
  margin: 0 auto @layout_row_padding auto;
  font-size: 12px;
  //当前筛选
  .ijz-filter-selected {
    position: relative;
    padding: 7px 20px;

    > span {
      padding: 4px 6px;
      line-height: 24px;
      vertical-align: middle;
    }

    .yyui-tag {
      .ant-tag {
        line-height: 20px;

        &:hover {
          background-color: @white;
          border-color: @red;
          color: @red;

          .anticon-cross {
            color: @red;
          }
        }

        &.not-close {
          cursor: default;
        }
      }
    }

    .ijz-filter-showbtn {
      position: absolute;
      right: 21px;
      width: 100px;
      height: 28px;
    }

    &:after {
      content: '';
      position: absolute;
      left: 20px;
      right: 20px;
      bottom: -1px;
      height: 1px;
      background-color: #F2F3F7;
    }
  }

  //筛选条件行
  .yyui-filter-line {
    min-height: 34px;
    margin: auto 20px;
    padding: 6px 0;
    border-top: 1px dashed #F2F3F7;
    border-bottom: none;

    span {
      line-height: 20px;
      white-space: nowrap;
    }

    & > .ant-col-3 {
      color: #333;

      &:first-child {
        width: 7.67%;

        & + .ant-col-18 {
          width: 79.83%;
        }
      }
    }

    .ant-col-18 {
      color: #666;
    }

    .yyui-filter-item {
      display: inline-block;
      min-width: 66px;

      &.actived {
        padding: 0 8px;
        border-radius: @border_radius;
        color: @red;
        line-height: 18px;
        border: 1px solid @red;
        background: @white;
      }
    }

  }

}

/***列表视图布局****/
.ijz-listview-layout {
  width: @content_width;
  margin: 0 auto;
  //列表内部按钮
  .yyui-button.ant-btn {
    padding: 2px 10px;
    margin-left: 6px;
    min-width: 50px;
    min-height: 24px;
  }

  .yyui-dropdownbutton.ant-btn-group {

    button:nth-child(1) {
      padding: 2px 10px;
      min-width: 50px;
      min-height: 24px;
    }

    button:nth-child(2) {
      padding: 2px 6px;
      min-height: 24px;
    }
  }

  //顶部-排序区域
  .ijz-listview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto @layout_row_padding auto;
    padding: 6px 20px;
    background-color: #fff;
    /***操作按钮****/

    .ijz-listview-buttons {
      .batch-button {
        margin-left: 0;
        margin-right: 10px;
      }
    }

    /***排序条件组****/

    .ijz-listview-order {
      flex: 1;
      text-align: center;
      //排序按钮组
      .yyui-radiobutton {
        &:hover {
          color: @theme_color;
        }

        &.ant-radio-button-wrapper {
          height: 24px;
          line-height: 22px;
          font-size: 12px;

          &:first-child {
            border-radius: @border_radius 0 0 @border_radius;
          }

          &:last-child {
            border-radius: 0 @border_radius @border_radius 0;
          }
        }

        &.ant-radio-button-wrapper-checked {
          background: #fff;
          border-color: @theme_color;
          color: @theme_color;
          box-shadow: -1px 0 0 0 @theme_color;
        }
      }
    }
  }

  //中部-数据区域
  .ijz-listview-center {
    font-size: 14px;
    color: #999;
    background-color: #f6f6f6;
    /**行区域*/

    .ijz-listview-table-row {
      position: relative;
    }

    /**行勾选框**/

    .ijz-listview-table-row-checkbox {
      position: absolute;
      top: 10px;
      left: 20px;
    }
  }

  /***底部-分页区域***/

  .ijz-listview-footer {
    padding: 21px 15px 10px;
    text-align: right;
    .gyy_pagination;

    .ant-pagination {
      display: inline-block;
    }
  }


  /****列表行内样式*****/

  .ijz-listitem-box {
    margin-top: 8px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: @white;
    //链接的文本
    a {
      color: @link_color;
      border-bottom: 1px dashed @link_color;
    }

    //背景颜色
    .bg-gray {
      border-color: @gray;
      color: @gray;
    }

    .bg-blue {
      border-color: @blue;
      color: @blue;
    }

    .bg-green {
      border-color: @green;
      color: @green;
    }

    .bg-yellow {
      border-color: @yellow;
      color: @yellow;
    }

    .bg-red {
      border-color: @red;
      color: @red;
    }

    //文本颜色
    .text-gray {
      color: @gray;
    }

    .text-blue {
      color: @blue;
    }

    .text-green {
      color: @green;
    }

    .text-yellow {
      color: @yellow;
    }

    .text-red {
      color: @red;
    }

    .label-group {
      display: inline-block;

      & > span {
        display: inline-block;

        &:first-child {
          margin-right: 5px;
          color: #999;
          font-size: 12px;
          line-height: 21px;
          vertical-align: middle;
        }

        &:last-child {
          color: #333;
          font-size: 14px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          vertical-align: middle;
        }
      }

    }

    .ijz-listitem-header:before,
    .ijz-listitem-footer:before,
    .ijz-listitem-header:after,
    .ijz-listitem-footer:after {
      content: '';
      display: block;
      clear: both;
    }

    //行-主内容
    .ijz-listitem-header {
      padding-top: 8px;
      padding-bottom: 8px;
      display: flex;

      .ijz-listitem-header-left {
        flex-grow: 1;
      }

      .ijz-listitem-header-right {

      }

      //主名称
      .label-name {
        display: inline-block;
        margin-right: 10px;
        font-size: 14px;
        color: #333;
        font-weight: 600;
        max-width: 245px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;

        &.row-editing {
          margin-left: 30px;
        }
      }

      //次编码
      .label-code {
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 145px;
        vertical-align: middle;
        font-size: 12px;
      }

      //附加描述
      .label-desc {
        margin-left: 10px;
        color: #FF9320;
        font-size: 12px;
      }

      .label-group {
        margin-left: 30px;
        //金额数字
        .label-number {
          font-weight: 600;
        }
      }
    }

    //行-数据内容
    .ijz-listitem-content {
      padding-top: 8px;
      padding-bottom: 8px;
      border-top: 1px solid #F2F3F7;
      border-bottom: 1px solid #F2F3F7;

      .ijz-listitem-row {
        display: flex;
        align-items: center;

        .label-group {
          flex: 1;
          padding: 3px 0;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;

          > span {
            &:first-child {
              min-width: 100px;
              text-align: right;
            }
          }

          &:last-child {
            text-align: right;
          }

          &:first-child {
            > span {
              &:first-child {
                min-width: 0;
              }
            }

            text-align: left;
          }
        }
      }
    }

    //行-底部内容
    .ijz-listitem-footer {
      padding-top: 6px;
      padding-bottom: 6px;
      display: flex;

      .pull-left {
        float: none;
        flex: 1;
      }

      .pull-right {
        float: none;
      }

      //状态标识
      .label-status {
        display: inline-block;
        height: 20px;
        margin-right: 10px;
        padding: 0 10px;
        line-height: 18px;
        font-size: 12px;
        border-style: solid;
        border-width: 1px;
        border-radius: 100px;
        vertical-align: -1px;
      }
    }
  }

  .ijz-listitem {
    margin-top: 8px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: @white;

    .ijz-listitem-header {
      padding-top: 8px;
      padding-bottom: 8px;
      display: flex;

      &-left {
        flex: 1;

        &.batchMode {
          margin-left: 25px;
        }
      }

      .label {
        display: inline-block;
        overflow: hidden;
        margin-right: 10px;
        font-size: 14px;
        color: #333;
        font-weight: 400;
        max-width: 245px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
      }

      .label-item {
        display: inline-block;
        overflow: hidden;
        margin-right: 10px;
        font-size: 14px;
        font-weight: 400;
        max-width: 245px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;

        span:first-child {
          &:after {
            content: '：';
          }
        }

        span:last-child {
          color: #333333;
        }
      }

      .hyperlink {
        display: inline-block;
        overflow: hidden;
        margin-right: 10px;
        white-space: nowrap;
        text-overflow: ellipsis;
        border-bottom: 1px dashed @link_color;
        max-width: 180px;
        vertical-align: middle;
        font-size: 14px;
      }
    }

    .ijz-listitem-content {
      padding-top: 8px;
      padding-bottom: 8px;
      border-top: 1px solid #F2F3F7;
      border-bottom: 1px solid #F2F3F7;

      .yyui-col {
        padding-top: 4px;
        padding-bottom: 4px;
        text-align: center;
      }

      .yyui-col:first-child {
        text-align: left;
      }

      .yyui-col:last-child {
        text-align: right;
      }

      .label {
        display: inline-block;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        word-break: break-all;
        text-align: right;

        &:after {
          content: '：';
        }
      }

      .item {
        display: inline-block;
        color: #333333;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        word-break: break-all;
        max-width: 200px;
      }

      .label-item {
        display: inline-block;
        overflow: hidden;
        margin-right: 10px;
        font-size: 14px;
        font-weight: 400;
        max-width: 245px;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;

        span:first-child {
          &:after {
            content: '：';
          }
        }

        span:last-child {
          color: #333333;
        }
      }

      .label-item-content {
        display: inline-block;
        overflow: hidden;
        margin-right: 10px;
        font-size: 14px;
        font-weight: 400;
        width: 100%;
        vertical-align: middle;

        .label {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          text-align: right;

          &:after {
            content: ':';
          }
        }

        .data {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          text-align: left;
          color: #333333;
        }
      }
    }

    .ijz-listitem-footer {
      padding-top: 6px;
      padding-bottom: 6px;
      display: flex;

      &-left {
        flex: 1;
      }

      .label-state {
        display: inline-block;
        height: 24px;
        margin-right: 10px;
        padding: 0 10px;
        line-height: 24px;
        font-size: 14px;
        border-style: none;
        border-width: 0;
        border-radius: 12px;
      }

      .button-state {
        height: 28px;
        font-size: 14px;
      }

    }

  }

}

/***顶部工具栏样式***/
.ijz-toolbar {
  display: flex;
  height: 44px;

  &-left {
    display: flex;
    align-items: center;
    flex: 1;
    margin: 0 auto;
    padding: 8px 10px;
    line-height: 30px;
    color: #333333;
    font-weight: 700;
    font-style: normal;
    font-size: 16px;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;

    .yyui-button {
      margin-right: 10px;
      border: none;

      > i {
        font-size: 16px;
        font-weight: bolder;
        -webkit-text-stroke-width: 1.5px;
        margin-right: 5px;
      }
    }
  }

  &-right {
    flex: 4;
    line-height: 44px;
    margin: 0 auto;
    padding: 0 15px;
    // overflow-y: auto;
    text-align: right;

    .yyui-button {
      height: 30px;
      margin: 0 3px;
      padding: 0 10px;
      font-size: 14px;
    }

    .yyui-button-select {
      margin: 0 3px;

      > .ant-btn {
        height: 30px;
        font-size: 14px;
      }
    }

    .ant-dropdown.ant-dropdown-placement-bottomRight {
      height: 30px;
    }
  }

}

/**
高级查询
 */
.ijz-search {
  display: flex;
  margin: 0 auto;
  width: @content_width !important;
  background-color: @white;

  &-hide {
    display: none;
  }

  .yyui-layout-sider {
    .yyui-menu {
      min-height: 200px;
      max-height: 200px;
      border-right: 1px solid #dcdcdc6e;

      &:hover {
        overflow-x: hidden;
        overflow-y: auto;
      }

      &::-webkit-scrollbar {
        width: 6px;
        height: 6px;
      }

      &::-webkit-scrollbar-thumb {
        border-radius: 8px;
        background-color: #cdcdcd;
      }

      &::-webkit-scrollbar-track {
        background: white;
        border-radius: 8px;
      }

      .ant-menu-item-selected {
        background: #eaf8fe;
      }

    }

  }

  .yyui-layout-content {
    .ant-tabs-bar {
      border-bottom: 1px solid #d9d9d9 !important;
    }

    .ant-table-emptyview {
      display: none;
    }

    .ant-table-body {
      overflow-y: hidden;

      &:hover {
        overflow-x: hidden;
        overflow-y: auto;
      }

      &::-webkit-scrollbar {
        width: 6px;
        height: 6px;
      }

      &::-webkit-scrollbar-thumb {
        border-radius: 8px;
        background-color: #cdcdcd;
      }

      &::-webkit-scrollbar-track {
        background: white;
        border-radius: 8px;
      }
    }

    .yyui-table-col-title {
      text-align: center;
    }

    .yyui-button.yyui-ripple {
      margin-left: initial;
    }

    .yyui-table-row-selected {
      background: #f7f7f7 !important;
    }

  }

  .yyui-layout-footer {
    position: relative;
    border-top: 1px solid #dcdcdc6e;
    text-align: right;

    .yyui-button {
      margin: 5px;

      &:nth-child(1), &:nth-child(2) {
        position: absolute;
      }

      &:nth-child(1) {
        left: 5px;
      }

      &:nth-child(2) {
        left: 95px;
      }

    }


  }

  &-modal {
    > span {
      display: inline-block;
      margin: 20px 0 20px 30px;
    }

    > .yyui-input {
      display: inline-block;
    }
  }

  &-scheme {
    .ant-menu-item {
      &:hover {
        .yyui-icon {
          display: inline-block;
        }
      }
    }

    .yyui-icon {
      position: absolute;
      display: none;
      top: 16px;
      right: 16px;
    }
  }
}

//公有云模式
.GYY {
  .cp2-filterbar {
    width: @content_width;
    margin: 0 auto;
    background-color: @white !important;

    .cp2-filterbar-selected {
      .cp2-filterbar-showbtn {
        color: #ec3c38 !important;
        background-color: #fff !important;
        border-color: #ec3c38;
      }
    }

  }

  .ijz-toolbar.card {
    width: @content_width !important;
  }

  .ijz-toolbar.table {
    width: auto !important;
  }

  .ijz-toolbar.form {
    width: auto !important;
  }

  .view-mode-card {
    border: none;
    padding: 0px !important;
    min-height: 24px !important;
    min-width: 24px !important;
    background: url("./card.svg") no-repeat 0 0;
  }

  .view-mode-table {
    border: none;
    padding: 0px !important;
    min-height: 24px !important;
    min-width: 24px !important;
    background: url("./table.svg") no-repeat 0 0;
  }
}

.NCC {
  .view-mode-card {
    border: none;
    height: 24px !important;
    padding: 0px !important;
    min-height: 24px !important;
    min-width: 24px !important;
    background: url("./card.svg") no-repeat 0 0;
  }

  .view-mode-table {
    border: none;
    height: 24px !important;
    padding: 0px !important;
    min-height: 24px !important;
    min-width: 24px !important;
    background: url("./table.svg") no-repeat 0 0;
  }
}

//设计器环境
.dev-design-canvas {
  .ijz-listview-layout {
    .yyui-table-wrapper {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
  }
}

.yyui-table-state-control {

  //input
  .ant-input {
    border-color: @error-color;
    box-shadow: 0 0 0 2px fade(@error-color, 20%);

    &:not([disabled]):hover {
      border-color: @error-color;
    }

    &:not([disabled]):focus {
      border-color: @error-color;
    }
  }

  //select
  .ant-select {
    &-selection, &-selection:hover {
      border-color: @error-color !important;
      box-shadow: 0 0 0 2px fade(@error-color, 20%);
    }

    &-arrow {
      color: @error-color;
    }
  }

  //datepicker
  .ant-calendar-picker-icon:after {
    color: @error-color;
  }

  //timepicker
  .ant-time-picker-picker-icon:after {
    color: @error-color;
  }

  //input-number
  .ant-input-number {
    border-color: @error-color;
    box-shadow: 0 0 0 2px fade(@error-color, 20%);

    &:not([disabled]):hover {
      border-color: @error-color;
    }
  }

  .yyui-inputrefer {
    button, button:hover {
      border-color: @error-color;
      box-shadow: 0 0 0 2px fade(@error-color, 20%);
    }
  }
}
