.pisell-pro-resource-picker {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

/**
 * antd 5 在本仓库的类名映射为 `pisell-lowcode-modal-*`（见 .cursorrules /
 * create-component-rule），保留 body padding 归零兜底，避免 token 遗漏时出现内边距。
 */
.pisell-pro-resource-picker-modal {
  .pisell-lowcode-modal-body {
    padding: 0;
  }
}

.pisell-pro-resource-picker {

  &-tabbar {
    /**
     * 视觉对齐 productSelect：sticky / padding / 背景由组件内联 style 提供，
     * 这里只保留最低限度的边界处理。
     */
    border-bottom: 1px solid #eef0f2;
  }

  &-search-fallback {
    padding: 6px;
    background: rgb(250, 250, 250);
    border-bottom: 1px solid #eef0f2;
  }

  &-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
  }

  &-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;

    /**
     * 「全选」复选框：放大文字 + 复选框本体，便于在工具栏点击。
     * antd 5 的类名经本仓库映射为 `pisell-lowcode-checkbox-*`。
     */
    .pisell-lowcode-checkbox-wrapper {
      font-size: 15px;
      line-height: 1.4;
    }

    .pisell-lowcode-checkbox-inner {
      width: 18px;
      height: 18px;

      &::after {
        // 勾选钩子按比例放大，避免在 18px 复选框里偏小
        width: 6px;
        height: 10px;
      }
    }
  }

  &-link {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #7f56d9;
    font-size: 15px;
    line-height: 1.4;
    padding: 4px 10px;
    transition: background 0.15s ease, border-color 0.15s ease;

    &:hover:not(:disabled) {
      background: #faf7ff;
      border-color: #e9d8ff;
    }

    &:disabled {
      color: #9ca3af;
      cursor: not-allowed;
    }
  }

  &-hint {
    font-size: 13px;
    color: #6b7280;
  }

  &-count {
    font-size: 13px;
    color: #6b7280;
  }

  &-list {
    padding: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;

    /**
     * Selector 响应式 grid 用 `1fr` 分列；grid item 默认 `min-width: auto`
     * 会被卡片标题（white-space: nowrap）的 min-content 撑大，从而出现横向滚动。
     * 这里强制 grid item `min-width: 0`，并让卡片自身占满列宽。
     */
    .pisell-pro-selector_layout-responsive {
      width: 100%;

      > * {
        min-width: 0;
      }
    }
  }

  &-empty {
    padding: 48px 0;
    text-align: center;
    color: #9ca3af;
  }

  &-card {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;

    &:hover:not(:disabled) {
      border-color: #b69cf8;
      background: #faf7ff;
    }

    &--selected {
      border-color: #7f56d9;
      background: #f4f0ff;
      box-shadow: 0 0 0 2px rgba(127, 86, 217, 0.12);
    }

    &--disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }
  }

  &-card-indicator {
    flex: none;
    display: inline-flex;
    align-items: center;
  }

  &-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 0;
  }

  &-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &-card-sub {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &-card-cap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &-card-cap-icon {
    flex: none;
    font-size: 14px;
    color: #6b7280;
  }

  &-footer {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
  }
}
