rn-formula-builder-dialog .modal__content{
    margin:0 !important;
    padding: 1px !important;
}

rn-formula-builder .textarea {
    position: relative;
}

rn-formula-builder .textarea .cm-editor {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

rn-formula-builder .textarea .cm-scroller {
    overflow: auto;
}

rn-formula-builder-dialog footer
{
    margin:0 !important;
}

.cm-tooltip-autocomplete li .returnType
{
    margin-left: 15px;
    display: inline-block;
    float: right;
    font-style: italic;
    color: #7B7B7B;
}

.cm-tooltip-autocomplete li[aria-selected=true] .returnType,
.cm-tooltip-autocomplete li[aria-selected=true] .cm-completionDetail,
.cm-tooltip-autocomplete li[aria-selected=true] .cm-completionLabel
{
    color: white !important;
}

.cm-tooltip-autocomplete li .cm-completionDetail{
    color: #7B7B7B !important;
    font-style: italic;
}



.cm-tooltip-autocomplete li .cm-completionLabel{
    color: black;
    font-weight: bold;
}

/* ============================================
   PHP Editor Toolbar
   ============================================ */
.phpEditorToolbar {
    display: flex;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Preview Split Button ── */
.phpEditorToolbar .phpPreviewBtnGroup {
    display: inline-flex;
    position: relative;
}

.phpEditorToolbar .phpPreviewBtnGroup .phpPreviewBtn {
    border: 1px solid #2196F3;
    background: #2196F3;
    color: #fff;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px 0 0 4px;
    transition: background 150ms ease;
    outline: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.phpEditorToolbar .phpPreviewBtnGroup .phpPreviewBtn:hover {
    background: #1976D2;
}

.phpEditorToolbar .phpPreviewBtnGroup .phpPreviewBtn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.phpEditorToolbar .phpPreviewBtnGroup .phpPreviewDropdown {
    border: 1px solid #2196F3;
    border-left: 1px solid rgba(255,255,255,0.3);
    background: #2196F3;
    color: #fff;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 0 4px 4px 0;
    transition: background 150ms ease;
    outline: none;
    display: inline-flex;
    align-items: center;
}

.phpEditorToolbar .phpPreviewBtnGroup .phpPreviewDropdown:hover {
    background: #1976D2;
}

.phpEditorToolbar .phpPreviewBtnGroup.no-order .phpPreviewBtn {
    border-radius: 4px;
}

.phpEditorToolbar .phpPreviewBtnGroup.no-order .phpPreviewDropdown {
    display: none !important;
}

/* ── Wizard Button ── */
.phpEditorToolbar .phpWizardBtn {
    border: 1px solid #4CAF50;
    background: #4CAF50;
    color: #fff;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    transition: background 150ms ease;
    outline: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.phpEditorToolbar .phpWizardBtn:hover {
    background: #388E3C;
}

/* ── AI Button ── */
.phpEditorToolbar .phpAIBtn {
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    transition: all 150ms ease;
    outline: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.phpEditorToolbar .phpAIBtn:hover {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.phpEditorToolbar .phpAIBtn svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   Preview Result
   ============================================ */
.phpPreviewResultWrapper {
    margin-top: 10px;
    animation: phpPreviewFadeIn 0.3s ease-out;
}

.phpPreviewResultLabel {
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
    font-size: 13px;
}

.phpPreviewResultContainer {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
    padding: 10px;
    font-size: 13px;
    word-break: break-word;
}

@keyframes phpPreviewFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.formulaFunctionItem{
    cursor: pointer;
    transition: background-color 200ms ease-in-out;
    }

.formulaFunctionItem:hover{
    background-color: #f9f9f9;

}

.formulaFunctionItem:not(:last-child){
    border-bottom: 1px solid #eee;
}
.group_row{
    padding: 10px;
    border-top: 1px solid #ccc;
}

.group_row:first-child{
    border-top:none;
}

.group{
    border: 1px solid #ccc;
    border-radius: 5px;
}

.group_header{
    font-weight: bold;
    background-color: #e4f1fe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.order_scan_item{
    cursor: pointer;

}

.order_scan_item:hover{
    background-color: #fafafa;

}
rnparser-field-wizard-dialog .modal__content{
    overflow-x: hidden !important;
}