.coursewareType {
  position: relative;
  border-radius: 13px;
  padding: 10px 10px 0;
  transition: all 0.2s ease;
  background: #f4f7fd;

  &:hover {
    // background: #FFFFFF;
    // box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    transition: all 0.2s ease;

    // &:hover .footer {
    //   opacity: 1;
    //   visibility: visible;
    //   transition: all .2s ease;
    // }
  }

  &.coursewareTypeHover:hover {
    .addBtn {
      opacity: 1;
      visibility: visible;
    }
  }

  &.coursewareTypeHocoursewareTypeShow {
    // .cover {
    //   cursor: default;
    // }

    .addBtn {
      opacity: 1;
      visibility: visible;
    }
  }

  .addBtn {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 15px;
    right: 15px;
    // width: 60px;
    height: 27px;
    background: #3d9eff;
    border-radius: 5px;
    padding: 0 12px;

    z-index: 1;
    --n-border: none !important;
    font-size: max(16px, 12Px) !important;
  }

  :global {
    .n-button.n-button--disabled {
      background: #ccc;
      --n-border-disabled: none !important;
    }
  }

  .cover {
    cursor: pointer;
    position: relative;
    height: 153px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #eff0f2;
    transition: all 0.2s ease;

    .noCoverImg {
      background-color: #000;

      img {
        display: none;
      }
    }

    &:hover {
      :global {
        .n-image {
          transform: scale(1.05);
          transition: all 0.2s ease;
          // &:hover {
          // }
        }
      }

      .defaultLook {
        opacity: 1;
        visibility: visible;
      }
    }

    .defaultLook {
      position: absolute;
      opacity: 0;
      visibility: hidden;
      inset: 0;
      background-color: rgba(0, 0, 0, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;

      &::before {
        display: inline-block;
        content: '';
        width: 25px;
        height: 25px;
        background: url('../../images/icon-look.png') no-repeat center;
        background-size: contain;
      }
    }

    // 布置作业
    &.isShowAdd:hover {
      .defaultLook {
        display: none;
      }

      .function {
        opacity: 1;
        visibility: visible;
        transition: all 0.1s ease;
      }
    }

    .iconOpenFlag {
      position: absolute;
      right: 0;
      top: 0;
      font-weight: 600;
      font-size: 13px;
      color: #ffffff;
      line-height: 18px;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 0 10px 0px 10px;
      padding: 2px 8px;
    }

    .iconNoWork {
      position: absolute;
      right: 0;
      top: 0;
      display: inline-block;
      width: 97px;
      height: 26px;
      background: url('../../images/icon-no-work.png') no-repeat center;
      background-size: contain;
    }
    .statusCon {
      position: absolute;
      top: 6px;
      left: 6px;
      z-index: 9;
      display: flex;
      align-items: center;
      .status {
        background: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
        font-weight: 600;
        font-size: max(12px, 11Px);
        color: #ffffff;
        padding: 2px 8px;
        & + .status {
          margin-left: 8px;
        }
      }
    }

    :global {
      .n-image {
        width: 100%;
        height: 100%;
        transition: all 0.2s ease;
      }
    }

    img {
      width: 100%;
      height: fit-content;
    }

    &.hideP:hover {
      &::after {
        display: none;
      }

      .preview {
        opacity: 1;
        visibility: visible;
        transition: all 0.2s ease;
      }
    }
  }

  .preview {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;

    .previewBtn {
      background: #3d9eff;
      height: max(40px, 32Px);
      padding: 0 30px;
      border-radius: 12px;
      color: #fff;
    }
  }

  .itemOperation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #777777;
    font-size: max(13px, 12Px);
    padding-top: 5px;
    .authorName {
      max-width: 50%;
      span {
        display: block;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }

    &.itemOperationAdd {
      flex-direction: column;
      justify-content: flex-start;
      padding-top: 2px;
      > div {
        flex: 1;
        width: 100%;
      }

      .authorName {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 100%;
        span {
          display: block;
          max-width: 80%;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }

  .coursewareText {
    padding: 10px 0 0;

    .name {
      font-weight: 600;
      font-size: max(14px, 14Px);
      color: #000000;
      display: flex;
      align-items: center;

      span {
        list-style: 16px;
        max-width: 100%;
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .iconEditName {
        display: none;
        width: max(13px, 12Px);
        height: max(13px, 12Px);
        background: url('../../images/icon-edit-name.png') no-repeat center
          center;
        background-size: contain;
      }
    }

    .subjectName {
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .editName {
      display: flex;
      align-items: center;
      // justify-content: space-between;

      span {
        max-width: 94%;
      }

      &:hover {
        span {
          // color: #1677FF;
        }

        .iconEditName {
          margin-left: 6px;
          cursor: pointer;
          flex-shrink: 0;
          display: inline-block;
        }
      }
    }

    .subjectName {
      padding-top: 5px;
      font-size: 11px;
      color: #777777;
      line-height: 16px;
    }
  }

  .addCourseBtn {
    display: inline-block;
    padding: 3px 8px;
    background: #e8f4ff;
    border-radius: 2px;
    font-weight: 500;
    font-size: max(10px, 10Px);
    color: #0378ec;
    cursor: pointer;
  }
}

.operationBottom {
  padding-bottom: 10px;
}

.footer {
  // opacity: 0;
  // visibility: hidden;
  display: flex;
  align-items: center;
  padding-top: 10px;
  // padding-bottom: 8px;
  // position: absolute;
  // left: 10px;
  // right: 10px;
  // bottom: 12px;
  // background-color: #fff;
  transition: all 0.2s ease;

  :global {
    .n-space {
      gap: 8px 10px !important;
    }
  }

  .actionClass {
    cursor: pointer;
    flex: 1;
    height: 30px !important;
    line-height: 30px;
    background: #fff;
    // background: #198CFE;
    border-radius: 7px;
    text-align: center;
    margin-right: 10px;
    font-size: max(14px, 13Px);
    // color: #fff;
    color: #484f59;
    font-weight: 600;
    transition: all 0.2s ease;

    &:hover {
      background-color: rgba(25, 140, 254, 0.8);
      transition: all 0.2s ease;
      color: #fff;
    }

    &.actionWork {
      margin-right: 0;
      background: #fff;
      color: #484f59;
      padding: 0 13px;
      position: relative;

      // :global {
      //   .n-badge-sup {
      //     width: 7px;
      //     height: 7px;
      //     min-width: 7px;
      //   }
      // }
      .dot {
        width: 7px;
        height: 7px;
        position: absolute;
        top: 3px;
        right: 3px;
        background-color: #EA4132;
        border: 1px solid #fff;
        border-radius: 5px;
        display: inline-block;
        box-sizing: content-box;
      }

      &:hover {
        background-color: rgba(25, 140, 254, 0.8);
        color: #fff;
      }
    }
  }

  .menu {
    height: 30px !important;
    line-height: 30px;
    width: 30px !important;
    background: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    &::after {
      content: '';
      display: inline-block;
      width: 13px;
      height: 10px;
      background: url('../../images/icon-menu-default.png') no-repeat center;
      background-size: contain;
    }

    &:hover {
      &::after {
        background: url('../../images/icon-menu-active.png') no-repeat center;
        background-size: contain;
      }
    }
  }

  // .optons {
  //   width: 20Px;
  //   height: 20Px;
  //   background: #FFFFFF;
  //   border-radius: 7px;
  //   padding: 5px;
  //   box-sizing: content-box;
  //   cursor: pointer;
  //   display: flex;
  //   align-items: center;
  //   justify-content: center;

  //   img {
  //     width: 20Px;
  //     height: 20Px;
  //   }

  //   .iconEdit,
  //   .iconDelete {
  //     display: inline-block;
  //     width: 24px;
  //     height: 24px;
  //   }

  //   .iconEdit {
  //     background: url('../../images/icon-courseware-edit.png') no-repeat center;
  //     background-size: contain;
  //   }

  //   .iconDelete {
  //     background: url('../../images/icon-courseware-delete.png') no-repeat center;
  //     background-size: contain;
  //   }

  //   // &:hover {
  //   //   .iconEdit {
  //   //     background: url('../../images/icon-courseware-edit-active.png') no-repeat center;
  //   //     background-size: contain;
  //   //   }

  //   //   .iconDelete {
  //   //     background: url('../../images/icon-courseware-delete-active.png') no-repeat center;
  //   //     background-size: contain;
  //   //   }
  //   // }
  // }
  .iconEdit,
  .iconDelete,
  .iconSetup {
    display: inline-block;
    width: 24px;
    height: 24px;
  }

  .iconEdit {
    background: url('../../images/icon-courseware-edit.png') no-repeat center;
    background-size: contain;
  }

  .iconSetup {
    background: url('../../images/setup.png') no-repeat center;
    background-size: contain;
  }

  .iconDelete {
    background: url('../../images/icon-courseware-delete.png') no-repeat center;
    background-size: contain;
  }

  .popoverItem {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: max(13px, 12Px);
    color: #484f59;
    line-height: 18px;
    border-radius: 8px;
    padding: 8px 13px;
    cursor: pointer;
    margin: 3px 0;

    i {
      margin-right: 13px;
    }

    &:hover {
      background: #f5f6fa;
    }
  }

  :global {
    .n-popover {
      box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
      border-radius: 10px;
      padding: 9px 7px !important;
    }
  }
}

.function {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease;

  .iconLook,
  .iconAdd {
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 16px;
  }

  .iconLook {
    &::before {
      display: inline-block;
      content: '';
      width: 25px;
      height: 25px;
      background: url('../../images/icon-look.png') no-repeat center;
      background-size: contain;
    }
  }

  .iconAdd {
    &::before {
      display: inline-block;
      content: '';
      width: 18px;
      height: 18px;
      background: url('../../images/icon-add.png') no-repeat center;
      background-size: contain;
    }
  }
}
