/*
  These CSS rules are included in both the outer and inner ACE iframe (pad editor)
*/

@import url('./lists_and_indents.css');

html.outer-editor, html.inner-editor {
  background-color: transparent !important;
}
#outerdocbody {
  display: flex;
  flex-direction: row;
  justify-content: center;
  min-height: 100vh; /* take at least full height */
}
#outerdocbody iframe {
  flex: 1 auto;
  display: flex;
  width: 100%;
}
#outerdocbody #sidediv {
  order: -1; /* display it on the first row positionning, i.e. on the left */
}

/* ACE-PAD Container (i.e. where the text is displayed) */
#innerdocbody {
  padding-left: 15px;
  padding-right: 15px;
  overflow: hidden;
  background-color: white;
  line-height: 1.6;

  /* Be careful editing following rules. Longs words should not overflow, ep_align justify should work,
     Test on chrome, firefox and safari... Copy / Paste a word inside a sentence should not add line-breaks
     and preserve the style */
  display: block; /* for safari and firefox, otherwise the break-word does not work */
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /*
   * Make the contenteditable area at least as big as the screen so that mobile
   * users can tap anywhere to bring up their device's keyboard.
   */
  min-height: 100vh;
}

#innerdocbody, #sidediv {
  /* Both must have the same top padding to line up line numbers */
  padding-top: 15px;
  /* Some space when we scroll to the bottom */
  padding-bottom: 15px;
}

#innerdocbody a {
  color: #2e96f3;
}
#innerdocbody.authorColors [class^='author-'] a {
  color: inherit;
}

option {
  text-transform: capitalize;
}

#innerdocbody h1,
#innerdocbody h2,
#innerdocbody h3,
#innerdocbody h4 {
  line-height: 1.2;
  margin-bottom: .5em;
}
#innerdocbody h1 span,
#innerdocbody h2 span,
#innerdocbody h3 span,
#innerdocbody h4 span {
  padding-top: 0;
}

/* --------------------- */
/* -- BROWSER SUPPORT -- */
/* --------------------- */

body.mozilla, body.safari {
  display: table-cell; /* cause "body" area (e.g. where clicks are heard) to grow horizontally with text */
}
.safari div {
  padding-right: 1px; /* prevents the caret from disappearing on the longest line of the doc */
}


/* ------------------------------------------ */
/* -- SIDEDIV (line number, text author..) -- */
/* ------------------------------------------ */

#sidediv {
  background-color: transparent;
  border-right: 1px solid #ccc;
}
#sidediv .line-number {
  font-size: 9px;
  padding: 0 14px 0 10px;
  font-family: monospace;
  cursor: pointer;
}
.plugin-ep_author_neat #sidedivinner.authorColors .line-number {
  padding-right: 10px;
}
#sidedivinner {
  text-align: right;
  opacity: .9;
}
#sidediv:not(.sidedivdelayed) { /* before sidediv get initialized, hide text */
  color: transparent;
}
.line-numbers-hidden #sidediv .line-number {
  display: none;
}
#linemetricsdiv {
  position: absolute;
  left: -1000px;
  top: -1000px;
  color: white;
  z-index: -1;
  font-size: 12px; /* overridden by lineMetricsDiv.style */
  font-family: monospace; /* overridden by lineMetricsDiv.style */
}
@media (max-width: 800px) {
  #sidediv {
    /* Do not use display: none to hide the sidediv, otherwise the parent container does not
       get its height properly calculated by flexboxes */
    visibility: hidden;
    width: 0;
    padding: 0;
  }
}




/* ----------- */
/* -- OTHER -- */
/* ----------- */

::selection {
  background: #acf;
}
::-moz-selection {
  background: #acf;
}
#innerdocbody a {
  cursor: pointer !important;
}
