@import "../common/var";

@include b(picker-panel) {
  color: $--color-text-regular;
  border: 1px solid $--datepicker-border-color;
  box-shadow: $--box-shadow-light;
  background: $--color-white;
  border-radius: $--border-radius-base;
  line-height: 24px;
  margin: 5px 0;

  @include e((body, body-wrapper)) {
    &::after {
      content: "";
      display: table;
      clear: both;
    }
  }

  @include e(content) {
    position: relative;
    margin: 0 12px 8px 12px;
  }

  @include e(footer) {
    border-top: 1px solid $--datepicker-inner-border-color;
    padding: 8px;
    padding-right: 12px;
    text-align: right;
    background-color: $--color-white;
    position: relative;
    font-size: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    .el-button {
      height: 28px;
    }
  }

  @include e(shortcut) {
    display: block;
    width: calc(100% - 32px);
    border: 0;
    border-radius: 4px;
    background-color: #F5F7FE;
    height: 28px;
    line-height: 28px;
    font-size: 14px;
    color: $--color-gray;
    margin-left: 16px;
    margin-right: 16px;
    margin-bottom: 12px;
    text-align: center;
    outline: none;
    cursor: pointer;

    &:hover {
      // color: $--datepicker-hover-font-color;
      background-color: rgba(83, 114, 236, 0.15);
    }

    &:active {
      background-color: $--datepicker-active-color;
      color: $--color-white;
    }
  }

  @include e(btn) {
    border: 1px solid #dcdcdc;
    color: #333;
    line-height: 24px;
    border-radius: 2px;
    padding: 0 20px;
    cursor: pointer;
    background-color: transparent;
    outline: none;
    font-size: 12px;

    &[disabled] {
      color: #cccccc;
      cursor: not-allowed;
    }
  }

  @include e(icon-btn) {
    font-size: 14px;
    color: $--datepicker-icon-color;
    border: 0;
    background: transparent;
    cursor: pointer;
    outline: none;
    margin-top: 4px;

    &:hover {
      color: $--datepicker-hover-font-color;
    }

    @include when(disabled) {
      color: $--font-color-disabled-base;

      &:hover {
        cursor: not-allowed;
      }
    }
  }

  @include e(link-btn) {
    vertical-align: middle;
  }
}

.el-picker-panel *[slot=sidebar],
.el-picker-panel__sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  border-right: 1px solid $--datepicker-inner-border-color;
  box-sizing: border-box;
  padding-top: 16px;
  background-color: $--color-white;
  overflow: auto;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.el-picker-panel *[slot=sidebar] + .el-picker-panel__body,
.el-picker-panel__sidebar + .el-picker-panel__body {
  margin-left: 120px;
}
