.date-poptip {
  padding: 0;
}

.datepicker-animation-enter-active {
  animation: bounce-in 0.3s ease;
}
.datepicker-animation-leave-active {
  animation: bounce-out 0.4s ease;
}

.x-datepicker {
  display: inline-block;
}

// date.vue
.x-date-panel {
  .x-date-panel-day {
    position: relative;
  }
}

// daterange.vue
.date-packer-daterange-body {
  position: relative;
}
.date-packer-opt {
  width: 91px;
  background: $background-color-disabled;
  height: 100%;
  border-right: 1px solid $border-color-base;
  overflow: hidden;
  padding: 5px;
  position: absolute;
  box-sizing: border-box;
  .picker-panel-shortcut {
    transition: all 0.2s ease-in-out;
    padding: 5px 0 5px 10px;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    &:hover {
      color: $primary-color;
    }
    &.act {
      color: $primary-color;
      cursor: default;
    }
  }
}
.date-packer-daterange {
  position: relative;

  .date-interval {
    overflow: hidden;
    .x-date-packer-panel {
      float: left;
      .x-date-packer-hd {
        .hd-icon-left,
        .hd-icon-right {
          display: none;
        }
      }
    }
    .date-start .x-date-packer-hd .hd-icon-left,
    .date-end .x-date-packer-hd .hd-icon-right {
      display: inherit;
    }
  }
}

// confirm.vue
.x-date-packer-confirm {
  border-top: 1px solid $border-color-base;
  height: 38px;

  .ck-act {
    margin-right: 5px;
    cursor: pointer;
    color: $primary-color;
    &:hover {
      opacity: 0.8;
    }
  }
  .date-time-text {
    padding-top: 5px;
    margin-top: 5px;
    display: inline-block;
    font-size: 12px;
    &.disabled {
      color: $disabled-text-color-light;
      cursor: context-menu;
      &:hover {
        opacity: 1;
      }
    }
  }
  .confirm-slot {
    float: left;
    margin-left: 10px;
    position: relative;
    .x-poptip {
      min-width: 50px;
    }
  }
  .confirm-btn {
    float: right;
    margin-right: 10px;
    font-size: 12px;
    margin-top: 5px;
    button {
      border: 0;
      background: $primary-color;
      width: 40px;
      height: 26px;
      line-height: 26px;
      color: $title-color-dark;
      border-radius: 4px;
      cursor: pointer;
      &:hover {
        opacity: 0.8;
      }
    }
  }
}

