#template-menu-button {
    right: -2px;
    position: absolute;
    bottom: -30px;
    background: none;
    border: 1px solid #e5e5e5;
    border-top: none;
    font-size: 95%
    /*border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;*/
}

    #template-menu-button:before {
        font-size: 120%;
    }

    #template-menu-button:hover, #template-menu-button:active, #template-menu-button:focus {
        outline: 1px;
    }

#newTemplateNameContainer {
    outline: none;
}

#body1 #mailTemplateModal {
    min-height: 300px;
    max-height: 90%;
    min-width: 500px;
}

    #body1 #mailTemplateModal .grid1 {
        width: 100%;
    }

        #body1 #mailTemplateModal .grid1 tr > th:nth-of-type(1),
        #body1 #mailTemplateModal .grid1 tr > td:nth-of-type(1) {
            width: 19px;
            margin: 0;
            padding: 0;
            padding-left: 2px;
        }

        #body1 #mailTemplateModal .grid1 input[type = "text"] {
            width: 100%;
        }

    #body1 #mailTemplateModal > .modal-content.content {
        min-height: 200px;
        height: calc(100% - 58px - 54px - 13px);
    }

.mce-container-body.mce-stack-layout {
    height: 100%;
}

    .mce-container-body.mce-stack-layout > .mce-edit-area.mce-container.mce-panel.mce-stack-layout-item.mce-last {
        height: calc(100% - 34px);
    }

#body1 #mailModal.modal {
    height: 90%;
    width: 70%;
    max-width: 1050px;
    max-height: 800px;
}

.mail_editor_content .form-type2.activity-attributes {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    height: 100%;
}

.mce-tinymce.mce-container.mce-panel {
    height: 100%;
}

.mail_editor_content .form-type2.activity-attributes .modal-section.email-controls {
    flex: 0 0 auto;
}

.mail_editor_content .form-type2.activity-attributes .modal-section.email-body {
    flex: 1 0 auto;
}

.modal-section.email-body > div:nth-of-type(1) {
    height: calc(100% - 64px);
    min-height: 138px;
    position: relative;
}

    .modal-section.email-body > div:nth-of-type(1) > div:nth-of-type(1) {
        height: 100%;
    }

#mailBody {
    width: 100%;
    height: 100%;
    margin-top: 10px;
}

.mail_editor_tools a {
    font-size: 13px;
    margin-left: 10px;
    position: relative;
    top: -2px;
}

html body .modal .mail_editor_content {
    /*width: 480px;
    height: 400px;*/
    height: 100%;
    position: relative;
}

.mail_editor_content input[type="text"] {
    width: 370px;
}

.mail_editor_content .mce-tinymce .mce-btn button,
.mail_settings_content .mce-tinymce .mce-btn button {
    padding: 0 7px;
    font-size: 12px;
}

.mail_editor_content .mce-tinymce .mce-btn .mce-caret,
.mail_settings_content .mce-tinymce .mce-btn .mce-caret {
    margin-top: 5px;
}

.mail_editor_content .mce-tinymce .mce-btn i,
.mail_settings_content .mce-tinymce .mce-btn i {
    width: initial;
    font-size: 13px;
}

html body .modal .mail_settings_content {
    width: 470px;
    height: 240px;
}

.mail_settings_content label {
    margin-bottom: 5px;
    display: block;
}

body .mce-window .mce-foot .mce-btn.mce-primary {
    border: none;
    background: transparent;
}

    body .mce-window .mce-foot .mce-btn.mce-primary button span {
        font-weight: bold;
    }

body .mce-window .mce-foot .mce-btn.mce-last,
body .mce-window .mce-foot .mce-btn.mce-last button:hover,
body .mce-window .mce-foot .mce-btn.mce-last button:focus,
body .mce-window .mce-foot .mce-btn.mce-last button:active,
body .mce-window .mce-btn.mce-listbox button:hover,
body .mce-window .mce-btn.mce-listbox button:focus,
body .mce-window .mce-btn.mce-listbox button:active,
body .mce-window button.mce-close:hover,
body .mce-window button.mce-close:focus,
body .mce-window button.mce-close:active {
    border: none;
    background: transparent;
}

    body .mce-window .mce-foot .mce-btn.mce-last button span {
        color: var(--bg-color);
    }

