.comprehensive-search {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  gap: 16px;

  &__top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  // 三等分布局样式
  &__third {
    flex: 1;
    display: flex;

    &:first-child {
      justify-content: flex-start;
    }

    &:nth-child(2) {
      justify-content: center;
    }

    &:last-child {
      justify-content: flex-end;
    }
  }

  &__new-button {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    word-wrap: break-word;
    height: 40px;
    color: #fff;
  }

  &__results-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  &__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    font-size: 14px;
  }

  &__empty {
    margin: 40px 0;
  }

  &__results {
    &--grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }

    &--list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
  }

  &__result-item {
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s;
    cursor: pointer;

    &:hover {
      border-color: #1890ff;
      box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
    }
  }

  &__result-fields {
    overflow-x: auto;

    .comprehensive-search__results--list & {
      display: flex;
      gap: 24px;
      min-width: max-content;
    }

    .comprehensive-search__results--grid & {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
  }

  &__result-field {
    font-size: 13px;
    line-height: 1.4;

    .comprehensive-search__results--list & {
      display: flex;
      flex-direction: column;
      min-width: 120px;
      flex-shrink: 0;
    }

    .comprehensive-search__results--grid & {
      display: flex;
      margin-bottom: 6px;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  &__result-field-label {
    font-weight: 500;
    color: #666;

    .comprehensive-search__results--list & {
      margin-bottom: 4px;
      font-size: 12px;
    }

    .comprehensive-search__results--grid & {
      margin-right: 8px;
      min-width: 80px;
      flex-shrink: 0;
    }
  }

  &__result-field-value {
    color: #333;

    .comprehensive-search__results--list & {
      word-break: break-word;
      font-weight: 400;
    }

    .comprehensive-search__results--grid & {
      word-break: break-word;
      flex: 1;
    }
  }

  &__result-title {
    font-size: 16px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 8px;
    line-height: 1.4;
  }

  &__result-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
  }

  &__result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  &__result-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f6f6f6;
    color: #666;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
  }
}

.comprehensive-search-modal {

  .pisell-lowcode-modal-content {
    height: 90vh;
    height: 90dvh;
  }
}