/**
 * @provides phabricator-remarkup-css
 */

.phabricator-remarkup {
  line-height: 1.45em;
}

.phabricator-remarkup p {
  margin: 0 0 1em;
}

.phabricator-remarkup p:last-child {
  margin-bottom: 0;
}

.phabricator-remarkup .remarkup-code-block {
  margin: 1em 2em;
  white-space: pre;
  font-family: "Monaco", monospace;
  font-size: 10px;
}

.phabricator-remarkup .remarkup-code-header {
  padding: .25em 1em;
  background: #edead7;
  color: {$darkgreytext};
}

.phabricator-remarkup .remarkup-code-block pre {
  background: #fdfae7;
  border: 1px solid #f5e178;
  display: block;
  color: #000000;
  overflow: auto;
  padding: .5em 1em;
  font-family: "Monaco", monospace;
}

.phabricator-remarkup pre.remarkup-counterexample {
  border: 1px solid #aa0000;
  background-color: #ffaaaa;
}

.phabricator-remarkup tt {
  color: #333333;
  background: #ebebeb;
  padding: 0 .25em;
  white-space: pre-wrap;
}

/* NOTE: You can currently produce this with [[link | `name`]]. Restore the
   link color. */
.phabricator-remarkup a tt {
  color: #18559d;
}

.phabricator-remarkup ul {
  list-style: disc;
  margin: 1em 0 1em 3em;
}

.phabricator-remarkup ol {
  list-style: decimal;
  margin: 1em 0 1em 3em;
}

.phabricator-remarkup ul ol,
.phabricator-remarkup ul ul,
.phabricator-remarkup ol ol,
.phabricator-remarkup ol ul {
  margin: .25em 0 .25em 2em;
}

.phabricator-remarkup li.phantom-item,
.phabricator-remarkup li.phantom-item {
  list-style-type: none;
}

.phabricator-remarkup h1:first-child,
.phabricator-remarkup h2:first-child,
.phabricator-remarkup h3:first-child,
.phabricator-remarkup h4:first-child,
.phabricator-remarkup h5:first-child,
.phabricator-remarkup h6:first-child {
  margin-top: 0;
}

.phabricator-remarkup h1:last-child,
.phabricator-remarkup h2:last-child,
.phabricator-remarkup h3:last-child,
.phabricator-remarkup h4:last-child,
.phabricator-remarkup h5:last-child,
.phabricator-remarkup h6:last-child {
  margin-bottom: 0;
}

.phabricator-remarkup h1 {
  font-size: 1.625em;
  line-height: 1.625em;
  margin: .8em 0;
}

.phabricator-remarkup h2 {
  font-size: 1.5em;
  line-height: 1.5em;
  margin: .75em 0;
}

.phabricator-remarkup h3 {
  font-size: 1.375em;
  line-height: 1.375em;
  margin: .69em 0;
}

.phabricator-remarkup h4 {
  font-size: 1.25em;
  line-height: 1.25em;
  margin: .63em 0;
}

.phabricator-remarkup h5 {
  font-size: 1.125em;
  line-height: 1.125em;
  margin: .56em 0;
}

.phabricator-remarkup h6 {
  font-size: 1em;
  line-height: 1em;
  margin: .5em 0;
}

.phabricator-remarkup blockquote {
  border-left: 1px solid #AAAAAA;
  color:       #333333;
  font-style:  italic;
  margin:      .5em 0em;
  padding:     .25em 1em;
}

.phabricator-remarkup blockquote em {
  font-style: normal;
}

.phabricator-remarkup img.remarkup-proxy-image {
  max-width: 640px;
  max-height: 640px;
}

.phabricator-remarkup audio {
  display: block;
  margin: 16px auto;
  min-width: 240px;
  width: 50%;
}

.phabricator-remarkup-mention-exists {
  font-weight: bold;
  background: #e6f3ff;
}

.phabricator-remarkup-mention-disabled {
  font-weight: bold;
  background: #dddddd;
}

.phui-remarkup-preview .phabricator-remarkup-mention-unknown,
.aphront-panel-preview .phabricator-remarkup-mention-unknown {
  font-weight: bold;
  background: #ffaaaa;
}

.phabricator-remarkup .remarkup-note {
  margin: 1em 1.5em;
  padding: 0.5em 1em;
  border: 1px solid #ddddff;
  background: #f3f3ff;
}

.phabricator-remarkup-toc {
  float: right;
  border: 1px solid #d7d7d7;
  background: #f7f7f7;
  padding: 4px 12px;
  width: 180px;
  margin: 0 0 5px 10px;
}

