@use "../../libs/css/mixin" as *;
@use "../../libs/css/theme" as *;


/* 主样式 */
@include b(calendar){
  /* 确认按钮 */
  @include e(confirm) {
    padding: 7px 18px;
  }

  /* 头部样式 */
  @include m(header) {
    display: flex;
    flex-direction: column;
    padding-bottom: 4px;

    @include e(title) {
      font-size: 16px;
      text-align: center;
      height: 42px;
      line-height: 42px;
      font-weight: bold;
    }

    @include e(subtitle) {
      font-size: 14px;
      color: $hy-text-color--2;
      height: 40px;
      text-align: center;
      line-height: 40px;
      font-weight: bold;
    }

    @include e(weekdays) {
      @include flex;
      justify-content: space-between;

      @include e(weekday) {
        font-size: 13px;
        color: $hy-text-color--grey;
        line-height: 30px;
        flex: 1;
        text-align: center;
      }
    }
  }


  @include m(month) {
    @include e(title) {
      display: flex;
      flex-direction: column;
      font-size: 14px;
      line-height: 42px;
      height: 42px;
      color: $hy-text-color--2;
      text-align: center;
      font-weight: bold;
    }

    /* 内容样式 */
    @include e(wrapper) {
      margin-top: 4px;
    }

    @include e(days) {
      position: relative;
      @include flex;
      flex-wrap: wrap;

      @include e(month-mark-wrapper) {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        @include flex;
        justify-content: center;
        align-items: center;

        @include e(text) {
          font-size: 155px;
          color: $hy-text-color--4;
        }
      }

      @include e(day) {
        @include flex;
        padding: 2px;
        /* #ifndef APP-NVUE */
        // vue下使用css进行宽度计算，因为某些安卓机会无法进行js获取父元素宽度进行计算得出，会有偏移
        width: calc(100% / 7);
        box-sizing: border-box;
        /* #endif */

        @include e(select) {
            flex: 1;
            @include flex;
            align-items: center;
            justify-content: center;
            position: relative;
            @include m(selected) {
              background-color: $hy-primary;
              @include flex;
              justify-content: center;
              align-items: center;
              flex: 1;
              border-radius: 3px;
              @include m(center) {
                border-radius: 0;
                background-color: $hy-primary-light;
                color: $hy-primary;
              }
            }

            @include e(dot) {
              width: 7px;
              height: 7px;
              border-radius: 100px;
              background-color: $hy-error;
              position: absolute;
              top: 6px;
              right: 6px;
            }

            @include e(content) {
              @include flex;
              flex-direction: column;
              align-items: center;
              justify-content: center;
            }

            @include e(button-info) {
              color: $hy-text-color--2;
              text-align: center;
              font-size: 10px;
              line-height: 12px;
              margin-top: 2px;

              @include m(selected) {
                color: #ffffff;
              }

              @include m(disabled) {
                color: $hy-text-color--disabled;
              }
            }

            @include e(info) {
              text-align: center;
              font-size: 16px;
              line-height: 18px;

              @include m(selected) {
                color: #ffffff;
                background-color: $hy-primary;
              }

              @include m(disabled) {
                color: $hy-text-color--disabled;
              }
            }

          @include m(range-selected) {
            opacity: 0.3;
            border-radius: 0;
          }

          @include m(range-start-selected) {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
          }

          @include m(range-end-selected ) {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
          }
        }
      }
    }
  }
}