// Styles for the RTE, the whole stylesheet is used in Tiny and these are specific to it's content
// -------------------------

.umb-rte {
    position: relative;

    .umb-property-editor--limit-width();
}

.umb-rte .mce-tinymce {
    box-shadow: none;
}

.umb-rte .umb-rte-editor-con {
    height: 24px;
    visibility: hidden;
}
.umb-rte .umb-rte-editor {
    min-height: 100px;
}
.umb-rte.--initialized .umb-rte-editor-con {
    height:auto;
    min-height: 95px;
    visibility: visible;
}

.umb-rte .mce-content-body {
    background-color: @white;
    line-height: 1.5em;
    border: 1px solid @gray-8;
    padding:10px;
}

.umb-rte .mce-container {
    box-sizing: border-box;
}

.umb-rte .mce-top-part {
	position: sticky;
	top: 0;

  umb-editor-tab-bar ~ div & {
    top: 50px;
  }
}

/* make sure the menu wraps */
.umb-rte .mce-top-part.mce-container div {
    white-space: normal;
}

.umb-rte .mce-tinymce .mce-edit-area {
    border-radius: 0px !important;
}

/*
.mce-panel {
    background: @gray-10 !important;
    border-color: @gray-8 !important;
}

.mce-btn-group, .mce-btn {
    border: none !important;
    background: none !important;
}
*/

.umb-rte .mce-ico {
    text-align: center;
    font-size: 12px !important;
    /*color: @gray-1 !important;*/
}

/* Special case to support helviticons for the tiny mce button controls */
// Also used in Prevalue editor.
.mce-ico.mce-i-custom[class^="icon-"],
.mce-ico.mce-i-custom[class*=" icon-"] {
    font-family: icomoon;
    font-size: 16px !important;
}


/* pre-value editor */
.rte-editor-preval .control-group .controls > div > label {
    cursor: pointer !important;

    .mce-cmd .checkbox {
        padding-right: 0;
    }
    .mce-ico {
        line-height: 20px;
    }
}

.umb-rte .mce-toolbar .mce-btn-group {
    padding: 0;
}

.umb-rte .mce-btn {
    color: @ui-action-type;
    border-radius: 3px;
}

.umb-rte .mce-btn-group .mce-btn {
    margin-top:2px;
    margin-bottom:2px;
}

.umb-rte .mce-btn {
    button:hover {
        .mce-caret {
            border-top-color: @ui-action-type-hover;
        }
    }
}

.umb-rte .mce-btn:hover, .umb-rte .mce-btn:active {
    background: @ui-action-hover;
    border-color: transparent;
    button {
        color: @ui-action-type-hover;
        .mce-ico {
            color: @ui-action-type-hover;
        }
    }
}

.umb-rte .mce-btn.mce-active, .umb-rte .mce-btn.mce-active:active,
.umb-rte .mce-btn.mce-active:hover, .umb-rte .mce-btn.mce-active:focus {
    background: @gray-9;
    border-color: transparent;
    button {
        color: @ui-action-type-hover;
        .mce-ico {
            color: @ui-action-type-hover;
        }
        .mce-caret {
            border-top-color: @ui-action-type-hover;
        }
    }
}


.mce-menu {
    border-radius: 3px;
}

.mce-menu-item.mce-menu-item-normal.mce-stack-layout-item {
    .mce-text, .mce-ico {
        color: @ui-action-type;
    }
    &:hover {
        background: @ui-action-hover;
        .mce-text, .mce-ico {
            color: @ui-action-type-hover;
        }
    }
}

.mce-menu-item.mce-menu-item-normal.mce-stack-layout-item.mce-active {
    &, &:hover {
        background: @gray-9;
    }
    .mce-text, .mce-ico {
        color: @ui-action-type-hover;
    }
}

.umb-grid .umb-rte {
    border: 1px solid @gray-8;
    max-width: none;
}

.mce-fullscreen {
    position: absolute;

    .mce-in {
        position: fixed;
        top: 35px !important;
    }

    umb-editor__overlay, .umb-editor {
        position: fixed;
    }
}
