@import '../../style/themes/index';
@import '../../style/mixins/index';

.center() {
  display: flex;
  justify-content: center;
  align-items: center;
}

.@{ant-prefix}-pollute-calendar {
  .center();
  justify-content: space-between;
  height: 100%;
  background: #fff;
  user-select: none;
  &-left {
    height: 100%;
    .center();
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    &-header {
      height: 30px;
    }
    &-footer {
      flex: 1;
      .center();
      justify-content: space-between;
      align-items: flex-start;
      flex-direction: column;
    }
    &-item {
      .center();
      justify-content: flex-start;
      &-text {
        width: 32px;
        height: 32px;
        .center();
        justify-content: flex-start;
        font-weight: 400;
        font-size: 12px;
        color: #666;
      }
      &-list {
        .center();
        justify-content: flex-start;
      }
      &-cell {
        width: 32px;
        height: 32px;
        background: var(--bg-color);
        .center();
        margin-right: 1px;
        font-weight: 400;
        font-size: 16px;
        color: var(--text-color);
        cursor: pointer;
        transition: all 300ms;
        &:hover {
          box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
          transform: scale(1.1);
        }
      }
    }
  }
  &-right {
    .center();
    height: 100%;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    &-header {
      height: 30px;
      .center();
      justify-content: flex-end;
      &-item {
        width: 40px;
        margin-left: 1px;
        .center();
        font-weight: 400;
        font-size: 12px;
        text-align: center;
        color: #666;
      }
    }
    &-footer {
      .center();
      flex: 1;
      height: 100%;
      justify-content: space-between;
      align-items: flex-start;
      flex-direction: column;
      &-item {
        .center();
        justify-content: flex-end;
        &-cell {
          width: 40px;
          height: 32px;
          margin-left: 1px;
          .center();
          background: var(--color);
          font-weight: 400;
          font-size: 16px;
          color: var(--textColor);
        }
      }
    }
  }
  &-tooltip {
    padding: 8px;
     &-wrapper {
       max-width: 300px;
       .ant-tooltip-arrow {
         &::before {
           background: #ffffff;
         }
       }
       .ant-tooltip-inner {
         background: #fff;
         color: #333333;
         padding: 0;
       }
     }
    &-header {
      color: #8A97A0;
      font-size: 14px;
      margin-bottom: 10px;
    }
    &-aqi {
      width: 100px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 6px;
      span {
        &:first-child {
          font-weight: 400;
          font-size: 12px;
          color: #333;
        }
        &:last-child {
          display: inline-block;
          min-width: 40px;
          text-align: center;
          padding: 0 10px;
          background: var(--bg-color);
          color: var(--text-color);
          border-radius: 20px;
        }
      }
    }
    &-footer {
      position: relative;
      padding-top: 10px;
      &:after {
        content: '';
        position: absolute;
        background: fade(#E5E5E5, 50%);
        height: 1px;
        left: 0;
        right: 0;
        top: 0;
      }
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-column-gap: 20px;
      grid-row-gap: 10px;
      &-item {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        span {
          white-space: nowrap;
          &:first-child {
            font-weight: 400;
            font-size: 12px;
            color: #333;
          }
          &:last-child {
            min-width: 40px;
            text-align: center;
            padding: 0 10px;
            background: var(--bg-color);
            color: var(--text-color);
            border-radius: 20px;
          }
        }
      }
    }
  }
}
