/*********************************************************************
(C) ZE CMS, Humboldt-Universitaet zu Berlin
Written 2016 by Daniel Rohde <d.rohde@cms.hu-berlin.de>
**********************************************************************
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
**********************************************************************/
.markdown-editor {
    display: flex;
    flex-direction: column;
}
.markdown-editorpane {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    height: 300px;
}
.markdown-preview, .markdown-textarea {
    flex-grow: 1;
    flex-basis: auto;
    justify-content: flex-start;
    align-content: flex-start;
    width: 98%;
    height: auto;
}
.split .markdown-textarea, .split .markdown-preview { 
    width: 45%;
}
.fullscreen .markdown-editor, .fullscreen .markdown-editorpane {
    height: 95%;
}
.markdown-preview.display {
    display: inline-block;
}

.fullscreen {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1;
}
.markdown-textarea {
    display: inline-block;
    padding: 0;
    font-family: monospace;
    resize: none;
}
 .ui-widget textarea.markdown-textarea {
    font-family: monospace;
 }
.markdown-preview {
    display: none;
    padding: 0;
    overflow: scroll;
    padding-left: 1ex;
    border: 2px solid #eee;
    border-radius: 8px;
}
.markdown-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    clear: both;
    padding: 2px 0px 2px 0px;
    margin: 5px 0px 5px 0px;
}
.markdown-bold {
    font-weight: bold;
}
.markdown-italic {
    font-style: italic;
}
.markdown-quote {
    border-left: 0.5ex solid #ddd;
    padding: 2px 2px 4px 4px;
}
.markdown-code {
    font-family: monospace;
    border: 1px solid #eee;
    padding: 2px;
    white-space: pre;
    color: #6e0000;
}
.markdown-codeblock {
    font-family: monospace;
    margin-left: 2ex;
    border-width: 0px 1px 0px 1px;
    border-style: solid;
    border-color: #eee;
    white-space: pre;
    color: #6e0000;
}
.markdown-link {
    font-style: italic;
    text-decoration: underline;
}
.markdown-strikethrough {
    text-decoration: line-through;
}
.markdown-image {
    display: inline-block;
    vertical-align: middle;
}
.markdown-paragraph {
    display: block;
    height: 1.25em;
}
.markdown-ul {
    list-style-type: square;
}
ul .markdown-ul, ol .markdown-ul  {
    list-style-type: circle;
}
.markdown-toolbar-button, .markdown-toolbar-sep, .markdown-toolbar-sepflex {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 1px dotted #aaa;
    padding: 0;
    margin: 1px;
    flex-grow: 0;
    flex-shrink: 0;
}
.markdown-toolbar-sep, .markdown-toolbar-sepflex {
    border: 0;
    width: 11px;
    flex-shrink: 2;
}
.markdown-toolbar-sepflex {
    flex-grow: 2;
}
.markdown-toolbar-sepfsflex {
    display: none;
}
.fullscreen .markdown-toolbar-sepfsflex {
    display: inline-block;
    flex-grow: 2;
    flex-shrink: 2;
}
.markdown-toolbar-button:focus, .markdown-toolbar-button:hover {
    background-color: #eee;
    border: 1px outset #999;
}
.markdown-toolbar-button.clicked {
    border: 1px inset #ddd;
}
.markdown-toolbar-button.disabled,
.markdown-toolbar-button.disabled:hover,
.markdown-toolbar-button.disabled:focus,
.markdown-toolbar-button.disabled.clicked {
    border: 1px solid white;
    opacity: 0.5;
    filter: Alpha(opacity: 50);
}
input.markdown-checkbox {
    vertical-align: top;
}
ul > li.markdown-hiddenitem {
    list-style-type: none;
    margin-left: -3ex;
}
.markdown-table {
    border: 1px solid #eee;
    padding: 0;
    margin: 0;
    border-collapse: collapse;
}
.markdown-tr:nth-child(even) {
    background-color: #f0f0f0;
}
.markdown-tr:hover {
    background-color: #eee;
}
.markdown-tr:nth-child(even):hover {
    background-color: #ddd;
}
.markdown-td {
    padding: 5px;
    margin: 0;
    background-color: transparent;
}
.markdown-td-center {
    text-align: center;
}
.markdown-td-right {
    text-align: right;
}
#markdown-editor-scroll-to-me {
    border: 1px solid black;
    margin-left: 2px;
}
.fullscreen .markdown-toolbar-fullscreen {
    background-color: #eee;
}
.fullscreen .markdown-toolbar-fullscreen:hover {
    background-color: #ddd;
}

.markdown-preview.print {
    display: none;
}
@media print {
    body > * { display: none; }
    a.markdown-link:after {
        content: " [" attr(href) "] "; 
    }
    .markdown-preview.print{
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        background: white;
        width: auto;
        height: auto;
        overflow: visible;
    }
}
