@import "../../config/variables";
@import "../../mixins/mixins";
@import "../../mixins/utils";

@include b(date-table) {
  @include e(header) {
    width: 100%;
    &:after {
      width: 248px;
      margin: 14px auto 0;
      height: 1px;
      background: $--color-silver;
      display: block;
      content: '';
    }
  }
  @include e(week) {
    height: 24px;
    width: 40px;
    text-align: center;
    position: relative;
    color: $--color-text;
    font-size: 13px;
    display: inline-block;
    line-height: 24px;
    cursor: default;
    &:first-child {
      width: 36px;
    }
    &:last-child {
      width: 36px;
    }
    @include utils-user-select(none);
  }
  @include e(body) {
    padding: $--size-base * 4 0 0;
  }
  @include e(day-number) {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 13px;
    color: $--color-text;
    border-radius: $--border-radius;
    transition: all .2s ease-in-out;
    @include utils-user-select(none);
  }
  @include e(day-inner) {
    box-sizing: border-box;
    padding: 2px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0;
  }
  @include e(day) {
    display: inline-block;
    box-sizing: border-box;
    padding: 2px 6px;
    width: 40px;
    height: 32px;
    text-align: center;
    position: relative;
    //&.today {
    //  .el-date-table__day-number {
    //    color: $--color-primary;
    //  }
    //}
    &:first-child {
      width: 36px;
      padding: 2px 6px 2px 2px;
    }
    &:last-child {
      width: 36px;
      padding: 2px 2px 2px 6px;
    }
    &.available {
      .el-date-table__day-inner:hover {
        @include e(day-number) {
          color: $--color-primary;
          box-shadow: inset 0 0 0 1px $--color-light;
        }
      }
      .el-date-table__day-inner:active {
        @include e(day-number) {
          color: $--color-focus;
          box-shadow: inset 0 0 0 1px $--color-focus;
        }
      }
    }
    &.current:not(disabled) {
      @include e(day-number) {
        box-shadow: none;
        color: $--color-white;
        background: $--color-primary;
      }
      .el-date-table__day-inner:hover {
        @include e(day-number) {
          background: $--color-light;
          color: $--color-white;
        }
      }
      .el-date-table__day-inner:active {
        @include e(day-number) {
          background: $--color-focus;
          color: $--color-white;
        }
      }
    }
    &.disabled {
      .el-date-table__day-inner {
        cursor: not-allowed;
        .el-data-table__day-number {
          cursor: not-allowed;
          color: $--color-silver;
          background: $--color-white;
          box-shadow: none;
        }
      }
      & .el-date-table__day-number {
        cursor: not-allowed;
        color: $--color-silver;
        background: $--color-white;
        box-shadow: none;
      }
    }
  }
  @include e(row) {
    width: 100%;
  }
}
