@use "../utils/variables";

/**=====================
      Ck Editor CSS Start
==========================**/

.tox {
    &.tox-tinymce {
        border: 1px solid rgba(variables.$dark-color, 0.1) !important;
        border-radius: variables.$border-radius !important;
        padding: 0;
        min-height: 300px;
        height: auto;

        .tox-toolbar-overlord {
            background-color: unset;

            .tox-toolbar {
                background: #f9f9f9;
                border-bottom: 1px solid rgba(variables.$dark-color, 0.1);
                flex-wrap: nowrap;
                overflow: auto;

                &::-webkit-scrollbar-track {
                    -webkit-box-shadow: inset 0 0 6px #626262;
                }

                &::-webkit-scrollbar {
                    width: 4px;
                    height: 4px;
                }

                &::-webkit-scrollbar-thumb {
                    background-color: #626262;
                }
            }
        }

        .tox-edit-area__iframe {
            background-color: variables.$white;
        }

        .tox-statusbar__path {
            font-size: 14px;

        }

        .tox-statusbar {
            height: 30px !important;
            padding: 16px 12px !important;
            background-color: #f9f9f9;
            border-top: 1px solid rgba(variables.$dark-color, 0.1);
        }

        .tox-tbtn {
            svg {
                color: rgb(34 47 62 / 80%);
            }
        }
    }

    &:not([dir=rtl]) {
        .tox-toolbar__group {
            flex-wrap: nowrap;

            &:not(:last-of-type) {
                border-right: 1px solid rgba(variables.$dark-color, 0.1) !important;
            }
        }
    }
}

.ck-rounded-corners {
    background-color: variables.$white !important;
    border: 1px solid rgba(variables.$dark-color, 0.45) !important;
    border-radius: variables.$border-radius !important;
    width: 100% !important;

    .ck-editor__top {
        .ck-sticky-panel {
            .ck-sticky-panel__content {
                .ck-toolbar {
                    border: 1px solid transparent;
                    border-radius: 4px !important;
                    border-bottom-left-radius: 0 !important;
                    border-bottom-right-radius: 0 !important;
                    padding: 6px 16px;
                    border-bottom: 1px solid rgba(variables.$dark-color, 0.45);
                }

                &.ck-sticky-panel__content_sticky {
                    position: unset;
                }
            }
        }
    }

    .ck.ck-editor__main {
        >.ck-editor__editable {
            &.ck-rounded-corners {
                border: 1px solid transparent !important;
                border-radius: 0px !important;
                border-bottom-left-radius: 4px !important;
                border-bottom-right-radius: 4px !important;
                padding: 10px;
                min-height: 270px;

                p {
                    color: variables.$dark-color;
                    font-size: 14px;
                    margin: 0;
                    margin-bottom: 6px;
                }
            }

            &.ck-focused {
                &:not(.ck-editor__nested-editable) {
                    box-shadow: none;
                }
            }
        }
    }
}

/**=====================
      Ck Editor CSS End
==========================**/