/* vim: set expandtab ts=2 sw=2 tw=80: */

/*
 * Figures
 */
body {
  counter-reset: exampleno figure issue;
	margin: 0 auto !important;
}
div.figure {
  margin: 2.5em 0;
  text-align: center;
  page-break-inside: avoid;
}
div.figure img {
  display: block;
  margin: auto;
  max-width: 100%;
}
img {
  border-style: none;
}
div.figure {
  text-align: center;
}
p.caption:before {
  content: "Figure " counter(figure, decimal) ". ";
}
p.caption {
  counter-increment: figure;
  font-style: italic;
  text-align: center;
}
p, div.note, div.issue {
  margin: initial;
  margin-top: 1em;
  margin-bottom: 1em;
}
dd > p:first-child, li > p:first-child, .note > p:first-child, .issue > p:first-child {
  margin-top: 0
}
.issue, .note, div.example, pre.example {
  padding: initial;
  margin: initial;
  padding: .5em;
  border: initial;
  /* padding: .5rem; /* proposed unit in css3-values */
  border-left-width: .5em;
  /* border-left-width: .5rem; /* proposed unit in css3-values */
  border-left-style: solid;
}
span.note, span.issue { padding: .1em .5em .15em; }

.issue {
  border-color: #E05252;
  background: #FBE9E9;
  counter-increment: issue;
}

.issue::before {
  display:    initial;
  width:  initial;
  border: initial;
  background: initial;
  padding:    initial;
  content: "Issue " counter(issue);
  padding-right: 1em;
  text-transform: uppercase;
  color: #E05252;    
}

/*
 * Feedback wanted
 */
div.feedbackWanted:before, p.feedbackWanted:before {
  display: block;
  content: "Feedback wanted";
  background: white;
  border: 1px solid #F88;
  font-weight: bold;
  margin: -1.5em 0 0.5em;
  padding: 3px 1em;
  width: 150px;
}
div.feedbackWanted, p.feedbackWanted {
  display: block;
  background: #FEE;
  margin: 1em 0 0;
  padding: 1em;
}

/*
 * todo
 */
div.todo:before, p.todo:before {
  display: block;
  content: "TODO";
  background: white;
  border: 1px solid #F90;
  font-weight: bold;
  margin: -1.5em 0 0.5em;
  padding: 3px 1em;
  width: 80px;
}
div.todo, p.todo, li.todo {
  background: #FFD;
  margin: 1em 0 0;
  padding: 1em;
}
div.todo {
  padding-bottom: 0.2em;
}
span.todo {
  background: #FFB;
}

/*
 * Annotation
 */
div.annotation:before, p.annotation:before {
  display: block;
  content: "Annotation";
  background: white;
  border: 1px solid #A8C;
  font-weight: bold;
  margin: -1.5em 0 0.5em;
  padding: 3px 1em;
  width: 150px;
}
div.annotation, p.annotation {
  display: block;
  background: #EDF;
  margin: 1em 0 0;
  padding: 1em;
}

/*
 * Algorithm display
 */
li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
dl.switch > dt:before {
  content: "\0021aa";
  padding-right: 0.3em;
}
dl.switch ol {
  padding-left: 1.3em;
}

/*
 * On Windows, the bold Arial glyph for right and left arrow is missing the
 * stem at some font-sizes so use a different font. This affects Firefox,
 * Chrome, and IE.
 */
span.arrow {
  font-family: Calibri, sans-serif;
}

/*
 * Informative sections
 */
div.informative-bg {
  background: #efe;
  border: green 1px dotted;
  padding: 0 1em 0.5em;
}
div.informative-bg h2,
div.informative-bg h3,
div.informative-bg h4 {
  background: none;
}

div.example { page-break-inside: avoid }
/* Examples */

.example {
  counter-increment: exampleno;
}
div.example:before {
  content: "Example";
  content: "Example " counter(exampleno);
  min-width: 7.5em;
  text-transform: uppercase;      
}
pre.example:before {
  content: "Example";
  content: "Example " counter(exampleno);
  min-width: 7.5em;
  text-transform: uppercase;
}
div.example, div.illegal-example, div.html, div.illegal-html, div.xml,
div.illegal-xml, pre.example, pre.illegal-example, pre.html,
pre.illegal-html, pre.xml, pre.illegal-xml {
  padding: 0.5em;
  margin: 1em 0;
  position: relative;
  clear: both;
}
pre.example, pre.illegal-example, pre.html,
pre.illegal-html, pre.xml, pre.illegal-xml {
  padding-top: 1.5em;
}
pre.illegal-example { color: red }
div.illegal-example { color: red }
div.illegal-example p { color: black }

/* Example box */
div.example {
  border-color: #E0CB52;
  background: #FCFAEE;    
}

div.example:before { color: #B9AB2D; }

/*
 * Mark javascript examples as such
 */
pre.example.sh_javascript:before {
  content: "ECMAScript";
}

/*
 * Parameter tables
 */
.parameters td p:first-child {
  margin-top: 0;
}
.parameters td p:last-child {
  margin-bottom: 0;
}

/*
 * Comments
 */
.idlSectionComment {
  color: grey;
}
