
@import '../../style/index.less';

@calendar-prefix-cls: ~'@{xui-prefix}-calendar';

.@{calendar-prefix-cls} {
  position: relative;
  width: 279px;
  padding-bottom: 3px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  user-select: none;

  &--yearSelect {
    position: absolute;
    top: 40px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    width: 279px;
    height: calc(100% - 40px);
    padding: 20px;
    background-color: #fff;
    border-radius: 4px;

    &--yearTd {
      flex: 0 0 58px;
      height: 24px;
      margin: 0 10px 36px;
      line-height: 24px;
      text-align: center;

      &--yearItem {
        display: inline-block;
        height: 24px;
        padding: 0 8px;
        font-size: 16px;
        text-align: center;
        cursor: pointer;

        &:hover {
          background-color: fade(@primary-color, 20%);
        }

        &--active {
          color: #fff;
          background-color: @primary-color;
          border-radius: 2px;
        }
      }
    }
  }

  &--monthSelect {
    position: absolute;
    top: 40px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    width: 279px;
    height: calc(100% - 40px);
    padding: 20px;
    background-color: #fff;
    border-radius: 4px;

    &--monthTd {
      flex: 0 0 58px;
      height: 24px;
      margin: 0 10px 36px;
      line-height: 24px;
      text-align: center;

      &--monthItem {
        display: inline-block;
        height: 24px;
        padding: 0 8px;
        text-align: center;
        cursor: pointer;

        &:hover {
          background-color: fade(@primary-color, 20%);
        }

        &--active {
          color: #fff;
          background-color: @primary-color;
          border-radius: 2px;
        }
      }
    }
  }
}
