@import './../index.scss';

.ebv-gridtables {
  display: flex;
  width: 100%;
  height: 88%;
  flex-direction: column;

  .amosd-table {
    thead {
      tr {
        background: linear-gradient(360deg, white 0%, rgba(243, 243, 243, 1) 100%);
      }
    }

    th {
      height: 30px;
      padding: 0; // !important;
      overflow: hidden;
      border-right: 1px solid $frame-main-bordercolor;
      border-bottom: 0;

      &:last-child {
        border-right: 0;
      }

      .eb-gridtable-header-edit {
        color: rgba(0, 128, 255, 1);
        cursor: pointer;
      }

      .eb-gridtable-datatype-label {
        margin-left: 5px;
        color: rgba(114, 177, 225, 1);
      }

      > div {
        &:first-child {
          display: flex;
          width: 100%;
          height: 100%;
          align-items: center;
          padding: 0 10px; // !important;
          font-size: $frame-third-fontsize;
          color: $frame-fourth-color;
        }

        &:last-child {
          > div {
            display: none;
          }
        }
      }
    }

    tbody {
      tr {
        td {
          height: 30px;
          padding: 0 10px 0 18px;
          font-size: $frame-third-fontsize;
          color: $frame-first-color;
          vertical-align: middle;
          border-top: 0;
          border-right: 0;
          border-bottom: 0;

          &:last-child {
            border-right: 0;
          }
        }
      }
    }
  }

  .eb-gridtable-content {
    width: 100%;
    //height: calc(100% - 80px);
    overflow: auto;
    // border-top: solid 1px #eaeaea;
    flex: 1;

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

    .ant-table-wrapper {
      width: 100%;
      height: 100%;

      .ant-table-row:hover {
        td {
          background-color: $background-color-051c45;
        }
      }

      .ant-table-tbody {
        background: $amos-tabs-header-background;
        tr {
          background: $table-body-td-background;
        }

        tr:hover {
          td {
            background: $pagination-item-background;
          }
        }

        tr:nth-of-type(2n) {
          background: $table-body-td-background;
        }

        tr:hover {
          td {
            background: $pagination-item-background;
          }
        }

        tr:nth-of-type(2n) {
          background: $table-body-td-background;
        }

        tr:hover {
          td {
            background: $pagination-item-background;
          }
        }

        tr:nth-of-type(2n) {
          background: $table-body-td-background;
        }
      }
      .ant-table-header {
        background: $table-header-tr-background;
      }
      tr {
        th {
          height: 30px;
          padding: 0;
          font-size: 13px;
          color: $font-color-black;
          text-align: center;
          background: $table-header-tr-background;
          // border-left: solid 1px #eaeaea;
        }

        td {
          height: 30px;
          padding: 0 10px;
          font-size: 13px;
          color: $font-color-black;
          text-align: center;
          border: 0;
        }

        td.eb-gridtable-td-left {
          text-align: left;
        }

        td.eb-gridtable-td-right {
          text-align: right;
        }

        td.eb-gridtable-td-center {
          text-align: center;
        }
      }

      .ant-table-placeholder {
        color: $font-color-black;;
        background: transparent;
        // border-bottom: none;
        // border: 1px solid red;
      }
    }
  }

  &.eb-gridtable-hidefooter {
    .eb-gridtable-content {
      height: 100%;
    }
  }
}

.eb-datagrid-foot {
  width: 100%;
  height: 80px;
  padding-top: 17px;
  text-align: center;
  // border-top: solid 1px #eaeaea;

  .ant-pagination-options {
    margin-left: 30px;
    vertical-align: top;

    .select-scroll-wrapper {
      width: auto;
      .ant-select {
        .ant-select-selection {
          width: 100%;
          height: 30px;
          font-size: $frame-second-fontsize;
          line-height: 30px;
          // background: $frame-third-color;
          // border: 1px solid $frame-main-bordercolor;
          color: $form-label-font-color;
          background: $amos-form-item-background;
          border: 1px solid $amos-form-item-border;
          border-radius: 6px;

          .ant-select-selection__rendered {
            padding-right: 0;
            padding-left: 0;
            line-height: 28px;
          }

          .ant-select-arrow {
            right: 0.5em;
            font-size: 16px;
            color: $frame-main-color;
          }
        }
      }
    }

    .select-scroll-wrapper .ant-select-dropdown-menu-item {
      color: $font-color-black;
      background: $firecard-menulist-background;
    }

    .select-scroll-wrapper .ant-select-dropdown-menu-item:hover {
      background: $ant-select-drowdown-hover;
    }

    .ant-select {
      height: 100%;

      .ant-select-selection--single {
        height: 100%;
        background: $pagination-item-background;
        color: $font-color-black;
        border: 1px solid $pagination-item-background;
        .ant-select-selection__rendered {
          line-height: 28px;
        }

        .ant-select-selection__choice {
          background: red;
        }
        .ant-select-selection-selected-value {
          color: $font-color-black;
          background: $pagination-item-background;
        }
      }
    }
  }

  .ant-pagination {
    .ant-pagination-total-text {
      margin-right: 33px;
      font-size: 13px;
      color: $font-color-black;
    }

    .ant-pagination-options-quick-jumper {
      height: 28px;
      font-size: 13px;
      line-height: 28px;
      color: $font-color-black;

      input {
        height: 28px;
        font-size: 13px;
        line-height: 28px;
        color: $font-color-black;
        background: $pagination-item-background;
        border: 1px solid $amos-form-item-border;
      }
    }

    > li {
      margin: 0;
      font-size: 13px;
      border-left: 0;
      border-color: $pagination-item-background;
      border-radius: 0;
      background: $pagination-item-background;
      color: $font-color-black;
      cor > a {
        color: #2e5392;
      }

      &.ant-pagination-prev {
        border-left: 1px solid $pagination-item-background;
        border-radius: 6px 0 0 6px;
        > a {
          color: $font-color-black;
        }
      }

      &.ant-pagination-next {
        border-radius: 0 6px 6px 0;
        > a {
          color: $font-color-black;
        }
      }

      &.ant-pagination-item {
        border-color: $pagination-item-background;
        &.ant-pagination-item-active {
          background: #2e5392;
          border-color: #2e5392;

          > a {
            color: white;
          }
        }

        > a {
          color: $font-color-black;
        }
      }
      &.ant-pagination-jump-next {
        background: $pagination-item-background;
        border-color: $amos-form-item-border;

        > a {
          color: $font-color-black;
        }
        &.ant-pagination-jump-next:after {
          color: $font-color-black;
        }
      }
    }
  }
}
