$border-color: rgba(17, 31, 44, .08);

.formula-btn {
    width: 100%;
}

.formula-dialog {
    width: 800px !important;
    height: 670px !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;

    &-header {
        display: flex;
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;

        &-subtitle {
            align-content: center;
            color: #91a1b7;
            font-size: 12px;
            font-weight: 400;
            justify-content: center;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

    .next-dialog-body {
        overflow-y: auto;
        max-height: 600px !important;
    }
}

.formula-panel {
    position: relative;
    flex: none;
    display: flex;
    flex-direction: column;
    height: 210px;
    // border: 1px solid $border-color;
    // border-radius: 8px;
    // border-top: none;

    &-header {
        padding: 0 2px 0 10px;
        display: flex;
        justify-content: space-between;
        // height: 31px;
        flex-wrap: wrap;
        line-height: 31px;
        width: 100%;
        border: 1px solid $border-color;
        border-radius: 8px 8px 0 0;
    }

    &-content {
        overflow-y: auto;
        flex: 1;
        border: 1px solid $border-color;
        border-radius: 0 0 8px 8px;
        border-top: none;
    }

    &-top {
        margin-bottom: 10px;
    }

    &-bottom {
        flex-direction: row;
        height: 300px;

        // .formula-panel {
        //     height: px;
        // }
    }
}

.formula-panel-fields {
    width: 220px;
    margin-right: 10px;
    height: 100%;

    &-item {
        position: relative;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-decoration: none;
        color: #333;
        padding: 0 6px 0 18px;
        display: block;
        height: 32px;
        font-size: 12px;
        line-height: 32px;
        cursor: pointer;

        &:hover {
            background: rgba(126, 134, 142, .08);
        }

        &-capsule {
            position: absolute;
            top: 4px;
            right: 8px;
            bottom: 4px;
            text-align: center;
            padding: 0 8px;
            line-height: 24px;
            border-radius: 4px;

            &.style-yellow {
                color: #ff9200;
                background: #fff8eb;
            }
        }

    }
}

.formula-pane-desc {
    height: 100%;
}

.formula-pane-func {
    width: 220px;
    height: 100%;
    margin-right: 10px;

}

.formula-panel-func-title {
    height: 32px;
    font-size: 12px;
    line-height: 32px;
    padding-left: 10px;
}

.formula-pane-desc {
    flex: 1;
}

.formula-panel-fields-item,
.formula-panel-func-item {
    position: relative;

    color: #333;
    padding: 0 5px 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 32px;
    font-size: 12px;
    line-height: 32px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;

    &:hover {
        background: rgba(126, 134, 142, .08);
    }

    &-capsule {
        position: absolute;
        top: 4px;
        right: 8px;
        bottom: 4px;
        text-align: center;
        padding: 0 8px;
        line-height: 24px;
        height: 24px;
        border-radius: 4px;
    }

    &-label {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
        margin-right: 40px;
    }
}

.style-yellow {
    color: #ff9200;
    background: #fff8eb;
}

.style-blue {
    color: #0089ff;
    background: #ebf6ff;
}

.style-green {
    color: #00b853;
    background: #ebfaf2;
}

.style-pruple {
    color: #8c5ffb;
    background: rgba(140, 95, 251, .1);
}

.formula-desc-item {
    height: 32px;
    line-height: 32px;
    padding: 0 6px 0 18px;
}

.cm-editor,
.formula-cmeditor-container {
    height: 100%;
}

.formula-search {
    width: 100%;
    padding: 0 8px 8px 0;
}

.next-tree-switcher.next-noline {
    width: 16px !important;
    height: 16px !important;
}

.formula-pane-func .formula-panel-func-item {
    padding-left: 34px;
}