body .mce-window .mce-listbox {
    box-sizing: border-box;
}

    body .mce-window .mce-listbox button,
    body .mce-window .mce-listbox button:hover,
    body .mce-window .mce-listbox button:focus,
    body .mce-window .mce-listbox button:active {
        color: #333;
        font-weight: bold;
    }

body .mce-container-body input, body .mce-txt, body .mce-window .mce-label {
    font-size: 13.3333px;
    max-width: 310px !important;
}

body div[aria-label="Insert link"] .mce-listbox {
    width: 110px !important;
    background: white;
    border-color: #999;
}

body .mce-container.mce-floatpanel.mce-menu.mce-fixed {
    width: 110px !important;
    min-width: 110px !important;
    padding: 0;
    margin-left: 3px;
    margin-top: 2px;
}

    body .mce-container.mce-floatpanel.mce-menu.mce-fixed .mce-container-body {
        width: 110px !important;
    }

        body .mce-container.mce-floatpanel.mce-menu.mce-fixed .mce-container-body .mce-menu-item {
            margin: 0;
            padding-left: 0;
        }

            body .mce-container.mce-floatpanel.mce-menu.mce-fixed .mce-container-body .mce-menu-item,
            body .mce-container.mce-floatpanel.mce-menu.mce-fixed .mce-container-body .mce-menu-item .mce-text {
                background: white;
                color: #333;
            }

                body .mce-container.mce-floatpanel.mce-menu.mce-fixed .mce-container-body .mce-menu-item:hover,
                body .mce-container.mce-floatpanel.mce-menu.mce-fixed .mce-container-body .mce-menu-item:hover .mce-text {
                    color: white;
                    background-color: #2d8ac7;
                }

.mce-active body div[aria-label="Insert link"] .mce-container-body input {
    height: 26px !important;
}


body .mce-label.mce-first {
    border-bottom: dotted 2px #f5f5f5;
}

body .mce-window-head {
    background: rgb(199, 227, 236);
}

body .mce-window {
    border: solid 3px var(--bg-color) !important;
    border-radius: 3px;
}

body .mce-title * {
    font-family: Roboto, sans-serif, sans serif;
}

body .mce-txt {
    font-family: var(--main-font-family);
}

body .mce-window-head .mce-title {
    line-height: 35px;
    font-size: 23.4px;
    letter-spacing: -.5px;
}


body .mce-window-head .mce-close {
    width: 54px;
    height: 54px;
}

    body .mce-window-head .mce-close .mce-ico {
        font-size: 22px;
        color: var(--bg-color);
        opacity: .3;
    }

    body .mce-window-head .mce-close:hover .mce-ico {
        color: var(--bg-color);
        opacity: 1;
    }

.mail_editor_content div.form-type2 div.container {
    display: flex;
    align-items: center;
    padding: 3px 0px;
}

    .mail_editor_content div.form-type2 div.container div.container-type {
        border-bottom: dotted 2px #f5f5f5;
        width: 75px;
    }

        .mail_editor_content div.form-type2 div.container div.container-type + div {
            width: 100%;
        }

.mail_editor_content .attachments-list,
.mail_editor_content .additional-note {
    margin-top: 10px;
}

html body .modal .mail_editor_content.hidden-types {
    height: 340px;
}

.mail_editor_content .mail-separated-link {
    font-size: 11px;
    text-align: right;
    position: absolute;
    top: -10px;
    right: 0;
}

.mce-splitbtn .mce-open {
    position: relative;
    left: -2px;
}

body .mce-btn.mce-active button, body .mce-btn.mce-active:hover button, body .mce-btn.mce-active i, body .mce-btn.mce-active:hover i,
body .mce-btn.mce-active, body .mce-btn.mce-active:hover, body .mce-btn.mce-active:focus, body .mce-btn.mce-active:active {
    color: inherit;
}

body .mce-btn.mce-active .mce-caret, body .mce-btn.mce-active:hover .mce-caret {
    border-top-color: inherit;
}


body .mce-container, body .mce-container *, body .mce-widget, body .mce-widget *, body .mce-reset {
    font-size: inherit;
    color: inherit;
}

body .mce-container .mce-menu-item .mce-text {
    font-family: var(--main-font-family);
}