@import '~view-design/src/styles/index.less';

/**************
    导航栏
**************/
// 导航栏背景
@menu-dark-title: #001529;
@menu-dark-active-bg: #000c17;
@layout-sider-background: #001529;
@primary-color: #2d8cf0;
@blue: #2d8cf0;
@blueA100: #2e3c5a;
@blueA200: #e7f3ff;
@blueA300: #f0f7fd;
@blueA400: #001529;
@garyA100: #f5f5f5;
@garyA200: #666;
@garyA300: #999;
@tableColor: #eee;
@black: #444;

.side-menu-wrapper {
  // 一级菜单 高亮颜色
  .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu),
  .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu) {
    color: #fff;
  }

  .ivu-menu-dark {
    .ivu-menu {
      .ivu-menu-submenu {
        margin-bottom: 0;
      }

      .ivu-menu-submenu-title {
        padding: 8px 24px !important;
      }

      .ivu-menu-submenu-has-parent-submenu {
        padding-left: 51px;
      }

      // 二级菜单
      .ivu-menu-item,
      .ivu-menu-submenu-has-parent-submenu {
        padding: 8px 0 9px 48px !important;
        background: url('../assets/images/menu/menu_line_default.png') 30px 0 no-repeat !important;

        &:hover {
          background: url('../assets/images/menu/menu_line_default.png') 30px 0 no-repeat !important;
        }

        &.ivu-menu-item-active {
          background: url('../assets/images/menu/menu_line_active.png') 30px 0 no-repeat !important;
          border-right: 5px @primary-color solid;

          &:hover {
            background: url('../assets/images/menu/menu_line_active.png') 30px 0 no-repeat !important;
            border-right: 5px @primary-color solid;
          }
        }
      }

      .ivu-menu-submenu-has-parent-submenu {
        padding-left: 31px !important;

        .ivu-menu-submenu-title {
          padding: 0 17px !important;
        }

        &.ivu-menu-child-item-active {
          background: url('../assets/images/menu/menu_line_active.png') 30px 0 no-repeat !important;
          border-right: 0;
        }

        .ivu-menu {
          padding-top: 8px;
        }

        .ivu-menu-item,
        .ivu-menu-item-active:hover {
          background: none !important;
          padding-left: 32px !important;
        }
      }
    }
  }
}

// 导航栏
.menu-collapsed {
  text-align: center;
  padding-top: 0 !important;
}

// 左侧导航收缩
.ivu-layout-sider-collapsed {
  .ivu-dropdown {
    text-align: center;
    line-height: 38px;
    margin: 0px auto;
    color: #515a6e;

    &:hover {
      color: @primary-color;
    }
  }

  .ivu-tooltip {
    line-height: 38px;
  }
}

// 收缩导航栏鼠标经过下拉
.menu-dropdown {
  width: 160px;
  left: 65px !important;
  background: #001529;
  border-radius: 3px;
  color: #fff;

  .ivu-dropdown-item {
    color: #fff;
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    box-sizing: border-box;

    .menu-title {
      // padding:5px 0;
    }

    &:hover {
      background: none;
      border-right: 4px @primary-color solid;
    }
  }
}

/**************
    header
**************/
@layout-header-height: 52px;

//面包屑
.ivu-breadcrumb {
  color: #515a6e;
}

.ivu-breadcrumb-item-separator {
  color: #515a6e;
}


/**************
    table
**************/
@table-thead-bg: #F7F7F9;
@border-color-split: #F7F7F9;
// @border-color-base: #F7F7F9;

.ivu-table {
  height: auto;

  table {
    border-spacing: 0;
    width: 100%;

    tr {
      &.ivu-table-row-hover {
        tr, td {
          animation: tableHover 0.5s;
        }
      }

      th, td {
        border: 1px @tableColor solid;
        border-left: 0;
        border-top: 0;
        text-align: center;

        &.ivu-table-column-left {
          text-align: left;
        }

        &:nth-child(1) {
          border-left: 0;
        }

        .ivu-table-cell {
          padding: 0 8px;
          overflow: inherit;
        }

        .table-line {
          background: @tableColor;
          height: 1px;
          margin: 8px -18px;
        }
      }

      th {
        color: @garyA200;
        background: @garyA100;
        height: 42px;
        font-size: 14px;
        color: #808080;
        text-align: left;
      }

      td {
        font-weight: normal;
        padding: 2px 0;
        height: 32px;
        text-align: left;
        font-size: 12px;
        border-bottom: 1px solid #F7F7F9;

        .ivu-table-cell-with-expand {
          height: 32px;
          line-height: 32px;
        }
      }
    }
  }
}

.ivu-table-body {
  &::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
}

.ivu-card-extra {
  position: absolute;
  right: 8px;
  top: 8px;
}

.ivu-card-head {
  background: #fafafa;
  border-radius: 4px 4px 0 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;

  .ivu-icon {
    color: #666;
  }
}

.ivu-select-dropdown {
  z-index: 10000;

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

.ivu-dropdown-transfer,
.ivu-select-dropdown-transfer {
  position: fixed;
}

.ivu-table-fixed-body {
  overflow: inherit;
}

.ivu-card {
  box-shadow: none !important;
}

// 表单类
.ivu-btn {
  &:focus {
    box-shadow: none;
  }
}

.ivu-spin-fix {
  background-color: rgba(255, 255, 255, 0.3);
}

// 重写字体大小
.ivu-select,
.ivu-select-single .ivu-select-selection .ivu-select-placeholder,
.ivu-select-single .ivu-select-selection .ivu-select-selected-value,
.ivu-select-input,
.ivu-input,
textarea.ivu-input,
.ivu-btn,
.ivu-checkbox-wrapper,
.ivu-form .ivu-form-item-label {
  font-size: 12px;
}

.ivu-btn-large {
  font-size: 14px;
}

.ivu-select-item,
.ivu-dropdown-item {
  font-size: 12px !important;
}

/****自定义样式***/

.search-card .ivu-form-item {
  margin-bottom: 0px !important;
}

.marginRight10 {
  margin-right: 10px !important;
}

.marginLeft10 {
  margin-left: 10px !important;
}

.marginBottom10 {
  margin-bottom: 10px !important;
}

.float-right {
  float: right;
}

.float-left {
  float: left;
}

.error-color {
  color: #ed4014;
}

.smart-query-card .ivu-card-body {
  padding: 10px !important;
}

.smart-query-form-row:not(:first-child) {
  margin-top: 8px;
}

.smart-query-form-row span {
  margin-right: 8px;
}

.smart-query-table-page {
  margin-top: 10px;
}
