@import "../common/var";

@include b(date-range-picker) {
  width: 600px;

  table {
    table-layout: fixed;
    // width: 100%;
  }

  .el-picker-panel__body {
    min-width: 513px;
  }

  &.el-date-editor--readonly {
    background-color: $--input-disabled-fill;
    &:hover {
      border-color: $--input-disabled-border;
    }
    &:focus {
      border-color: $--input-disabled-border;
    }
    
  }

  .el-picker-panel__content {
    margin: 0;
  }
  @include e(header) {
    position: relative;
    text-align: center;
    height: $--datepicker-header-height;
    padding: 0 24px;
    line-height: $--datepicker-header-height;
    font-weight: $--datepicker-font-weight;

    [class*=arrow-left] {
      float: left;
    }

    [class*=arrow-right] {
      float: right;
    }

    div {
      font-size: $--datepicker-font-size;
      font-weight: $--datepicker-font-weight;
      margin-right: 50px;
    }
  }

  @include e(header-group) {
    display: flex;
    height: $--datepicker-header-height;
    align-items: center;
    div {
      font-size: $--datepicker-font-size;
      font-weight: $--datepicker-font-weight;
      text-align: center;
      flex: 1;
    }
  }

  @include e(content) {
    float: left;
    width: 50%;
    box-sizing: border-box;
    margin: 0;
    .el-date-range-picker__header {
      div {
        margin-left: 50px;
        margin-right: 50px;
      }
    }
  }

  @include e(select-type) {
    position: relative;
    border-top: $--border-base;
    font-size: $--font-size-body-4;
    color: $--datepicker-type-font-color;
    height: $--datepicker-select-type-height;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
  }

  @include e(picker-wrap) {
    position: relative;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: $--datepicker-type-font-color;

    &:hover {
      background: $--datepicker-hover-background-color;
    }
    .el-input__icon {
      line-height: $--datepicker-icon-lint-height;
      color: $--color-text-2;
      font-size: $--datepicker-font-size-base;
    }
    @include m(checked) {
      color: $--datepicker-font-color;
      font-weight: $--datepicker-font-weight;
      .el-input__icon {
        color: $--datepicker-font-color;
      }
    }

    @include m(disabled) {
      background-color: $--color-secondary-disabled-background;
      cursor: not-allowed;
    }
  }
}

@include b(date-range-spinner__content) {
  display: flex;
  .el-time-range-spinner {
    flex: 1;
  }
  .has-seconds {
    .el-time-spinner__wrapper {
      flex: 1;
      .el-scrollbar__wrap {
        overflow-x: hidden;
        .el-time-spinner__item {
          width: calc(100% - 8px)
        }
      }
    }
  }
}
