@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */

/* blocks */

html, div, map, dt, isindex {
  display: block;
}

body {
  display: block;
  margin: 8px;
}

p, dl, multicol {
  display: block;
  margin: 1em 0;
}

dd {
  display: block;
  /* margin-start: 40px; */
}

blockquote {
  display: block;
  margin: 1em 40px;
}

address {
  display: block;
  font-style: italic;
}

center {
  display: block;
  text-align: center;
}

blockquote[type=cite] {
  display: block;
  margin: 1em 0px;
  padding-left: 1em;
  border-left: solid;
  border-color: blue;
  border-width: thin;
}

span[_moz_quote=true] {
  color: blue;
}

pre[_moz_quote=true] {
  color: blue;
}

h1 {
  display: block;
  font-size: 2em;
  font-weight: bold;
  margin: .67em 0;
}

h2 {
  display: block;
  font-size: 1.5em;
  font-weight: bold;
  margin: .83em 0;
}

h3 {
  display: block;
  font-size: 1.17em;
  font-weight: bold;
  margin: 1em 0;
}

h4 {
  display: block;
  font-weight: bold;
  margin: 1.33em 0;
}

h5 {
  display: block;
  font-size: 0.83em;
  font-weight: bold;
  margin: 1.67em 0;
}

h6 {
  display: block;
  font-size: 0.67em;
  font-weight: bold;
  margin: 2.33em 0;
}

listing {
  display: block;
  font-family: monospace;
  font-size: medium;
  white-space: pre;
  margin: 1em 0;
}

plaintext, xmp, pre {
  display: block;
  font-family: monospace;
  white-space: pre;
  margin: 1em 0;
}

/* tables */

table {
  display: table;
  border-spacing: 2px;
  border-collapse: separate;
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 0;
}

table[align="left"] {
  float: left;
}

table[align="right"] {
  float: right;
  text-align: start;
}

table[rules] {
  border-collapse: collapse;
}

/* caption inherits from table not table-outer */
caption {
  display: table-caption;
  text-align: center;
}

table[align="center"] > caption {
  margin-left: auto;
  margin-right: auto;
}

table[align="center"] > caption[align="left"] {
  margin-right: 0;
}

table[align="center"] > caption[align="right"] {
  margin-left: 0;
}

tr {
  display: table-row;
  vertical-align: inherit;
}

col {
  display: table-column;
}

colgroup {
  display: table-column-group;
}

tbody {
  display: table-row-group;
  vertical-align: middle;
}

thead {
  display: table-header-group;
  vertical-align: middle;
}

tfoot {
  display: table-footer-group;
  vertical-align: middle;
}

/* for XHTML tables without tbody */
table > tr {
  vertical-align: middle;
}

td {
  display: table-cell;
  vertical-align: inherit;
  text-align: inherit;
  padding: 1px;
}

th {
  display: table-cell;
  vertical-align: inherit;
  font-weight: bold;
  padding: 1px;
}

col[span],
colgroup[span] {
  -x-liblayout-colspan: attr(span);
}

td[colspan],
th[colspan] {
  -x-liblayout-colspan: attr(colspan);
}

td[rowspan],
th[rowspan] {
  -x-liblayout-rowspan: attr(rowspan);
}

col[align],
colgroup[align],
td[align],
th[align] {
  text-align: attr(align);
}

col[valign],
colgroup[valign],
td[valign],
th[valign] {
  vertical-align: attr(valign);
}

/** Todo: Char, charoff */

/* inlines */

q:before {
  content: open-quote;
}

q:after {
  content: close-quote;
}

b, strong {
  font-weight: bolder;
}

i, cite, em, var, dfn {
  font-style: italic;
}

tt, code, kbd, samp {
  font-family: monospace;
}

u, ins {
  text-decoration: underline;
}

s, strike, del {
  text-decoration: line-through;
}

blink {
  text-decoration: blink;
}

big {
  font-size: larger;
}

small {
  font-size: smaller;
}

sub {
  vertical-align: sub;
  font-size: smaller;
  line-height: normal;
}

sup {
  vertical-align: super;
  font-size: smaller;
  line-height: normal;
}

nobr {
  white-space: nowrap;
}

/* titles */
abbr[title], acronym[title] {
  border-bottom: dotted 1px;
}

/* lists */
/* Set up ol and ul so that they reset the list-item counter */
ol, ul {
  counter-reset: list-item;
}

ul, menu, dir {
  display: block;
  list-style-type: disc;
  margin: 1em 0;
  padding-left: 2.5em;
}

ol {
  display: block;
  list-style-type: decimal;
  margin: 1em 0;
  padding-left: 2.5em;
}

li {
  /* counter-increment: list-item; (implied by display: list-item) */
  display: list-item;
}

/* nested lists have no top/bottom margins */
ul ul,   ul ol,   ul dir,   ul menu,   ul dl,
ol ul,   ol ol,   ol dir,   ol menu,   ol dl,
dir ul,  dir ol,  dir dir,  dir menu,  dir dl,
menu ul, menu ol, menu dir, menu menu, menu dl,
dl ul,   dl ol,   dl dir,   dl menu,   dl dl {
  margin-top: 0;
  margin-bottom: 0;
}

