@import '../styles/index';

.calendar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 17px 0;
  overflow: auto;
  z-index: 1;
}
.pickerHeader {
  font-size: 30px;
  font-weight: bold;
  margin-top: 30px;
}

.item {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: bold;
  color: #343434;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 30px;
  position: relative;
  margin-bottom: 28px;
  box-sizing: content-box;
  background: transparent;
  text-align: center;
  &:active {
    background: #f0f4fd;
  }
}

.week {
  color: #9a9a9a;
  font-weight: normal;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1;
  border-radius: 0;
}

.disable {
  pointer-events: none;
  color: #cccccc;
}

.active {
  color: #fff;
}

.rangeActive {
  border-radius: 0;
  background: transparent !important;
  color: #343434;
  &:after {
    display: block;
    width: 250%;
    height: 100%;
    background-color: lighten(@brand-primary, 45%);
    content: '';
    position: absolute;
    left: -80%;
    top: 0;
    z-index: -1;
  }
}

.end {
  border-radius: 50%;
  border: 0;
  color: #fff;
}

.start {
  border-radius: 50%;
  border: 0;
  color: #fff;
}

.dotWrap {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 32%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #cccccc;
  font-size: 22px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.activeDot {
  background-color: #fff;
}

.month {
  width: 750px;
  height: 60px;
  z-index: 1;
  display: flex;
  align-items: center;
  font-size: 30px;
  font-weight: bold;
  color: #666666;
  padding: 0 20px;
  background-color: #eee;
  margin-bottom: 20px;
  position: sticky;
  top: 75px;
}

.elderly {
  // 在长者模式下，去除居中布局，避免日期网格居中导致与星期不对齐
  justify-content: flex-start;
  .month {
    // 与容器宽度保持一致，避免产生左右空白
    width: 100%;
    margin-bottom: 0;
    top: 126px;
  }
  .item {
    // 每行固定展示7列，随容器宽度自适应，避免换行
    width: calc(100% / 7);
    height: 126px;
    border: 2px solid #ffffff;
    border-radius: 0;
    margin: 0;
    font-weight: bold;
    color: #666666;
    font-size: 40px;
    box-sizing: border-box;
    &.active {
      color: #fff;
      .dotWrap {
        color: #fff;
      }
    }
    &.disable {
      background-color: rgba(#999999, 0.15);
    }
    &.empty {
      background-color: #fff;
    }
    &.week {
      background-color: #fff !important;
      font-size: 40px;
      margin-right: 0 !important;
    }
  }
  .month {
    font-size: 40px;
    font-weight: bold;
    color: #ffffff;
  }
}
