@import (reference) '../theme/variables/antdVariables.less';

// 默认行间距
@baseLineHeight: 8px;

.ued-form-list {

    &-editor {
        & > * {
            pointer-events: none;
        }
    }

    &-wrapper {
        display: flex;
        flex-direction: column;


        &-header,
        &-footer {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            // min-height: 24px;
            height: fit-content;
        }

        &-footer {
            margin-top: @baseLineHeight;
            min-height: 0px;
        }

        &-header {
            max-height: 32px;
            padding: 0;
            .ued-form-list-common-title {
                // 主标题
                & > .ued-form-group-title {
                    font-size: @font-size-base;
                }
            }

            &-control {
                display: flex;
                flex-direction: row;
                justify-content: flex-start;
                align-items: center;
            }

            &-selectLabel {
                padding: 0 8px;
                color: @primary-color;
                height: 24px;
                line-height: 24px;
            }
        }

        &-content {
            flex: 1;
        }

        &-tableWrapper {
            margin-top: @baseLineHeight;

            & > form > div.@{ant-prefix}-row {
                margin: 0px !important;
                display: block;
                width: 100%;
            }

        }
    }

    &-common {
        &-title {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-content: center;
            // height: 24px;
            label.@{ant-prefix}-radio-wrapper,
            label.@{ant-prefix}-checkbox-wrapper {
                line-height: 24px;
                margin-right: 8px;
            }

            // 子项标题
            & > .ued-form-group-title {
                min-height: 0px !important;
                font-size: @font-size-base - 1px;
                font-weight: 500;
                color: #292B33;
            }
        }
    }

    &-wrapperItem {

        .@{ant-prefix}-collapse,
        .@{ant-prefix}-collapse-content {
            background-color: transparent;
            border: none !important;
        }

        .@{ant-prefix}-collapse-header {
            background: transparent;
            padding: 0 !important;
        }

        .@{ant-prefix}-collapse-content-box {
            background-color: transparent;
            padding: 0 !important;

            // 表单默认白色底 是否要替换成透明？ 
            // .ued-legacy-form-wrap {
            //     background-color: transparent;
            // }
        }

        .@{ant-prefix}-collapse-header-text {
            height: 100%;
        }

        .@{ant-prefix}-collapse-arrow {
            right: 4px !important;

            &::before {
                content: '';
                display: block;
                width: 1px;
                height: 11px;
                background-color: #DCDDE5;
                position: absolute;
                left: -8px;
                top: calc(50% - 6px);
            }
        }

        &-panel {
            border-bottom: none !important;
            margin-top: @baseLineHeight;
        }

        &-header {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            height: 32px;

            &-line {
                border-bottom: 1px solid #EBEBF0;
            }

            &-actions {
                &-fold {
                    padding-right: 24px;
                }

                .@{ant-prefix}-btn-text {
                    padding: 4px !important;
                    margin-right: 8px;
                }

                // 更多按钮中的样式
                &-overlay {
                    padding-top: 0px !important;
                    .@{ant-prefix}-popover-arrow {
                        display: none;
                    }
                    .@{ant-prefix}-popover-inner-content {
                        padding: 4px !important;
                        display: flex;
                        flex-direction: column;

                        & > button {
                            text-align: left;
                            padding: 4px 8px;
                        }
                    }
                }
            }
        }
    }
}