@import "../styles/vars.less";
@import "../styles/animate.less";
@import "../styles/mixins.less";
@prefixCls : cuke-date-picker;
.@{prefixCls} {
  position: relative;
  display: inline-block;
  user-select: none;
  &-inner {
    display: inline-block;
    position: relative;
    cursor: pointer;
    >.cuke-input:not(.cuke-input-disabled) {
      cursor: pointer;
    }
  }
  &-open {
    animation: cuke-picker-open @default-transition forwards;
  }
  &-close {
    animation: cuke-picker-close @default-transition forwards;
    pointer-events: none;
  }
  &-input {
    width: @cuke-select-width;
  }
  &-content {
    width: @cuke-date-picker-content-width;
    height: auto;
    overflow-y: auto;
    position: absolute;
    left: 0;
    top: 0;
    margin-top: @picker-offset-top;
    transform: scale(0);
    background: #fff;
    border: 1px solid @border-color;
    z-index: @cuke-date-picker-z-index;
    box-shadow: @default-shadow;
    padding: @cuke-date-picker-padding;
    border-radius: @border-radius;
  }
  &-header {
    margin-left: 12px;
    margin-bottom: 28px;
    color: @primary-color;
    font-weight: bold;
  }
  &-date {
    font-size: @font-size + 2;
    letter-spacing: 1px;
    margin-right: 10px;
  }
  &-switch {
    float: right;
    & >.@{prefixCls}-switch-group {
      cursor: pointer;
      margin: 0 5px;
      border: 1px solid @border-color;
      border-radius: 50%;
      background-color: @bg-color;
      text-align: center;
      width: 25px;
      height: 25px;
      line-height: 25px;
      display: inline-block;
      transition: all @default-transition;

      &:hover {
        background-color: @primary-color;
        border-color: @primary-color;
        color: #fff;
        text-shadow: @default-text-shadow;
      }
    }
  }
  &-button {
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    background-color: @disabled-color;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    &-icon {
      color: @primary-color;
    }
  }
  &-last-month,
  &-next-month {
    color: @disabled-font-color;
  }
  &-day-title {
    color: @font-color;
    opacity: 0.65;
    cursor: text !important;
  }
  &-items {
    display: flex;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    .@{prefixCls}-item {
      user-select: none;
      text-align: center;
      display: inline-block;
      width: @cuke-date-picker-date-width;
      height: @cuke-date-picker-date-height;
      line-height: @cuke-date-picker-date-height;
      border-radius: 50%;
      margin: @cuke-date-picker-date-offset;
      cursor: pointer;
      border: 1px solid transparent;
      transition: all @default-transition;
      &:not(.@{prefixCls}-day-title):not(.@{prefixCls}-last-month):not(.@{prefixCls}-next-month):not(.@{prefixCls}-disabled-date):hover {
        border: 1px solid @primary-color;
      }
    }
  }
  &-current-month {
    border: 1px solid transparent;
    border-radius: @border-radius;
  }
  &-selected-date {
    border-color: @primary-color;
    background-color: @primary-color;
    color: #fff;
    text-shadow: @default-text-shadow;
  }
  &-footer {
    margin-top: 20px;
    padding-top: 10px;
    display: flex;
    justify-content: flex-end;
    &-today,
    &-clear {
      cursor: pointer;
      user-select: none;
    }
    &-today {
      color: @primary-color;
      transition: color @default-transition;
      &:hover {
        color: lighten(@primary-color, 10%);
      }
    }
    &-clear {
      color: @primary-color;
      transition: color @default-transition;
      margin-left: 10px;
      &:hover {
        color: lighten(@primary-color, 10%);
      }
    }
    &-extra {
      margin-top: 10px;
    }
    &.@{prefixCls}-has-border {
      border-top: 1px solid @border-color;
    }
  }

  &-disabled-date {
    background-color: @disabled-color;
    color: @disabled-font-color;
    &.@{prefixCls}-item {
      cursor: not-allowed;
      border-radius: @border-radius;
      transition: none !important;
    }
  }
}