/* 2 deep unordered lists use a circle */
ol ul,   ul ul,   menu ul,   dir ul,
ol menu, ul menu, menu menu, dir menu,
ol dir,  ul dir,  menu dir,  dir dir {
  list-style-type: circle;
}

/* 3 deep (or more) unordered lists use a square */
ol ol ul,     ol ul ul,     ol menu ul,     ol dir ul,
ol ol menu,   ol ul menu,   ol menu menu,   ol dir menu,
ol ol dir,    ol ul dir,    ol menu dir,    ol dir dir,
ul ol ul,     ul ul ul,     ul menu ul,     ul dir ul,
ul ol menu,   ul ul menu,   ul menu menu,   ul dir menu,
ul ol dir,    ul ul dir,    ul menu dir,    ul dir dir,
menu ol ul,   menu ul ul,   menu menu ul,   menu dir ul,
menu ol menu, menu ul menu, menu menu menu, menu dir menu,
menu ol dir,  menu ul dir,  menu menu dir,  menu dir dir,
dir ol ul,    dir ul ul,    dir menu ul,    dir dir ul,
dir ol menu,  dir ul menu,  dir menu menu,  dir dir menu,
dir ol dir,   dir ul dir,   dir menu dir,   dir dir dir {
  list-style-type: square;
}

/* The type attribute on ol and ul elements */
ul[type="disc"] { list-style-type: disc; }
ul[type="circle"] { list-style-type: circle; }
ul[type="square"] { list-style-type: square; }
ol[type="1"] { list-style-type: decimal; }
ol[type="a"] { list-style-type: lower-alpha; }
ol[type="A"] { list-style-type: upper-alpha; }
ol[type="i"] { list-style-type: lower-roman; }
ol[type="I"] { list-style-type: upper-roman; }

/* The start attribute on ol elements */
ol[start] {
  counter-reset: list-item attr(start, integer, 1);
  counter-increment: list-item -1;
}

/* The value attribute on li elements */
li[value] {
  counter-reset: list-item attr(value, integer, 1);
  counter-increment: none;
}


/* leafs */

/* <hr> noshade and color attributes are handled completely by
 * the nsHTMLHRElement attribute mapping code
 */
hr {
  display: block;
  height: 2px;
  border: 1px inset;
  margin: 0.5em auto 0.5em auto;
/*  -moz-float-edge: margin-box;
  -moz-box-sizing: border-box;*/
}

hr[size="1"] {
  border-style: solid none none none;
}

a {
  target-new: window;
  target-position: above;
  target-name: current;
}

a[href] {
  -x-liblayout-href-target: attr(href,string);
}

a[name] {
  -x-liblayout-href-anchor: attr(name,string);
}

a img, img[usemap], object[usemap] {
  border: 2px solid;
}

a[target],
area[target],
form[target] {
  target-name: attr(target,string)
}

a[target="_blank"],
area[target="_blank"],
form[target="_blank"] {
  target-name: new
}

a[target="_self"],
area[target="_self"],
form[target="_self"] {
  target-name: current
}

a[target="_parent"],
area[target="_parent"],
form[target="_parent"] {
  target-name: parent
}

a[target="_top"],
area[target="_top"],
form[target="_top"] {
  target-name: root
}

img[src] {
  /** The current CSS parser does not supply types as required by CSS3 */
  content: url(attr(src,url)), url("res://org/jfree/layouting/broken-image.gif");
}

/**
 * We dont use the ::alternate element here, as image rendering may fail
 * at any time. Ultimatly, it is the Renderer's choice whether to skip images,
 * use the alternate text or to display some kind of placeholder image.
 */
img[alt] {
  -x-liblayout-alternate-text: attr(alt);
}

img[usemap], object[usemap] {
  color: blue;
}

frameset {
  display: block ! important;
  overflow: scroll;
}

iframe {
  border: 2px inset;
  -moz-user-focus: normal;
}

noframes {
  display: none;
}

/* focusable content */

/* hidden elements */
area, base, basefont, head, meta, script, style, title,
noembed, noscript, param {
   display: none;
}

/* emulation of non-standard HTML <marquee> tag */
marquee {
  display: block;
}

/* PRINT ONLY rules follow */
@media print {

  /* XXX this should not be necessary, we should be stopping blinking
     of any kind in print preview, not just the <blink> element */
  blink {
    text-decoration: none;
  }

}


/**
 * JFreeReport: Addition to emulate the 'br' tag. This is one of the magic
 * tags. Mozilla simply ignores all style definitions for that tag and inserts
 * linebreak into the text (ignoring all whitespace definitions).
 */
br {
  content: "\A";
  white-space: pre;
}

li:marker {
  content: normal;
  display: inline-block;
  margin-left: 0.5em;
  margin-right: 0.5em;
}
