
@pro-table-search-prefix-cls: ~'ag-grid-table-search';

@pro-table-form-prefix-cls: ~'ag-grid-table-form';

.@{pro-table-search-prefix-cls} {
    margin-bottom: 8px;
    padding: 8px;
    // padding-bottom: 0;
    // 背景由组件读取 Ant Design 主题 token，支持浅色和深色。@author nokecy

    &.@{pro-table-form-prefix-cls} {
        margin: 0;
        padding: 0 16px;
        overflow: unset;
    }

    &-light {
        margin-bottom: 0;
        padding: 16px 0;
    }

    &-form-option {
        .ant-form-item {
            margin: 0;
        }

        .ant-form-item-label {
            opacity: 0;
        }

        .ant-form-item-control-input {
            justify-content: flex-start;
        }
    }

    // 多选下拉框标签省略样式
    .ant-select-multiple {
        max-width: 200px; // 限制整个选择器的最大宽度

        .ant-select-selector {
            max-width: 100%;
            overflow: hidden; // 防止内容溢出

            .ant-select-selection-overflow {
                max-width: 100%;
                flex-wrap: nowrap; // 禁止换行
                overflow: hidden; // 隐藏溢出内容
            }

            .ant-select-selection-item {
                max-width: 100px; // 单个标签最大宽度
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                flex-shrink: 0; // 防止标签被压缩
            }
        }
    }
}

@media (max-width: 575px) {
    .@{pro-table-search-prefix-cls} {
        height: auto !important;
        padding-bottom: 24px;

        .ant-form-item-label {
            min-width: 80px;
            text-align: left;
        }
    }
}