// day.vue
.x-date-packer-panel {
  width: 202px;
  font-size: 12px;
  position: relative;
  .x-date-packer-hd {
    height: 32px;
    line-height: 32px;
    text-align: center;
    position: relative;
    .hd-txt,
    i {
      cursor: pointer;
      &:hover {
        color: $primary-color;
      }
    }
    .hd-icon {
      font-size: 14px;
      color: $disabled-text-color-light;
      position: absolute;
      top: 0;
      i {
        font-size: 12px;
        padding: 0 5px;
      }
      &.hd-icon-left {
        left: 10px;
      }
      &.hd-icon-right {
        right: 10px;
      }
    }
  }
  .x-date-packer-day {
    padding: 5px 10px 10px 10px;
    .lattice {
      display: inline-block;
      line-height: 26px;
      height: 26px;
      width: 26px;
      text-align: center;
      margin-top: 3px;
      transition: all 0.5s;
      position: relative;
      label {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        cursor: pointer;
        font-weight: inherit;
        &.bg-hover {
          background: lighten($primary-color, 50);
          color: $title-color-light;
        }
        &.bg-hover-start {
          border-top-left-radius: 15px;
          border-bottom-left-radius: 15px;
        }
        &.bg-hover-end {
          border-top-right-radius: 15px;
          border-bottom-right-radius: 15px;
        }
        &.bg-hover-centre {
          border-radius: 15px;
        }
      }
      em {
        display: block;
        border-radius: 15px;
        cursor: pointer;
        line-height: 24px;
        height: 24px;
        margin: 1px 1px;
        font-style: normal;
        position: relative;
        transition: all 0.2s;
        &:hover {
          background: lighten($primary-color, 50);
        }
      }
      b {
        cursor: pointer;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0.6;
      }
      &.picker-disabled {
        background: $background-color-disabled;
        cursor: no-drop;
        color: $disabled-text-color-light;
        label {
          cursor: no-drop;
        }
        em {
          cursor: no-drop;
          &:hover {
            background: $background-color-disabled;
          }
        }
      }
    }
    .x-date-packer-day-week {
      color: $disabled-text-color-light;
    }
    .x-date-packer-day-day {
      [data-select="true"] {
        background: $primary-color;
        color: $title-color-dark;
        &:hover {
          background: $primary-color;
        }
      }

      [data-today="true"] {
        &:after {
          content: "";
          display: block;
          width: 6px;
          height: 6px;
          border-radius: 50%;
          background: $primary-color;
          position: absolute;
          top: 1px;
          right: 1px;
        }
      }

      [data-hover="true"] {
        color: $title-color-dark;
        em {
          background: transparent;
          &:hover {
            background: transparent;
          }
        }
      }
      [data-hover-start="true"] {
        border-top-left-radius: 15px;
        border-bottom-left-radius: 15px;
      }
      [data-hover-end="true"] {
        border-top-right-radius: 15px;
        border-bottom-right-radius: 15px;
      }
    }
  }
}

// time.vue
.x-date-packer-time {
  overflow: hidden;
  .packer-time-body {
    width: 150px;
    float: left;
    position: relative;
    font-size: 12px;

    .bd-left {
      border-left: solid $border-color-base 1px;
    }
    .hd-text {
      padding: 5px 0 5px 15px;
      border-bottom: solid $border-color-base 1px;
    }
    &.hm {
      .picker-time-div {
        width: 50%;
        li {
          padding-left: 30px;
        }
      }
      .time-second {
        display: none;
      }
    }
    &.h {
      .picker-time-div {
        width: 100%;
        li {
          padding-left: 70px;
        }
      }
      .time-second,
      .time-minute {
        display: none;
      }
    }

    &.time-body-hours {
      .time-hours {
        li {
          padding: 0 0 0 90px;
        }
      }
      .time-minute,
      .time-second {
        display: none;
      }
    }
    &.time-body-minute {
      .time-hours,
      .time-minute {
        li {
          padding: 0 0 0 45px;
        }
      }
      .time-second {
        display: none;
      }
    }
    .picker-time-div {
      float: left;
      width: 33.33%;
      float: left;
      overflow: hidden;
      border-right: solid $border-color-base 1px;
      box-sizing: border-box;
      width: 50px;
      height: 200px;
      padding-bottom: 175px;
      &:hover {
        overflow-y: auto;
      }

      ul {
        padding: 0;
        margin: 0;
        li {
          list-style: none;
          line-height: 25px;
          cursor: pointer;
          padding: 0 0 0 15px;
          &:hover {
            background: $background-color-disabled;
          }
          &.time-act {
            color: $primary-color;
            background: $background-color-disabled;
          }
        }
      }
    }
  }
}

// years.vue
.x-date-packer-ym {
  background: $background-color-base;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 1;
  .x-date-packer-item {
    padding: 10px;
    .x-date-packer-year,
    .x-date-packer-month {
      overflow: hidden;
    }
    .year-item {
      float: left;
      width: 33.33%;
      padding: 10px 0;

      text-align: center;
      span {
        display: inline-block;
        width: 40px;
        height: 28px;
        line-height: 28px;
        cursor: pointer;
        border-radius: 4px;
        &:hover {
          background: lighten($primary-color, 50);
        }
        &.act {
          background: $primary-color;
          color: $title-color-dark;
        }
      }
    }
  }
}
