@import "app/styles/variables";

.autoscale-formula-picker {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    height: 400px;
    border-bottom: 1px solid $border-color;
    border-right: 1px solid $border-color;

    > .editor {
        flex: 1 1 100px;
    }

    > .formula-managment {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .formula-list {
        margin: 0;
    }


    .formula-list {
        height: 100%;
        overflow: auto;
        border-top: 1px solid $input-disabled-border-color;
        border-bottom: 1px solid $input-disabled-border-color;

        > .formula {
            display: flex;
            align-items: center;
            height: 24px;

            cursor: pointer;
            padding: 5px;

            > .label {
                flex: 1;
            }

            &:not(:last-child) {
                border-bottom: 1px solid $input-disabled-border-color;
            }

            &:hover {
                background: #e5e5e5;
            }
        }

        .no-formula {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 30px 10px;

            .fa-file-code-o {
                font-size: 30px;
                margin-bottom: 10px;
                color: $primary-color;
            }
        }
    }

}


bl-autoscale-formula-picker {
    .editor {
        height: 100%;
        overflow-y: hidden;
    }

    .cm-variables {
        color: map-get($success, 800);
    }

    .cm-functions {
        color: map-get($danger, 800);
    }

    .cm-math {
        color: map-get($primary, 700);
    }

    .cm-builtin {
        color: map-get($primary, 800);
    }

    .evaluation-error {
        border-bottom: 1px solid $border-color;
        border-right: 1px solid $border-color;
        border-left: 1px solid $border-color;
        color: $danger-color;
        padding: 5px;
    }

    .evaluate-formula-results {
        overflow-y: hidden;
        word-wrap: break-word;
    }
}
