@prefixCls: ~'interaction';

.box {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  :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: 67.44%;
    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 16px;
      z-index: 1;
      width: 100%;
      height: calc(~'100% - 48px');
    }

    &-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;
        padding-top: 35px;

        button {
          margin: 12px auto;
        }

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

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

    &-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: 56px;
      padding: 12px 16px 0px 16px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: space-between;

      &-trashTitle {
        font-family: PingFang SC;
        font-style: normal;
        font-weight: 500;
        font-size: 14px;
        max-width: 150px;
        overflow: hidden;
        display: inline-block;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      &-screenStatus {
        font-size: 12px;
        color: #b4b7c1;
        text-align: right;

        &-statusIcon {
          width: 6px;
          height: 6px;
          display: inline-block;
          border-radius: 50%;
          color: #b4b7c1;
          background: rgba(58, 137, 254, 1);
          margin-right: 4px;
        }
      }

      &-exportMask {
        cursor: pointer;
        display: none;
        width: 16px;
        height: 16px;
        z-index: 5;
        margin-right: 8px;

        &-selectIcon {
          width: 16px;
          height: 16px;
          border-radius: 50%;
          border: 2px solid #ffffff;
          opacity: 0.36;
          text-align: center;
          display: flex;
          justify-content: center;
          align-items: center;
          transition: all 1s;

          & > i {
            font-size: 12px;
          }
        }

        &-selected {
          opacity: 1;
          background: #3888ff;
          border-color: var(--easyv-primary-color);
          color: #ffffff;
        }
      }

      &-isMultiExport {
        display: block;
      }

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

        span {
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
          line-height: 30px;
        }

        &-checkbox {
          margin-right: 8px;
        }
      }
    }
  }
}
