@charset "utf-8";
/* Author: Aziz Köksal
   This files is used for formatting PDF documents by PrinceXML.
*/

/* Fonts: */
@font-face { font-family: serif; src: local("DejaVu Serif"); }
@font-face { font-family: sans-serif; src: local("DejaVu Sans"); }
@font-face { font-family: monospace; src: local("DejaVu Sans Mono"); }

/* Page styles: */
@page {
  size: A4 portrait;
  margin: 1.5cm;
  font-family: serif;
  @top-right {
    content: string(module);
    font-size: 0.9em;
    font-style: italic;
  }
  @bottom-right {
    content: counter(page);
  }
}

@page:first {
  @top-right { content: normal; }
  @bottom-right { content: normal; }
}

@page toc {
  @top-right {
    content: "ToC";
    font-style: italic;
  }
}

@page toc:first { /* BUG: for some reason PrinceXML doesn't apply this rule */
  @top-right { content: normal; }
}

@page indices {
  @top-right {
    content: string(index_header);
    font-size: 0.9em;
    font-style: italic;
  }
}

@page indices:first {
  @top-right { content: normal; }
}

/* Override some default styles. */
html { font: 10pt serif; }

h1, h2, h3, h4, p, pre, hr {
  margin: 0.9em 0;
}

h1, h2, h3, h4, h5, h6 { prince-bookmark-level: none; }

a {
  color: darkblue;
  text-decoration: none;
}

/* First page. */
.covertitle {
  margin-top: 4em;
  font-size: 4em;
  text-align: center;
}

#generated_by {
  font-style: italic;
  text-align: right;
  position: absolute;
  bottom: 0;
  right: 0;
}

/* Table of Contents: */
#toc { /* Generated by the script. */
  margin: 0em 2em;
  page: toc;
}

#toc .toc_header {
  margin: 1em 0em;
  font-size: 2em;
  text-align: center;
  border-bottom: 2px solid black;
}

#toc > ul { margin: 0em 1em; }

#toc ul {
  margin-left: 1em;
  list-style: none;
}

#toc a { color: black; }

#toc a:after {
  content: leader('.') target-counter(attr(href), page);
}
/* Icons for modules and packages. */
#toc .modlist.nested li[kind=p]:before {
  content: url("img/icon_package.png") " ";
}
#toc .modlist.nested li[kind=m]:before {
  content: url("img/icon_module.png") " ";
}
#toc .modlist.flat li:before {
  content: url("img/icon_module.png") " ";
}

#bookmarks, #bookmarks * { /* Bookmarks are generated by the script. */
  display: none; /* Don't appear in the document. Presumably, a bug or
                    shortcoming in PrinceXML doesn't allow generating
                    bookmarks from invisible elements. */
  display: inline; /* Therefore make everything inline to occupy no space. */
}
#bookmarks li {
  prince-bookmark-target: attr(link);
  prince-bookmark-label: attr(label);
}
#bookmarks li[link^="#p-"] {
  /* Since PDF documents don't support custom icons for bookmarks
     we append a suffix to make packages distinguishable from modules. */
  prince-bookmark-label: attr(label) "/";
}
#bookmarks li, #bookmarks li li { /* Keep first two levels closed. */
  prince-bookmark-state: closed;
}
#bookmarks li { prince-bookmark-level: 1; }
#bookmarks li li { prince-bookmark-level: 2; }
#bookmarks li li li { prince-bookmark-level: 3; }
#bookmarks li li li li { prince-bookmark-level: 4; }
#bookmarks li li li li li { prince-bookmark-level: 5; }
#bookmarks li li li li li li { prince-bookmark-level: 6; }
#bookmarks li li li li li li li { prince-bookmark-level: 7; }
#bookmarks li li li li li li li li { prince-bookmark-level: 8; }
#bookmarks li li li li li li li li li { prince-bookmark-level: 9; }
#bookmarks li li li li li li li li li li { prince-bookmark-level: 10; }

