.bp-date-picker {
  position: relative;
}

.bp-trigger-wrapper {
  .bp-date-picker-panel {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

.bp-date-picker-panel {
  width: fit-content;
  border-radius: 6px;
  border: 1px solid @gary-4;
  background-color: @gary-1;
  .no-select;

  &-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  &-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 10px;
    border-top: 1px solid @gary-4;
  }
}

.bp-date-table,
.bp-month-table,
.bp-year-table {
  width: 260px;

  &-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 46px;
    border-bottom: 1px dashed @gary-4;
    border-width: 1px;

    &-inner {
      flex: 3;

      &-year,
      &-month {
        color: @gary-9;
        font-size: 16px;
        font-weight: bold;
        padding: 2px 4px;
        border-radius: 6px;
        cursor: pointer;

        &:hover {
          color: @gary-11;
          background-color: @gary-3;
          transition: all 0.4s ease;
        }
      }
    }

    &-option {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;

      .bp-icon {
        fill: @gary-7;
        cursor: pointer;
        border-radius: 50%;
        padding: 4px;
        background-color: @gary-1;
        transition: all 0.4s ease;

        &:hover {
          fill: @gary-10;
          background-color: @gary-3;
          transition: all 0.4s ease;
        }
      }
    }
  }
}

// 日期选择
.bp-date-table {
  &-week {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
    margin-top: 10px;

    &-inner {
      width: 32px;
      height: 32px;
      line-height: 32px;
      text-align: center;
      font-size: 12px;
      color: @gary-8;
      padding: 0;
      transform: scale(0.9);
    }
  }

  &-body {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0 12px;
    margin-bottom: 10px;

    &-row {
      display: flex;
      justify-content: space-around;
      width: 100%;

      &:not(:first-child) {
        margin-top: 8px;
      }
    }

    &-inner {
      display: block;
      width: 26px;
      height: 26px;
      line-height: 26px;
      text-align: center;
      font-size: 12px;
      cursor: pointer;
    }

    .day-cell-prev,
    .day-cell-next {
      color: @gary-6;
      font-weight: 400;
      border-radius: 50%;
    }

    .day-cell-normal {
      color: @gary-10;
      font-weight: 500;
      border-radius: 50%;

      &:hover {
        background-color: @gary-4;
        color: @gary-11;
        transition: all 0.2s ease;
      }
    }

    .to-day {
      &::after {
        content: "";
        display: block;
        position: relative;
        left: 50%;
        bottom: 4px;
        width: 4px;
        height: 4px;
        margin-left: -2px;
        border-radius: 4px;
        background-color: @primary-6;
      }
    }

    .active {
      background-color: @primary-6 !important;
      color: @gary-1 !important;
    }
  }

  &-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-top: 1px dashed @gary-4;

    .bp-btn {
      font-size: 13px;
    }
  }
}

.bp-month-table {
  &-body {
    padding: 16px 12px;
    display: grid;
    grid-template-columns: repeat(3, 33%);
    grid-gap: 10px 0;
  }

  &-month-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;

    &-inner {
      color: @gary-10;
      line-height: 26px;
      font-size: 14px;
      font-weight: 500;
      padding: 0 8px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }

    &:hover {
      .bp-month-table-month-cell-inner {
        color: @gary-11;
        background-color: @gary-3;
        transition: all 0.2s ease;
      }
    }
  }

  .active {
    pointer-events: none;

    .bp-month-table-month-cell-inner {
      background-color: @primary-6 !important;
      color: @gary-1 !important;
    }
  }

  .to-month {
    &::after {
      content: "";
      display: block;
      position: absolute;
      bottom: -2px;
      width: 4px;
      height: 4px;
      margin-left: -2px;
      border-radius: 4px;
      background-color: @primary-6;
    }
  }
}

.bp-year-table {
  &-body {
    padding: 16px 12px;
    display: grid;
    grid-template-columns: repeat(3, 33%);
    grid-gap: 10px 0;
  }

  &-year-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;

    &-inner {
      color: @gary-10;
      line-height: 26px;
      font-size: 14px;
      font-weight: 500;
      padding: 0 8px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }

    &:hover {
      .bp-year-table-year-cell-inner {
        color: @gary-11;
        background-color: @gary-3;
        transition: all 0.2s ease;
      }
    }
  }

  .active {
    pointer-events: none;

    .bp-year-table-year-cell-inner {
      background-color: @primary-6 !important;
      color: @gary-1 !important;
    }
  }

  .to-year {
    &::after {
      content: "";
      display: block;
      position: absolute;
      bottom: -2px;
      width: 4px;
      height: 4px;
      margin-left: -2px;
      border-radius: 4px;
      background-color: @primary-6;
    }
  }
}

.bp-date-time-table {
  border-left: 1px solid @gary-4;

  &-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 46px;
    border-bottom: 1px dashed @gary-4;
    border-width: 1px;

    &-inner {
      font-size: 14px;
      color: @gary-10;
      font-weight: bold;
    }
  }

  &-body {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    justify-content: flex-start;
  }

  &-time-col {
    width: 60px;
    height: 248px;
    padding: 4px 0;
    overflow-y: hidden !important;

    &:hover {
      overflow-y: auto !important;
    }

    &:not(:first-child) {
      border-left: 1px dashed @gary-4;
    }
  }

  .time-col-scroller-list {
    margin-bottom: 164px;
  }

  &-col-cell {
    padding-left: 24px;
    line-height: 28px;
    background-color: @gary-1;
    transition: 0.2s ease;
    cursor: pointer;

    &-inner {
      display: flex;
      font-size: 12px;
      font-weight: 500;
      color: @gary-9;
      transform: scale(1);
      transition: 0.2s ease;
    }

    &:hover {
      background-color: @gary-2;
      transition: 0.2s ease;

      .bp-time-table-col-cell-inner {
        color: @gary-11;
        transform: scale(1.05);
        font-weight: 600;
        transition: 0.2s ease;
      }
    }
  }

  .active {
    background-color: @gary-3;
    transition: 0.2s ease;

    .bp-time-table-col-cell-inner {
      color: @gary-11;
      transform: scale(1.05);
      font-weight: 600;
      transition: 0.2s ease;
    }
  }
}