/*
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
*/
.markdown_edit {
  width: 95%;
  background: white;
  margin-top: 5px;
  margin-bottom: 5px;
}
.markdown_edit textarea {  /* so initial display before editor appears looks consistent with editor size */
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  height: 168px;
}
.markdown_edit .CodeMirror {
  color: rgb(85, 85, 85);
  height: auto;
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  overflow: hidden;
}
.markdown_edit .CodeMirror-scroll {
  max-height: 500px;
  overflow: auto !important;
}
.markdown_edit .CodeMirror-fullscreen .CodeMirror-scroll {
  max-height: none;
}
.markdown_edit .editor-statusbar {
  border: 1px solid #ddd;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}
.markdown_edit .fullscreen,
.markdown_edit .CodeMirror-fullscreen,
.markdown_edit .editor-preview {
  z-index: 1001;  /* should always be under help modal */
}
.markdown_edit .editor-preview pre {
  font-family: monospace;
}
.editor-toolbar.disabled-for-preview a:not(.fa-eye):not(.fa-arrows-alt):not(.fa-columns)::before {
  color: #BBB;
}
.editor-toolbar button {
  float: none;
}

.CodeMirror .CodeMirror-code .cm-comment {
  font-family: monospace;
  background: inherit;
  color: #888;
}
.CodeMirror .CodeMirror-code .cm-link {
  color: #33a;
}
.CodeMirror .CodeMirror-code .cm-url {
  color: #33d;
}
.CodeMirror .CodeMirror-placeholder {
    color: #999;
}
/* move these buttons to the right, they are a different type of button */
.editor-toolbar button.preview,
.editor-toolbar button.fullscreen,
.editor-toolbar button.guide {
  float: right;
}
.editor-toolbar button.preview {
  width: 70px;  /* for "Preview" extra text */
}
.editor-toolbar button.preview::after {
  content: ' Preview';
  font-size: 12px;
  font-family: inherit;
}
.editor-toolbar.fullscreen {
  /* for some reason the "nowrap" setting causes our floated elements to be offset in Firefox, when fullscreen */
  white-space: inherit;
}

/* 
    CodeMirror, copyright (c) by Marijn Haverbeke and others
    Distributed under an MIT license: https://codemirror.net/LICENSE
*/

.CodeMirror-hints {
  position: absolute;
  z-index: 10;
  overflow: hidden;
  list-style: none;

  margin: 0;
  padding: 2px;

  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  border-radius: 3px;
  border: 1px solid silver;

  background: white;
  font-size: 90%;
  font-family: monospace;

  max-height: 20em;
  overflow-y: auto;
}

.CodeMirror-hint {
  margin: 0;
  padding: 0 4px;
  border-radius: 2px;
  white-space: pre;
  color: black;
  cursor: pointer;
}

li.CodeMirror-hint-active {
  background: #08f;
  color: white;
}
