$schedule-prefix-cls: "#{$css-prefix}schedule";

.#{$schedule-prefix-cls} {
  position: relative;

  & .h-calendar-month {
    margin: 28px 1.5% 8px;
  }

  &-header {
    position: relative;
    text-align: center;
    height: 36px;
    .#{$btn-prefix-cls}-group, .#{$schedule-prefix-cls}-today-btn {
      position: absolute;
      top: 1px;
    }
    .#{$schedule-prefix-cls}-today-btn {
      margin-left: $schedule-today-btn-margin-left;
      right: $schedule-today-btn-right;
      height: $schedule-today-btn-height;
    }
    .#{$btn-prefix-cls}-group {
      left: $schedule-header-button-group-left;
    }
    .#{$btn-prefix-cls}-group button {
      width: $schedule-header-button-group-width;
      padding-left: $schedule-header-button-group-padding-left;
      padding-right: $schedule-header-button-group-padding-right;
      height: $schedule-header-button-group-height;
    }
    .#{$schedule-prefix-cls}-date-text {
      display: inline-block;
      /* #197595 由于用户场景问题，原先h1标签会导致hui-pro框架上h1新增margin等样式，导致日期的排版错位，导致h-schedule-header样式的高度计算错误，
      从而导致.h-schedule-events类的top:136px 计算错误。 为了再次由于pro项目样式覆盖导致h-schedule-header的高度计算错误，设置h-schedule-header中
      height: 36px; 将h1标签改为span标签，样式font-size: 24px; font-weight: 600;
       */
      font-size: 24px;
      font-weight: 600;
    }
  }

  &-events {
    position: absolute;
    top: $schedule-events-top;
    left: $schedule-events-left;
    z-index: $zindex-spin;
    width: $schedule-events-width;
    margin: $schedule-events-margin;
    border-left: 1px solid transparent;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    .#{$schedule-prefix-cls}-event-wrapper {
      width: $schedule-event-wrapper-width;
      height: $schedule-event-wrapper-height;
      margin-top: 0 !important; //修改仅在第一行需要添加margin-top
      // position: relative;
      &:nth-child(7n + 1) {
        padding-left: 1px;
      }

      &:nth-child(7n) {
        padding-right: 2px;
      }
      .#{$schedule-prefix-cls}-event-content {
        pointer-events: auto;
        height: $schedule-event-content-height;
        margin-bottom: $schedule-event-content-margin-bottom;
        padding-left: $schedule-event-content-padding-left;
        font-size: $schedule-event-content-font-size;
        line-height: $schedule-event-content-height;
        color: $schedule-event-content-color;
        background: $schedule-event-content-background;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        cursor: pointer;
        &.#{$schedule-prefix-cls}-event-placeholder {
          opacity: 0;
          pointer-events: none;
        }

        &.event-place-start {
          margin-left: $schedule-event-place-start-margin-left;
          border-radius: $schedule-event-place-start-border-radius;
        }

        &.event-place-end {
          margin-right: $schedule-event-place-start-margin-right;
          border-radius: $schedule-event-place-start-border-radius;
        }

        &.event-place-start.event-place-end {
          border-radius: 3px;
        }
      }
      .#{$schedule-prefix-cls}-event-more {
        text-align: center;

        i {
          display: inline-block;
          pointer-events: auto;
          width: 18px;
          color: rgba(#000, 0.6);
          transition: color 0.2s;
          cursor: pointer;
          line-height: 16px;

          &:hover {
            color: #000;
          }
        }
      }

      .event-circle-remind {
        position: relative;
        width: 100%;
        height: 100%;

        &::before {
          content: "\25CF";
          position: absolute;
          bottom: 2px;
          right: 4px;
          color: #f5222d;
          line-height: 1;
          font-size: 14px;
        }
      }
    }
    .#{$schedule-prefix-cls}-event-wrapper.first-line {
      padding-top: $schedule-event-wrapper-margin-top;
      // margin-top: $schedule-event-wrapper-margin-top;
    }
    /* 展示更多活动的窗口 */
    .#{$schedule-prefix-cls}-popover {
      position: absolute;
      z-index: $zindex-affix;
      width: 14.28%;
      min-width: $schedule-popover-min-width;
      background: $schedule-popover-background;
      box-shadow: $schedule-popover-box-shadow;
      color: $schedule-popover-color;
      pointer-events: auto;

      &-header {
        line-height: 1.5;
        padding: $schedule-popover-header-padding;
        background: $schedule-popover-header-background;
        font-size: $schedule-popover-header-font-size;

        i.icon-close {
          display: inline-block;
          float: right;
          cursor: pointer;
        }
      }

      &-body {
        padding: $schedule-popover-body-padding;
        max-height: $schedule-popover-body-max-height;
        overflow: auto;

        &-item {
          background: $schedule-popover-body-item-background;
          color: $schedule-popover-body-item-color;
          margin-bottom: $schedule-popover-body-item-margin-bottom;
          border-radius: $schedule-popover-body-item-border-radius;
          padding: $schedule-popover-body-item-padding;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
          cursor: pointer;

          &:last-child {
            margin-bottom: 10px;
          }
        }
      }
    }
  }
  .#{$calendar-prefix-cls}-today {
    &::before {
      content: "●";
      position: absolute;
      top: $schedule-calendar-today-top;
      left: $schedule-calendar-today-left;
      color: $schedule-calendar-today-color;
      line-height: 1;
      font-size: $schedule-calendar-today-font-size;
    }
  }
  .#{$calendar-prefix-cls}-month-content .#{$calendar-prefix-cls}-month-content-item {
    cursor: default;
    .#{$calendar-prefix-cls}-month-content-item-text {
      position: absolute;
      line-height: 1;
      top: $schedule-calendar-month-content-item-top;
      right: $schedule-calendar-month-content-item-right;
    }
  }
}
// .#{$schedule-prefix-cls} {
//   .h-calendar-month {
//     // margin: 10px 1.5%;
//   }
// }
