/* BASICS */

.automattic-editor-wrapper .CodeMirror {
  /* Set height, width, borders, and global font properties here */
  font-family: 'Menlo', 'Monaco', monospace;
  height: auto;
  font-size: 13px;
  background: transparent !important;
  line-height: 1.5 !important;
}

/* PADDING */

.automattic-editor-wrapper .CodeMirror-lines {
  padding: 4px 0; /* Vertical padding around content */
  background: white;
}
.automattic-editor-wrapper .CodeMirror pre {
  padding: 0 4px; /* Horizontal padding of content */
}

.automattic-editor-wrapper .CodeMirror-scrollbar-filler, .automattic-editor-wrapper .CodeMirror-gutter-filler {
  background-color: white; /* The little square between H and V scrollbars */
}

/* GUTTER */

.automattic-editor-wrapper .CodeMirror-gutters {
  border-right: 1px solid #ddd;
  white-space: nowrap;
}
.automattic-editor-wrapper .CodeMirror-linenumbers {}
.automattic-editor-wrapper .CodeMirror-linenumber {
  padding: 2px 3px 0 5px;
  min-width: 20px;
  text-align: right;
  color: #999;
  font-size: 10px;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}

.automattic-editor-wrapper .CodeMirror-guttermarker { color: black; }
.automattic-editor-wrapper .CodeMirror-guttermarker-subtle { color: #999; }

/* CURSOR */

.automattic-editor-wrapper .CodeMirror div.CodeMirror-cursor {
  border-left: 1px solid black;
}
/* Shown when moving in bi-directional text */
.automattic-editor-wrapper .CodeMirror div.CodeMirror-secondarycursor {
  border-left: 1px solid silver;
}
.automattic-editor-wrapper .CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
  width: auto;
  border: 0;
  background: #7e7;
}
.automattic-editor-wrapper .CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
  z-index: 1;
}

