.msp-right-controls {
    padding-top: $control-spacing;
}

.msp-section-header {
    height: $row-height;
    line-height: $row-height;
    margin-top: $control-spacing;
    margin-bottom: $control-spacing;
    text-align: right;
    padding: 0 $control-spacing;
    font-weight: bold;
    background: $default-background;
    // border-right: $control-spacing solid $entity-color-Group; // TODO separate color
    border-bottom: 1px solid $entity-color-Group; // TODO separate color
    // border-bottom: 1px solid $entity-color-Group; // TODO separate color

    > .msp-icon {
        display: block;
        float: left;
    }
}

.msp-current-header {
    height: $row-height;
    line-height: $row-height;
    margin-bottom: $control-spacing;
    text-align: center;
    font-weight: bold;
    background: $default-background;
}

.msp-btn-row-group {
    display:flex;
    flex-direction:row;
    height: $row-height;
    margin-top: 1px;
    width: 100%;

    > button {
        margin: 0;
        flex: 1 1 auto;
        margin-right: 1px;
        height: $row-height;
    }

    > button:last-child {
        margin-right: 0;
    }
}

.msp-select-row {
    display:flex;
    flex-direction:row;
    height: $row-height;
    width: inherit;

    > select {
        margin: 0;
        flex: 1 1 auto;
        margin-right: 1px;
        height: $row-height;

        text-align-last: center;
        background: none !important;
        padding: 0 $control-spacing;

        > option[value = _] {
            display: none;
        }
    }

    > select:last-child {
        margin-right: 0;
    }
}

.msp-state-list {
    list-style: none;
    margin-top: $control-spacing;

    > li {
        position: relative;

        > button:first-child {
            border-left: $control-spacing solid color-increase-contrast($default-background, 12%) !important;
        }

        > div {
            position: absolute;
            right: 0;
            top: 0;
        }
    }

    button {
        margin-bottom: 1px;
        text-align: left;
    }
}

.msp-tree-row {
    position: relative;
    height: $row-height;
    line-height: $row-height;
    background: color-lower-contrast($control-background, 4%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 1px;
    padding-left: $row-height;
    padding-right: 2 * $row-height + $control-spacing;
    border-left: 1px solid $entity-color-Group; // TODO custom color
    // border-bottom-left-radius: $control-spacing;

    &-current {
        // background: $control-background;

        a {
            color: $font-color;
        }

        a:hover, a:hover > small {
            color: color-lower-contrast($font-color, 24%);
        }
    }

    a {
        display: block;
    }

    a > small {
        color: $font-color;
    }

    a:hover {
        font-weight: bold;
        text-decoration: none;
    }
}

.msp-tree-remove-button {
    position: absolute;
    right: $row-height;
    top: 0;
    width: $row-height;
    font-size: 80%;
    color: color-lower-contrast($font-color, 24%);
}

.msp-tree-toggle-exp-button {
    position: absolute;
    left: 0;
    top: 0;
    width: $row-height;
    padding: 0;
    color: color-lower-contrast($font-color, 24%);
}

.msp-tree-visibility {
    position: absolute;
    right: 0;
    top: 0;
    width: $row-height;
    font-size: 80%;

    &-hidden {
        color: color-lower-contrast($font-color, 36%);
    }
}

.msp-tree-children {
    margin-left: $control-spacing;
}

.msp-log-list {
    list-style: none;

    > li {
        background: $msp-form-control-background;
        margin-bottom: 1px;
        padding: 3px 6px;
    }
}

.msp-viewport-top-left-controls {
    position: absolute;
    left: $control-spacing;
    top: $control-spacing;
    z-index: 10000;

    .msp-traj-controls {
        line-height: $row-height;
        float: left;
        margin-right: $control-spacing;
        background-color: $msp-form-control-background;

        > span {
            color: $font-color;
            margin-left: $control-spacing;
            margin-right: $control-spacing;
            font-size: 85%;
            display: inline-block;
        }
    }

    .msp-state-snapshot-viewport-controls {
        line-height: $row-height;
        float: left;
        margin-right: $control-spacing;

        > button {
            background-color: $msp-form-control-background;
        }

        > select {
            display: inline-block;
            width: 200px;
            margin-right: $control-spacing;
        }
    }

    .msp-animation-viewport-controls {
        line-height: $row-height;
        float: left;
        margin-right: $control-spacing;
        position: relative;
        // background: $default-background;

        > div:first-child {
            position: relative;
            display: inline-block;

            > button {
                position: relative;
            }
        }

        .msp-animation-viewport-controls-select {
            width: 290px;
            position: absolute;
            left: 0;
            margin-top: $control-spacing;
            background: $control-background;

            .msp-control-row:first-child {
                margin-top: 0;
            }
        }
    }
}

.msp-param-object-list-item {
    margin-top: 1px;
    position: relative;
    > button {
        text-align: left;
        > span {
            font-weight: bold;
        }
    }
    > div {
        position: absolute;
        right: 0;
        top: 0
    }
}

.msp-state-actions {
    .msp-transform-wrapper:last-child {
        margin-bottom: 10px;
    }
}