form[data-op3-element-options-type="courseinfo"] {
    .op3-element-options-property[data-op3-element-options-property-id="justifyContent"] .jquery-select-buttons-widget .jquery-select-buttons-option-icon {
        transform: rotate(-90deg);
    }

    &[data-op3-parent-options-property-value-visibleLessonsCount="0"][data-op3-parent-options-property-value-visibleAuthor="0"][data-op3-parent-options-property-value-visibleProgressStatus="0"][data-op3-parent-options-property-value-visibleTaxonomy1="0"],
    &[data-op3-parent-options-property-value-visibleLessonsCount="0"][data-op3-parent-options-property-value-visibleAuthor="0"][data-op3-parent-options-property-value-visibleProgressStatus="0"][data-op3-parent-options-property-value-visibleTaxonomy2="0"],
    &[data-op3-parent-options-property-value-visibleLessonsCount="0"][data-op3-parent-options-property-value-visibleAuthor="0"][data-op3-parent-options-property-value-visibleTaxonomy1="0"][data-op3-parent-options-property-value-visibleTaxonomy2="0"],
    &[data-op3-parent-options-property-value-visibleLessonsCount="0"][data-op3-parent-options-property-value-visibleProgressStatus="0"][data-op3-parent-options-property-value-visibleTaxonomy1="0"][data-op3-parent-options-property-value-visibleTaxonomy2="0"],
    &[data-op3-parent-options-property-value-visibleAuthor="0"][data-op3-parent-options-property-value-visibleProgressStatus="0"][data-op3-parent-options-property-value-visibleTaxonomy1="0"][data-op3-parent-options-property-value-visibleTaxonomy2="0"] {
        .op3-toolbar-list-item[data-op3-content-item-name="courseinfo-block-order"] {
            display: none;
        }
    }

    &[data-op3-parent-options-property-value-visibleTaxonomy1="0"][data-op3-parent-options-property-value-visibleTaxonomy2="0"] {
        .op3-toolbar-list-item[data-op3-content-item-name="courseinfo-taxonomies"] {
            display: none;
        }
    }

    &[data-op3-parent-options-property-value-visibleLessonsCount="0"] .op3-element-options-property-sort__item--lessonsCount,
    &[data-op3-parent-options-property-value-visibleAuthor="0"] .op3-element-options-property-sort__item--author,
    &[data-op3-parent-options-property-value-visibleProgressStatus="0"] .op3-element-options-property-sort__item--progressStatus,
    &[data-op3-parent-options-property-value-visibleTaxonomy1="0"] .op3-element-options-property-sort__item--taxonomy1,
    &[data-op3-parent-options-property-value-visibleTaxonomy2="0"] .op3-element-options-property-sort__item--taxonomy2 {
        display: none;
    }
}

form[data-op3-element-options-path*="/courseinfo/"] {
    &[data-op3-element-options-type="button"] {
        &:not([data-op3-element-options-spec^="buttontaxonomy"]) .op3-toolbar-list-item[data-op3-toolbar-nav-id="button"],
        .op3-toolbar-list-item[data-op3-toolbar-nav-id="styles-and-presets"],
        .op3-toolbar-list-item[data-op3-toolbar-nav-id="text-align"],
        .op3-toolbar-list-item[data-op3-toolbar-nav-id="alignment"],
        .op3-toolbar-list-item[data-op3-toolbar-nav-id="link"],
        .op3-toolbar-list-item[data-op3-content-item-name="button-sizing"],
        .op3-toolbar-list-item[data-op3-content-item-name="button-subtext"],
        .op3-element-options-property[data-op3-element-options-property-id="op3Icon"],
        .op3-element-options-property[data-op3-element-options-property-id="marginTop"],
        .op3-element-options-property[data-op3-element-options-property-id="marginBottom"],
        .op3-element-options-property[data-op3-element-options-property-id="iconColorHover"] {
            display: none;
        }

        .op3-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;
                }
            }
        }

        // Display option's computed method will target parent element (as
        // set in op3-link-properties.js computed decorator) and may result
        // invalid rule (we're forcing display:none for buttons that have
        // no taxonomy icon).
        &:not([data-op3-parent-options-property-value-courseInfoHasTaxonomyIcon]),
        &[data-op3-parent-options-property-value-courseInfoHasTaxonomyIcon=""],
        &[data-op3-parent-options-property-value-courseInfoHasTaxonomyIcon="0"] {
            .op3-element-options-property[data-op3-element-options-property-id="visible"] {
                .toggle-switch {
                    pointer-events: none;
                }

                .toggle-switch-wrapper {
                    opacity: 0.8;
                    background: #8e8e8e;
                }

                .toggle-switch-content {
                    transform: none;
                }

                .toggle-switch-handle::before {
                    content: "\f2ab";
                    position: absolute;
                    display: block;
                    top: 50%;
                    left: 50%;
                    line-height: 1;
                    font-family: "op3-icons";
                    color: #8e8e8e;
                    transform: translate(-50%, -50%);
                }

                ~ * {
                    display: none;
                }

                &::after {
                    content: "Icon can not be visible be cause selected taxonomy is not set on current post.";
                    margin: 0.8em 0 0 0;
                    font-size: 0.75em;
                    font-style: italic;
                    color: #8e8e8e;
                }
            }
        }
    }
}
