@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: 30px;
  margin: 5px 0;

  @include e((body, body-wrapper)) {
    &::after {
      content: "";
      display: table;
      clear: both;
    }
  }

  @include e(content) {
    position: relative;
    margin: 15px;
  }

  @include e(footer) {
    border-top: 1px solid $--datepicker-inner-border-color;
    padding: 12px 16px;
    background-color: $--color-white;
    position: relative;
    font-size: 0;
    .yk-picker-panel__slide__left{
      .yk-button {
        margin-left: 0;
        margin-right: 8px;
      }
      text-align: left;
    }
    .yk-picker-panel__slide__right{
      text-align: right;
    }
  }

  @include e(shortcut) {
    display: block;
    width: 100%;
    border: 0;
    background-color: transparent;
    line-height: 28px;
    font-size: 14px;
    color: $--datepicker-font-color;
    padding-left: 12px;
    text-align: left;
    outline: none;
    cursor: pointer;

    &:hover {
      color: $--datepicker-hover-font-color;
    }

    &.active {
      background-color: #e6f1fe;
      color: $--datepicker-active-color;
    }
  }

  @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: 16px;
    color: rgba($color:$--color-text-regular, $alpha: 0.56);
    border: 0;
    background: transparent;
    cursor: pointer;
    outline: none;
    margin-top: 4px;
    line-height: 1;

    &:hover {
      color: $--datepicker-hover-font-color;
    }

    @include when(disabled) {
      color: rgba($color:$--color-text-regular, $alpha: 0.12);

      &:hover {
        cursor: not-allowed;
      }
    }
  }

  @include e(link-btn) {
    vertical-align: middle;
  }
}

.yk-date-range-picker{
  .yk-picker-panel__footer:not(.align-right){
    display: flex;
    justify-content: space-between;
    .yk-picker-panel__slide__right{
      flex-shrink: 0;
      width: 150px;
    }
  }
  .align-right{
    text-align: right;
  }
}

.yk-picker-panel *[slot=sidebar],
.yk-picker-panel__sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  border-right: 1px solid $--datepicker-inner-border-color;
  box-sizing: border-box;
  padding-top: 6px;
  background-color: $--color-white;
  overflow: auto;
}

.yk-picker-panel *[slot=sidebar] + .yk-picker-panel__body,
.yk-picker-panel__sidebar + .yk-picker-panel__body {
  margin-left: 110px;
}
