.gallery-widget-content {
  display: flex;
  margin: var(--oio-margin) 0;

  .gallery-module-category {
    background: var(--oio-background);
    border: 1px solid var(--oio-border-color);
    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    width: 250px;
    margin-right: var(--oio-margin);
    height: calc(100vh - 171px);
    overflow: scroll;
    scrollbar-width: 0;

    .create-app-btn {
      margin: 16px;
      width: calc(100% - 32px);
    }

    &::-webkit-scrollbar {
      display: none;
    }

    .gallery-module-category-title {
      font-size: 16px;
      color: var(--oio-text-color);
      font-weight: 500;
      padding: 16px;
      display: flex;
      align-items: center;

      i {
        margin-right: 8px;
        color: var(--oio-primary-color);
        font-size: 14px;
      }
    }

    .gallery-module-category-item {
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      padding: 9px 12px;
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: var(--oio-text-color-secondary);
      font-weight: 400;

      &:hover,
      &.active {
        background: rgba(3, 91, 255, 0.1);
        color: var(--oio-primary-color);
        font-weight: 500;
      }
    }
  }

  .gallery-container {
    flex: 1;
    min-width: 1074px;
    overflow: scroll;
    .action {
      margin-bottom: 24px;
    }

    &::-webkit-scrollbar {
      display: none;
    }

    &.gallery-container-empty {
      height: auto;
      align-items: center;
      justify-content: center;
      flex-flow: row;
    }

    .cardList {
      display: flex;
      width: 100%;
      flex-wrap: wrap;
      gap: var(--oio-margin);
    }

    .page {
      flex-shrink: 0;
      margin-top: 8px;
      text-align: right;
    }

    .cardBox {
      width: calc(20% - var(--oio-margin) * 4 / 5);
    }

    .card {
      height: 100px;
      display: flex;
      justify-content: space-between;
      border: 1px solid var(--oio-border-color);
      border-radius: 4px;
      box-shadow: var(--oio-box-shadow);
      background: var(--oio-background);
      padding: 18px;
      box-sizing: border-box;
      position: relative;
    }

    .card .logo {
      width: 60px;
      height: 60px;
      margin-right: 12px;
      border-radius: 10px;
    }

    .application-content {
      width: 49px;
      height: 27px;
      position: absolute;
      left: 0;
      top: 0;
      border-top-left-radius: 4px;
      overflow: hidden;
    }

    .application-text {
      position: absolute;
      display: flex;
      align-items: flex-start;
    }

    .title {
      width: 100%;
      font-family: PingFangSC-Medium;
      font-size: 14px;
      color: var(--oio-text-color);
      font-weight: 500;
      overflow: hidden;

      .title-module {
        overflow: hidden;
        display: flex;
        justify-content: space-between;

        .module-name {
          flex: 1;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
      }

      .new-icon {
        width: 28px;
        height: 14px;
        font-size: 12px;
        background-image: linear-gradient(90deg, var(--oio-primary-color) 0%, #aa47ff 100%);
        border-radius: 10px;
        text-align: center;
        color: #fff;
        margin-left: 4px;

        span {
          line-height: 14px;
          display: block;
          transform: scale(0.9);
        }
      }
    }

    .display-name {
      margin-right: 10px;
      font-family: PingFangSC-Regular;
      font-size: 12px;
      color: var(--oio-text-color-secondary);
      letter-spacing: 0;
      font-weight: 400;
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .appInfo {
      width: calc(100% - 66px - 12px);
      display: flex;
      justify-content: space-between;
      margin-right: 0;
    }

    .info {
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .state {
      height: 17px;
      line-height: 17px;
      font-family: PingFangSC-Regular;
      font-size: 12px;
      color: #78c228;
      letter-spacing: 0;
      text-align: center;
      font-weight: 400;
      width: fit-content;
    }

    .install-action {
      text-align: center;
      background: #055dff;
      width: 40px;
      border-radius: 15px;
      font-family: PingFangSC-Regular;
      font-size: 12px;
      cursor: pointer;
    }

    .install-action-font {
      text-align: center;
      font-family: PingFangSC-Regular;
      font-size: 12px;
      color: white;
    }

    .collection {
      i {
        font-size: 14px;
        cursor: pointer;

        &.active {
          color: #ffbd00;
        }
      }
    }

    .operator {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-end;
    }

    .author {
      text-align: right;
    }

    .state-box {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
    }

    .more {
      height: 17px;
      font-family: PingFangSC-Regular;
      letter-spacing: 0;
      text-align: right;
      font-weight: 400;
      cursor: pointer;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      position: relative;

      .designer-icon {
        font-size: 12px;
        margin-right: 5px;

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

      .more-icon {
        position: relative;

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

.app-gallery-popover-card {
  &.ant-popover {
    z-index: 100;
  }
  .ant-popover-inner {
    padding: 0;
  }

  .ant-popover-arrow-content,
  .ant-popover-inner {
    background: var(--oio-background);
  }

  .app-gallery-popup-content {
    z-index: 1;
    background: var(--oio-background);
    border: 1px solid var(--oio-border-color);
    box-shadow: var(--oio-box-shadow);
    border-radius: 4px;
    width: 180px;
    right: -10px;

    .list-action {
      position: relative;
      padding: 4px 0;

      &.has-border-bottom {
        &:after {
          display: block;
        }
      }

      &:after {
        display: none;
        content: '';
        position: absolute;
        border-top: 1px solid var(--oio-border-color);
        left: 12px;
        bottom: 0;
        right: 12px;
      }

      .item {
        display: flex;
        align-items: center;
        font-size: 14px;
        padding: 6px 12px;
        color: var(--oio-text-color);
        cursor: pointer;
        position: relative;

        .oio-icon {
          margin-right: 5px;
        }

        .action-label {
          flex: 1;
        }

        &:hover {
          background: rgba(3, 91, 255, 0.1);

          & > .action-label {
            color: var(--oio-primary-color);
          }

          & > .oio-icon {
            color: var(--oio-primary-color);
          }
        }
      }
    }

    &.show-popup-content {
      display: block;
    }
  }
}
