form[data-op3-element-options-type="fieldset"] {
    // Label spacing visible only if label is visible.
    &[data-op3-parent-options-property-value-labelDisplay="none"] {
        .op3-toolbar-list-item[data-op3-content-item-name="text-font"],
        .op3-toolbar-list-item[data-op3-content-item-name="text-size"],
        .op3-toolbar-list-item[data-op3-content-item-name="text-styling"],
        .op3-toolbar-list-item[data-op3-content-item-name="color-label"],
        .op3-element-options-property[data-op3-element-options-property-id="labelSpacing"] {
            display: none;
        }
    }
}

form[data-op3-element-options-type="fieldset"],
form[data-op3-element-options-type$="form"] {
    // Horizontal/vertical alignment.
    .op3-element-options-property[data-op3-element-options-property-id="alignItems"],
    .op3-element-options-property[data-op3-element-options-property-id="justifyContent"],
    .op3-element-options-property[data-op3-element-options-property-id="justifyContent"] .jquery-select-buttons-option[data-jquery-select-buttons-option-value="normal"] {
        display: none;
    }

    .op3-element-options-property[data-op3-element-options-property-id="flexDirection"][data-op3-element-options-property-value="column"] {
        ~ .op3-element-options-property[data-op3-element-options-property-id="alignItems"] {
            display: flex;
        }
    }

    .op3-element-options-property[data-op3-element-options-property-id="flexDirection"][data-op3-element-options-property-value="row"] {
        ~ .op3-element-options-property[data-op3-element-options-property-id="alignItems"] {
            display: flex;

            [data-jquery-select-buttons-option-value="flex-start"] .jquery-select-buttons-option-icon::before { content: $op3-icon-align-vertical-top; }
            [data-jquery-select-buttons-option-value="center"] .jquery-select-buttons-option-icon::before { content: $op3-icon-align-vertical-middle; }
            [data-jquery-select-buttons-option-value="flex-end"] .jquery-select-buttons-option-icon::before { content: $op3-icon-align-vertical-bottom; }
        }

        ~ .op3-element-options-property[data-op3-element-options-property-id="justifyContent"] {
            display: flex;

            [data-jquery-select-buttons-option-value="flex-start"] .jquery-select-buttons-option-icon::before { content: $op3-icon-align-horizontal-left; }
            [data-jquery-select-buttons-option-value="center"] .jquery-select-buttons-option-icon::before { content: $op3-icon-align-horizontal-middle; }
            [data-jquery-select-buttons-option-value="flex-end"] .jquery-select-buttons-option-icon::before { content: $op3-icon-align-horizontal-right; }
        }
    }

    // Fields sizing presets.
    .form-fields-sizing-presets__list {
        display: none;
    }

    &[data-op3-parent-options-property-value-flexDirection="column"] .form-fields-sizing-presets__list--flex-direction-column,
    &[data-op3-parent-options-property-value-flexDirection="row"] .form-fields-sizing-presets__list--flex-direction-row {
        display: grid;
    }
}

form[data-op3-element-options-path*="/form/"],
form[data-op3-element-options-path*="/contactform/"],
form[data-op3-element-options-path*="/loginandsignupform/"],
form[data-op3-element-options-path*="/userprofileform/"],
form[data-op3-element-options-path*="/fieldset/"] {
    .op3-element-options-container {
        margin: 0;
        padding-top: 0;
    }

    &[data-op3-element-options-type="fieldset"],
    &[data-op3-element-options-type="input"],
    &[data-op3-element-options-type="select"],
    &[data-op3-element-options-type="textarea"],
    &[data-op3-element-options-type="checkbox"],
    &[data-op3-element-options-type="radiobutton"],
    &[data-op3-element-options-type="button"] {
        // Form fields sizing flex basis (width presets).
        &[data-op3-parent-options-property-value-formFlexDirection="row"] {
            .op3-element-options-property[data-op3-element-options-property-id="formFieldsSizingFlexBasisStepsAndSpan"] {
                display: flex;

                ~ .op3-element-options-property[data-op3-element-options-property-id="width"] {
                    &::before,
                    .op3-element-options-label-group {
                        display: none;
                    }

                    .jquery-input-range-widget {
                        #sidebar & {
                            margin-top: -36px;
                        }

                        #toolbar & {
                            margin-top: -10px;
                        }
                    }
                }

                &:not([data-op3-element-options-property-value=""]):not([data-op3-element-options-property-value="0"]) {
                    ~ .op3-element-options-property[data-op3-element-options-property-id="width"] {
                        display: none;
                    }
                }
            }
        }

        // Disable margins.
        // @todo - do we really need to do so???
        .op3-element-options-group[data-op3-element-options-group-id="positioning"] {
            .op3-boxmodel[data-boxmodel-id$="-boxModel"] {
                .op3-boxmodel-margin-top,
                .op3-boxmodel-margin-bottom,
                .op3-boxmodel-margin-left,
                .op3-boxmodel-margin-right {
                    pointer-events: none;
                    opacity: 0.5;

                    & + .op3-boxmodel-handler {
                        display: none;
                    }
                }
            }
        }
    }
}
