@prefixCls: ~'source-template-item';

.box {
  display: flex;
  :global {
    .screenItem-content-editIcon {
      font-size: 14px;
      visibility: hidden;
      margin-right: 6px;
      color: var(--easyv-primary-color);
      margin-left: 4px;
    }
  }
}

.screenName:hover {
  & > p {
    color: #3a89fe;
  }
}

:global {
  .@{prefixCls} {
    padding-bottom: 71%;
    position: relative;
    cursor: pointer;

    &-back {
      position: absolute;
      top: 22px;
      bottom: 0;
      left: 0;
      right: 0;
      border-radius: 2px;
      background: #1f212c;
      box-shadow: 0px 16px 16px rgba(0, 0, 0, 0.08);
    }

    &-img-wrapper {
      position: absolute;
      top: 0;
      padding: 0 17px;
      z-index: 1;
      width: 100%;
      height: calc(~'100% - 64px');
    }

    &-img {
      height: 100%;
      position: relative;
      cursor: pointer;

      .img {
        border: 1px solid var(--easyv-background-6);
        border-top-left-radius: 2px;
        border-top-right-radius: 2px;
        transition: transform 0.2s;
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;

        img {
          width: 100%;
          height: 100%;
          object-fit: contain;
          background-color: rgb(24, 25, 38);
        }

        &:after {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          opacity: 0;
          background-color: rgba(0, 0, 0, 0.8);
        }
      }

      &:hover {
        .img {
          transform: scale(1.05);

          &:after {
            opacity: 1;
          }
        }
      }

      &:hover &-operate {
        opacity: 1;
      }

      &-operate {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        opacity: 0;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;

        button {
          margin: 12px auto;
        }

        .drag {
          cursor: move;
          width: 28px;
          text-align: center;

          &:hover {
            color: var(--easyv-primary-color);
          }
        }
      }

      &-tag {
        position: absolute;
        top: -1px;
        right: -1px;
        line-height: 16px;
        font-size: 14px;
        border-bottom-left-radius: 8px;
        // border-top-right-radius: 8px;
        box-shadow: inset 1px 1px 2px rgba(233, 236, 255, 0.25);
        padding: 4px 6px;
        z-index: 2;

        &.enjoy {
          background: linear-gradient(114.05deg, #4255ff 18.64%, #a2acff 86.51%), #ffffff;
        }

        &.advance {
          background: linear-gradient(111.28deg, #007ff4 19.99%, #7ebdfc 94.39%), #ffffff;
        }

        &.disabled {
          background: linear-gradient(0deg, #86909f, #86909f), #ffffff;
        }
      }
    }

    &-content {
      position: absolute;
      z-index: 2;
      bottom: 0;
      left: 0;
      background-image: url(../../../../../images/screen_bg.png);
      background-size: 109% 106%;
      background-position: left top;
      background-origin: border-box;
      background-repeat: no-repeat;
      width: 100%;
      // height: 108px;
      // padding: 50px 16px 16px;
      height: 81px;
      padding: 21px 16px 16px;
      border-radius: 4px;

      &-title {
        display: flex;
        align-items: center;
        font-weight: 500;
        font-size: 14px;
        line-height: 20px;

        &-row {
          display: flex;
          justify-content: space-between;
          align-items: center;
          width: 100%;
          span:nth-of-type(1) {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            line-height: 30px;
            width: 200px;
          }

          &-purchased {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            font-size: 12px;
            padding: 4px 8px;
            width: 40px;
            height: 20px;
            background: #5a5d69;
            border-radius: 2px;
          }
        }

        &-checkbox {
          margin-right: 8px;
          flex-shrink: 0;
        }
      }

      &-name {
        width: 100%;
      }

      &-desc {
        font-size: 12px;
        line-height: 17px;
        display: flex;
        flex-flow: row;
        justify-content: space-between;
        color: #b4b7c1;

        span:first-child {
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
        }

        span:last-child {
          flex-shrink: 0;
          margin-left: 4px;
        }
      }
    }

    &.disabled {
      .@{prefixCls}-content {
        &-title,
        &-desc span {
          opacity: 0.2;
        }
      }
    }
  }
}