.automattic-editor-wrapper .cm-animate-fat-cursor {
  width: auto;
  border: 0;
  -webkit-animation: automattic-editor-codemirror-blink 1.06s steps(1) infinite;
  -moz-animation: automattic-editor-codemirror-blink 1.06s steps(1) infinite;
  animation: automattic-editor-codemirror-blink 1.06s steps(1) infinite;
}
@-moz-keyframes automattic-editor-codemirror-blink {
  0% { background: #7e7; }
  50% { background: none; }
  100% { background: #7e7; }
}
@-webkit-keyframes automattic-editor-codemirror-blink {
  0% { background: #7e7; }
  50% { background: none; }
  100% { background: #7e7; }
}
@keyframes automattic-editor-codemirror-blink {
  0% { background: #7e7; }
  50% { background: none; }
  100% { background: #7e7; }
}

/* Can style cursor different in overwrite (non-insert) mode */
.automattic-editor-wrapper div.CodeMirror-overwrite div.CodeMirror-cursor {}

.automattic-editor-wrapper .cm-tab { display: inline-block; text-decoration: inherit; }

.automattic-editor-wrapper .CodeMirror-ruler {
  border-left: 1px solid #ccc;
  position: absolute;
}

/* DEFAULT THEME */

.automattic-editor-wrapper .cm-s-default .cm-keyword {font-weight: bold;}
.automattic-editor-wrapper .cm-s-default .cm-atom {color: #F28E20;}
.automattic-editor-wrapper .cm-s-default .cm-number {color: #015A8D;}
.automattic-editor-wrapper .cm-s-default .cm-def {color: #0292C6;}
.automattic-editor-wrapper .cm-s-default .cm-variable,
.automattic-editor-wrapper .cm-s-default .cm-punctuation {}
.automattic-editor-wrapper .cm-s-default .cm-property { font-style: italic; color: #394A60;}
.automattic-editor-wrapper .cm-s-default .cm-operator { color: #F28E20 }
.automattic-editor-wrapper .cm-s-default .cm-variable-2 {}
.automattic-editor-wrapper .cm-s-default .cm-variable-3 {}
.automattic-editor-wrapper .cm-s-default .cm-comment {color: #56BD23;}
.automattic-editor-wrapper .cm-s-default .cm-string {color: #DA5924;}
.automattic-editor-wrapper .cm-s-default .cm-string-2 {color: #0292C6;}
.automattic-editor-wrapper .cm-s-default .cm-meta {color: #02B3E0}
.automattic-editor-wrapper .cm-s-default .cm-qualifier {}
.automattic-editor-wrapper .cm-s-default .cm-builtin {color: #02B3E0;}
.automattic-editor-wrapper .cm-s-default .cm-bracket {color: #FCC000;}
.automattic-editor-wrapper .cm-s-default .cm-tag {color: #0292C6;}
.automattic-editor-wrapper .cm-s-default .cm-attribute {color: #F28E20;}
.automattic-editor-wrapper .cm-s-default .cm-header {color: #015A8D;}
.automattic-editor-wrapper .cm-s-default .cm-quote {color: #394A60;}
.automattic-editor-wrapper .cm-s-default .cm-hr {color: #394A60;}
.automattic-editor-wrapper .cm-s-default .cm-link {color: #394A60;}

.automattic-editor-wrapper .cm-negative {color: #E1463E;}
.automattic-editor-wrapper .cm-positive {color: #56BD23;}
.automattic-editor-wrapper .cm-header, .automattic-editor-wrapper .cm-strong {font-weight: bold;}
.automattic-editor-wrapper .cm-em {font-style: italic;}
.automattic-editor-wrapper .cm-link {text-decoration: underline;}
.automattic-editor-wrapper .cm-strikethrough {text-decoration: line-through;}

.automattic-editor-wrapper .cm-s-default .cm-error {color: #E1463E;}
.automattic-editor-wrapper .cm-invalidchar {color: #E1463E;}

/* Default styles for common addons */

.automattic-editor-wrapper div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
.automattic-editor-wrapper div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.automattic-editor-wrapper .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.automattic-editor-wrapper .CodeMirror-activeline-background {background: #e8f2ff;}

/* STOP */

/* The rest of this file contains styles related to the mechanics of
   the editor. You probably shouldn't touch them. */

.automattic-editor-wrapper .CodeMirror {
  line-height: 1;
  position: relative;
  overflow: hidden;
  background: white;
  color: black;
}

.automattic-editor-wrapper .CodeMirror-scroll {
  overflow: scroll !important; /* Things will break if this is overridden */
  /* 30px is the magic margin used to hide the element's real scrollbars */
  /* See overflow: hidden in .CodeMirror */
  margin-bottom: -30px; margin-right: -30px;
  padding-bottom: 30px;
  height: 100%;
  outline: none; /* Prevent dragging from highlighting the element */
  position: relative;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}
.automattic-editor-wrapper .CodeMirror-sizer {
  position: relative;
  border-right: 30px solid transparent;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}

/* The fake, visible scrollbars. Used to force redraw during scrolling
   before actuall scrolling happens, thus preventing shaking and
   flickering artifacts. */
.automattic-editor-wrapper .CodeMirror-vscrollbar, .automattic-editor-wrapper .CodeMirror-hscrollbar, .automattic-editor-wrapper .CodeMirror-scrollbar-filler, .automattic-editor-wrapper .CodeMirror-gutter-filler {
  position: absolute;
  z-index: 6;
  display: none;
}
.automattic-editor-wrapper .CodeMirror-vscrollbar {
  right: 0; top: 0;
  overflow-x: hidden;
  overflow-y: scroll;
}
.automattic-editor-wrapper .CodeMirror-hscrollbar {
  bottom: 0; left: 0;
  overflow-y: hidden;
  overflow-x: scroll;
}
.automattic-editor-wrapper .CodeMirror-scrollbar-filler {
  right: 0; bottom: 0;
}
.automattic-editor-wrapper .CodeMirror-gutter-filler {
  left: 0; bottom: 0;
}

.automattic-editor-wrapper .CodeMirror-gutters {
  position: absolute; left: 0; top: 0;
  z-index: 3;
}
.automattic-editor-wrapper .CodeMirror-gutter {
  white-space: normal;
  height: 100%;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  display: inline-block;
  margin-bottom: -30px;
  /* Hack to make IE7 behave */
  *zoom:1;
  *display:inline;
}
.automattic-editor-wrapper .CodeMirror-gutter-wrapper {
  position: absolute;
  z-index: 4;
  height: 100%;
}
.automattic-editor-wrapper .CodeMirror-gutter-elt {
  position: absolute;
  cursor: default;
  z-index: 4;
}

.automattic-editor-wrapper .CodeMirror-lines {
  cursor: text;
  min-height: 1px; /* prevents collapsing before first draw */
}
.automattic-editor-wrapper .CodeMirror pre {
  /* Reset some styles that the rest of the page might have set */
  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
  border-width: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  margin: 0;
  white-space: pre;
  word-wrap: normal;
  line-height: inherit;
  color: inherit;
  z-index: 2;
  position: relative;
  overflow: visible;
}
.automattic-editor-wrapper .CodeMirror-wrap pre {
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: normal;
}

.automattic-editor-wrapper .CodeMirror-linebackground {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 0;
}

.automattic-editor-wrapper .CodeMirror-linewidget {
  position: relative;
  z-index: 2;
  overflow: auto;
}

.automattic-editor-wrapper .CodeMirror-widget {}

.automattic-editor-wrapper .CodeMirror-measure {
  position: absolute;
  width: 100%;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}
.automattic-editor-wrapper .CodeMirror-measure pre { position: static; }

.automattic-editor-wrapper .CodeMirror div.CodeMirror-cursor {
  position: absolute;
  border-right: none;
  width: 0;
}

.automattic-editor-wrapper div.CodeMirror-cursors {
  visibility: hidden;
  position: relative;
  z-index: 3;
}
.automattic-editor-wrapper .CodeMirror-focused div.CodeMirror-cursors {
  visibility: visible;
}

.automattic-editor-wrapper .CodeMirror-selected { background: Highlight; }
.automattic-editor-wrapper .CodeMirror-focused .CodeMirror-selected { background: Highlight; }
.automattic-editor-wrapper .CodeMirror-crosshair { cursor: crosshair; }

.automattic-editor-wrapper .cm-searching {
  background: #ffa;
  background: rgba(255, 255, 0, .4);
}

/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.automattic-editor-wrapper .CodeMirror span { *vertical-align: text-bottom; }

/* Used to force a border model for a node */
.automattic-editor-wrapper .cm-force-border { padding-right: .1px; }

@media print {
  /* Hide the cursor when printing */
  .automattic-editor-wrapper .CodeMirror div.CodeMirror-cursors {
    visibility: hidden;
  }
}

/* See issue #2901 */
.automattic-editor-wrapper .cm-tab-wrap-hack:after { content: ''; }

/* Help users use markselection to safely style text background */
.automattic-editor-wrapper span.CodeMirror-selectedtext { background: none; }
