/**
 * Richtext editor nad textovými poli, jejichž obsah prochází Filters::msgEscape()
 * (#comment, #novyPozadavekPopis) - viz www/common/js/richTextEditor.js.
 */

.rte-widget {
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
}

.rte-toolbar {
    display: flex;
    align-items: center;
    padding: 3px 4px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f8f8;
    border-radius: 3px 3px 0 0;
}

.rte-btn {
    border: 1px solid transparent;
    background: transparent;
    color: #555;
    width: 26px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    padding: 0;
    margin-right: 2px;
    border-radius: 3px;
    cursor: pointer;
}

.rte-btn-text {
    font-size: 9px;
    font-weight: bold;
    vertical-align: sub;
    margin-left: 1px;
}

.rte-btn:hover,
.rte-btn:focus {
    background: #eee;
    border-color: #ddd;
    outline: none;
}

.rte-btn.active {
    background: #dde8f5;
    border-color: #c3d7ef;
    color: #2a5a92;
}

/* Historie verzi textu (rte-btn--undo/redo, viz richTextEditor.js) na
   hranici historie - napr. cerstve otevreny editor bez zmen */
.rte-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.rte-btn:disabled:hover {
    background: transparent;
    border-color: transparent;
}

.rte-toolbar-sep {
    flex: 1 1 auto;
}

.rte-btn--expand {
    margin-right: 0;
    color: #888;
}

.rte-editable {
    min-height: 44px;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.4;
}

.rte-editable:focus {
    outline: none;
}

.rte-editable:empty:before {
    content: attr(data-placeholder);
    color: #999;
}

.rte-editable p {
    margin: 0 0 8px;
}

.rte-editable p:last-child {
    margin-bottom: 0;
}

/* hlavicky - jen h3/h4 (viz Filters::ALLOWED_TAGS), v editoru drobnejsi */
.rte-editable h3,
.rte-editable h4 {
    margin: 4px 0 6px;
    font-weight: bold;
    line-height: 1.3;
}

.rte-editable h3 {
    font-size: 15px;
}

.rte-editable h4 {
    font-size: 13px;
}

.rte-editable blockquote {
    margin: 0 0 8px;
    padding: 4px 10px;
    border-left: 3px solid #ddd;
    color: #666;
}

.rte-editable pre {
    margin: 0 0 8px;
    padding: 6px 8px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    font-size: 11px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.rte-editable ul,
.rte-editable ol {
    margin: 0 0 8px;
    padding-left: 22px;
}

/* Rozbaleny editor v modalu (viz #richTextExpandModal v richTextEditor.js) */
.rte-widget--expanded {
    border: none;
}

.rte-widget--expanded .rte-editable {
    min-height: 300px;
    max-height: none;
    font-size: 13px;
}

.rte-modal .modal-body {
    padding: 0;
}

/* Ulozene texty (podpisy) - disketa + rozbalovaci nabidka, viz richTextEditor.js */
.rte-toolbar-sep--small {
    flex: 0 0 8px;
    border-left: 1px solid #ddd;
    height: 16px;
    margin: 0 4px 0 2px;
}

.rte-snippets {
    display: inline-block;
}

.rte-btn--snippets {
    width: auto;
    padding: 0 4px;
}

.rte-snippets-menu > li.disabled > a { color: #aaa; cursor: default; }

.rte-btn--snippets .caret {
    margin-left: 3px;
}

.rte-snippets-menu {
    min-width: 220px;
    max-width: 360px;
    font-size: 12px;
}

.rte-snippets-menu > li {
    position: relative;
}

.rte-snippets-menu > li > a.rte-snippet-insert {
    padding-right: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rte-snippets-menu > li > a.rte-snippet-delete {
    position: absolute;
    right: 0;
    top: 0;
    padding: 3px 10px;
    color: #999;
}

.rte-snippets-menu > li > a.rte-snippet-delete:hover {
    color: #c9302c;
    background: transparent;
}

.rte-snippets-menu > li.dropdown-header {
    white-space: normal;
}

/* Barva textu - paleta (TOOLBAR_TAGS['font'], viz richTextEditor.js) */
.rte-colors {
    display: inline-block;
}

.rte-btn--colors {
    width: auto;
    padding: 0 4px;
}

.rte-btn--colors .caret {
    margin-left: 3px;
}

.rte-colors-menu {
    min-width: 160px;
    font-size: 12px;
}

.rte-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #bbb;
    border-radius: 2px;
    vertical-align: -2px;
    margin-right: 4px;
}

.rte-color--none {
    color: #777;
}
