/* .smart-editor */

.smart-editor {
    &[right-to-left] {
        .smart-editor-toolbar:not(.smart-tooltip) {
            grid-template-areas:
                'toggleButton primary'
                'secondary secondary';
            grid-template-columns: auto minmax(0, 1fr);

            .smart-editor-toolbar-item {
                margin-left: initial;
                margin-right: var(--smart-editor-toolbar-item-margin);
            }
        }

        .smart-editor-content-container,
        .smart-editor-toolbar-items-primary,
        .smart-editor-toolbar-items-secondary,
        .smart-editor-toolbar-item[item-type="drop-down"],
        .smart-editor-toolbar-item[item-type="color-input"] {
            direction: rtl;
        }

        .smart-editor-resize-frame span {
            transform: translate(50%, -50%);

            &[position="top-left"],
            &[position="bottom-right"] {
                cursor: sw-resize;
            }

            &[position="top-right"],
            &[position="bottom-left"] {
                cursor: se-resize;
            }
        }
    }
}


/* --- Editor Input Drop Down --- */
.smart-editor-input {

    &[right-to-left] li .editor-icon::before {
        right: 0;
        left: initial;
    }
}


/* --- Editor Tooltip --- */
.smart-tooltip {
    &.smart-editor-toolbar {
        &[right-to-left]:not(.smart-editor-drop-down-toolbar) .smart-editor-toolbar-item:not(:first-of-type) {
            margin-left: initial;
            margin-right: var(--smart-editor-toolbar-item-margin);
        }
    }
}

.smart-editor-drop-down-toolbar {

    //smartTablePicker Custom Element Styles
    .smart-table-picker {
        &[right-to-left] {
            .smart-table-picker-grid {
                direction: rtl;
            }

            .smart-table-picker-button>button.smart-button {
                display: flex;
                align-items: center;
                justify-content: center;

                &::before {
                    margin-right: initial;
                    margin-left: 10px;
                }
            }
        }
    }
}