.phabricator-remarkup-toc-header {
  font-size: 11px;
  color: {$greytext};
  border-bottom: 1px solid #d7d7d7;
  margin-bottom: 4px;
}

.phabricator-remarkup-toc ul {
  padding: 0;
  margin: 0;
  list-style: none;
  overflow: hidden;
}

.phabricator-remarkup-toc ul ul {
  margin: 0 0 0 10px;
}

.phabricator-remarkup-toc ul li {
  padding: 0;
  margin: 0;
  font-size: 11px;
}

.phabricator-remarkup-embed-layout-right {
  text-align: right;
}

.phabricator-remarkup-embed-layout-center {
  text-align: center;
}

.phabricator-remarkup-embed-layout-inline {
  display: inline;
}

.phabricator-remarkup-embed-float-right {
  float: right;
  margin: .5em 1em 0;
}

.phabricator-remarkup-embed-layout-link {
  padding-left: 20px;
  background: url(/rsrc/image/icon/fatcow/page_white_put.png) 0 0 no-repeat;
}

.phabricator-remarkup-embed-float-left {
  float: left;
  margin: .5em 1em 0;
}

.phabricator-remarkup-embed-image {
  display: inline-block;
  border: 3px solid white;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.20);
}

.phabricator-remarkup table.remarkup-table {
  border-collapse:  separate;
  border-spacing:   1px;
  background:       #d3d3d3;
  margin:           1em;
}

.phabricator-remarkup table.remarkup-table th {
  font-weight: bold;
  padding: 3px 6px;
  background: #e3e3e3;
}

.phabricator-remarkup table.remarkup-table td {
  background: #ffffff;
  padding: 3px 6px;
}

.remarkup-assist-textarea {
  border-left-color: {$blueborder};
  border-right-color: {$blueborder};
  border-bottom-color: {$blueborder};
  border-top-color: {$lightblueborder};
  border-radius: 0;

  /* Prevent Safari and Chrome users from dragging the textarea any wider,
     because the top bar won't resize along with it. */
  resize: vertical;
}

.remarkup-assist-textarea:focus {
  border: 1px solid rgba(82, 168, 236, 0.8);
}

.remarkup-assist-bar {
  height: 27px;
  padding: 0 2px;

  border-width: 1px 1px 0;
  border-style: solid;
  border-top-color: {$blueborder};
  border-left-color: {$blueborder};
  border-right-color: {$blueborder};

  background: {$lightbluebackground};
  overflow: hidden;
}

.remarkup-assist-button {
  display: block;
  padding: 3px;
  margin: 2px 1px;
  float: left;

  border: 1px solid transparent;
  border-radius: 2px;
}

.remarkup-assist-button:hover {
  background: #f7f7f7;
  border-color: #c6c6c6;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.10);
}

.remarkup-assist-button:active {
  outline: none;
  background: #f3f3f3;
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.10);
}

.remarkup-assist-button:focus {
  outline: none;
}

.remarkup-assist-separator {
  display: block;
  float: left;

  margin: 7px 4px;
  height: 14px;

  width: 0px;
  border-right: 1px solid #cccccc;
}

.remarkup-interpreter-error {
  padding: 8px;
  border: 1px solid {$red};
  background-color: {$lightred};
}

.remarkup-cowsay {
  white-space: pre-wrap;
}

.remarkup-figlet {
  white-space: pre-wrap;
}

.remarkup-assist {
  display: block;
  width: 14px;
  height: 14px;
  overflow: hidden;
}

.remarkup-assist-right {
  float: right;
}

.jx-order-mask {
  background: #ffffff;
  opacity: 1.0;
}

.remarkup-assist-textarea {
  box-shadow: none;
  -webkit-box-shadow: none;
}

.remarkup-control-fullscreen-mode {
  position: fixed;
  top: -1px;
  bottom: -1px;
  left: -1px;
  right: -1px;
}

.remarkup-control-fullscreen-mode textarea.remarkup-assist-textarea {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  bottom: 0;
  /* NOTE: This doesn't work in Firefox, there's a JS behavior to correct it. */
  height: auto;
  border-width: 1px 0 0 0;
  outline: none;
}

.phabricator-image-macro-hero {
  margin: auto;
  max-width: 95%;
}

/* phabricator-remarkup-dark assumes a dark backround with light text,
   so here are custom rules to override remarkup defaults. */

div.phabricator-remarkup-dark blockquote {
  color: {$lightgreytext};
}

div.phabricator-remarkup-dark tt {
  color: #EEE;
  background: {$darkgreytext};
}

div.phabricator-remarkup-dark .remarkup-note,
div.phabricator-remarkup-dark table {
  color: #000;
}

div.phabricator-remarkup-dark hr {
  border-color: #555;
}
