@charset "UTF-8";
@import "./select.css";
@import "./common/var.css";

@component-namespace el {
  @b pagination {
    white-space: nowrap;
    padding: 2px 5px;
    color: var(--pagination-color);
    @utils-clearfix;

    span,
    button {
      display: inline-block;
      font-size: var(--pagination-font-size);
      min-width: var(--pagination-button-size);
      height: var(--pagination-button-size);
      line-height: var(--pagination-button-size);
      vertical-align: top;
      box-sizing: border-box;
    }

    .el-select .el-input {
      width: 110px;
      input {
        padding-right: 25px;
        border-radius: var(--border-radius-small);
        height: 28px;
      }
    }

    button {
      border: none;
      padding: 0 6px;
      background: transparent;

      &:focus {
        outline: none;
      }

      &:hover {
        color: var(--pagination-hover-fill);
      }

      &.disabled {
        color: var(--pagination-button-disabled-color);
        background-color: var(--pagination-button-disabled-fill);
        cursor: not-allowed;
      }
    }

    .btn-prev,
    .btn-next {
      background: center center no-repeat;
      background-size: 16px;
      background-color: var(--pagination-fill);
      border: 1px solid var(--pagination-border-color);
      cursor: pointer;
      margin: 0;
      color: var(--pagination-button-color);

      .el-icon {
        display: block;
        font-size: 12px;
      }
    }

    .btn-prev {
      border-radius: var(--pagination-border-radius) 0 0 var(--pagination-border-radius);
      border-right: 0;
    }

    .btn-next {
      border-radius: 0 var(--pagination-border-radius) var(--pagination-border-radius) 0;
      border-left: 0;
    }

    @m small {
      .btn-prev,
      .btn-next,
      .el-pager li,
      .el-pager li:last-child {
        border-color: transparent;
        font-size: 12px;
        line-height: 22px;
        height: 22px;
        min-width: 22px;
      }

      .arrow.disabled {
        visibility: hidden;
      }

      .el-pager li {
        border-radius: var(--pagination-border-radius);
      }
    }

    @e sizes {
      margin: 0 10px 0 0;

      .el-input .el-input__inner {
        font-size: 13px;
        border-color: var(--pagination-border-color);

        &:hover {
          border-color: var(--pagination-hover-fill);
        }
      }
    }

    @e jump {
      margin-left: 10px;
    }

    @e total {
      margin: 0 10px;
    }

    @e rightwrapper {
      float: right;
    }

    @e editor {
      border: 1px solid var(--pagination-border-color);
      border-radius: var(--pagination-border-radius);
      line-height: 18px;
      padding: 4px 2px;
      width: 30px;
      text-align: center;
      margin: 0 6px;
      box-sizing: border-box;
      transition: border .3s;

      &::-webkit-inner-spin-button,
      &::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }

      &:focus {
        outline: none;
        border-color: var(--pagination-hover-fill);
      };
    }
  }

  @b pager {
    user-select: none;
    list-style: none;
    display: inline-block;
    vertical-align: top;
    font-size: 0;
    padding: 0;
    margin: 0;

    li {
      padding: 0 4px;
      border: 1px solid var(--pagination-border-color);
      border-right: 0;
      background: var(--pagination-fill);
      vertical-align: top;
      display: inline-block;
      font-size: var(--pagination-font-size);
      min-width: var(--pagination-button-size);
      height: var(--pagination-button-size);
      line-height: var(--pagination-button-size);
      cursor: pointer;
      box-sizing: border-box;
      text-align: center;
      margin: 0;

      &:last-child {
        border-right: 1px solid var(--pagination-border-color);
      }

      &.btn-quicknext,
      &.btn-quickprev {
        line-height: 28px;
        color: var(--pagination-button-color);
      }

      &.btn-quickprev:hover {
        cursor: pointer;
      }

      &.btn-quicknext:hover {
        cursor: pointer;
      }

      &.active + li {
        border-left: 0;
        padding-left: 5px;
      }

      &:hover {
        color: var(--pagination-hover-fill);
      }

      &.active {
        border-color: var(--pagination-hover-fill);
        background-color: var(--pagination-hover-fill);
        color: var(--pagination-hover-color);
        cursor: default;
      }
    }
  }
}