#indices { page: indices; }
#indices a { color: black; }
#indices a::after {
  content: ", " target-counter(attr(href), page);
}
#indices dl { column-count: 2; }
#indices dd { margin-bottom: 0.2em; }
#indices h1 { string-set: index_header attr(label); }

/* Styles for the content: */
h1.module { /* Module header. */
  margin-top: 3em;
  font-size: 1.3em;
  border-bottom: 2px solid black;
  line-height: 1.2em;
}

h1.module > a {
  string-set: module content();
}

h1.package { /* Package header. */
  font-size: 1.45em;
  border-bottom: 2px solid black;
  page-break-before: always;
  page-break-after: avoid;
}

h1.package + div + h1.package { /* Keep adjacent packages together */
  page-break-before: avoid;
}

h1.module:before { content: "Module "; }
h1.package:before { content: "Package "; }

/* Apply module specific styles like this: */
/*h1.module[id=m-tango.core.Array] {
  page-break-before: always;
}*/
/* A place-holder used by the script. */
/*MODULE_PAGE_BREAKS*/

div.module { /* Encompasses all elements of a module. */
/*   page-break-inside: avoid; */ /* Wastes too much space. */
}

div.module > dl { /* Symbol list */
  margin-top: 1em;
}

.sec_header { /* Section header */
  margin: 0.5em 0;
  font-weight: bold;
  page-break-after: avoid;
}

dt.decl { /* Declaration */
  font-family: monospace;
  font-size: 1.1em;
  font-weight: normal;
  margin: 0.5em 0;
  page-break-after: avoid;
}

.nocmnt { /* Empty comment for undocumented symbols */
  width: 2em;
  margin-bottom: 0.5em;
  border-top: 1px dashed Gray;
}

dd.ddef { /* Definition, Explanation */
  margin: 0.5em 2.5em;
  margin-right: 0;
}

.symlink, .srclink { /* Paragraph and Hash char */
  display: none;
}

.symbol { /* D symbol */
/*   font-weight: bold; */
  color: DarkGreen;
}

.summary { /* Summary comment */
  margin: 0.5em 0;
}

.params em, .tparams em { /* Function or template parameter name */
  font-weight: normal;
  font-style: italic;
  color: OliveDrab;
}

.attrs { /* E.g.: [private, extern(C)] */
  font-size: 0.9em;
}

table.params td {
  vertical-align: top;
}

table.params td:first-child {
  padding-right: 0.2em;
  text-align: right;
}

/* Code formatting */
.d_code {
  font-size: 0.9em;
  margin: 0.5em 0em;
  border: 1px dotted Gray;
  border-collapse: collapse;
}
.d_code pre {
  margin: 0.1em 0.2em;
}
.d_codetext {
  width: 100%;
}
.d_codelines {
  border-right: 1px dotted Gray;
  background-color: #F5F5F5;
  text-align: right;
  color: Gray;
}
/* Number */
.d_code .n { color: teal; }
/* Keyword */
.d_code .k { color: darkblue; font-weight: bold; }
/* Line, block and nested comments */
.d_code .lc, .bc, .nc { color: gray; }
/* Identifier */
.d_code .i { color: black; }
/* String literal */
.d_code .sl { color: firebrick; }
/* Character literal */
.d_code .cl { color: purple; }
/* Special tokens */
.d_code .st { color: green; font-weight: bold; }
/* #line, hash line */
.d_code .hl { color: green; }
/* filespec (e.g. #line number [filespec]) */
.d_code .fs { color: purple;}
/* When the first line starts with "#!" it's a "shebang" */
.d_code .shebang { color: gray; }

.d_code .d.Module .i, .d_code .d.Import .i { color: blue; }
.d_code .t.Identifier .i, .d_code .TemplateTypeParameter .i { color: DarkRed; }
.d_code .t .k { color: DarkRed; font-weight: normal; }

.d_code .d > .i { color: ForestGreen; }
.d_code .o.Parameter > .i { color: OliveDrab; font-style: italic; }
