/*
 | This file is part of the DITA Open Toolkit project hosted on 
 | Sourceforge.net. See the accompanying license.txt file for 
 | applicable licenses.
*/

/*
 | (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved.
*/

/* mods to update in topic_classed:
	box model for link/linklist etc
      CALS table model
*/

/* element-based lookups for a core DITA topic */

author, copyright, critdates, permissions, audience, othermeta, language, category, context, dd, ddhd, desc, dl, dlentry, dt, dthd, example, fig, figbody, lq, note, ol, p, prolog, relgroup, longdesc, title, ul    {
	display: block;
}

topic    {
	display: block;
	margin-top: 6pt;
	margin-bottom: 9pt;
	font-family: sans-serif;
	padding-left: 5px;
	padding-right: 5px;
}

topic > title    {
	display: block;
	margin-top: 16pt;
	margin-bottom: 9pt;
	font-size: 20pt;
	font-weight: bold;
	color: #000001;
}

* > topic > title    {
	margin-top: 20pt;
	font-size: 16pt;
	font-weight: bold;
	color: #000002;
}

* > * > topic > title    {
	margin-top: 20pt;
	font-size: 14pt;
	font-weight: bold;
	color: #000002;
}

* > * > * > topic > title    {
	margin-top: 10pt;
	font-size: 12pt;
	font-weight: bold;
	color: #000000;
}

searchtitle {
	margin-top: 6pt;
	margin-left: 24pt;
	font-size: 12pt;
	font-weight: bold;
	display: block;
	color: teal;
}

searchtitle:before {
	color: blue;
	font-weight: bold;
	margin-left: 24pt;
	display: inline;
	margin-left: 24pt;
	content: "Search Title: ";
}


/* For authoring, call attention to shortdesc by boxing it.  
   For output, its just a paragraph. */
shortdesc    {
	display: block;
	margin-top: 6pt;
	margin-bottom: 6pt;
	border: thin solid black;
}


prolog    {
	margin-top: 1pc;
	margin-left: 24pt;
	background-color: #99FFCC;
	padding-top: 3pt;
	padding-right: 3pt;
	padding-left: 3pt;
	padding-bottom: 6pt;
	border: thin solid olive;
	margin-bottom: 1pc;
}

body    {
	display: block;
	margin-left: 12pt;
}

/* general setup for section-like divisions and exhibits */
section, example, table, fig    {
	margin-top: 12pt;
	display: block;
}

section > title, example > title    {
	display: block;
	font-weight: bold;
	margin-top: 6pt;
	margin-bottom: 2pt;
}


/*== special content and exhibits ==*/

*[spectitle]:before {
	display: block;
	font-weight: bold;
	margin-bottom: 2pt;
	content: attr(spectitle)": ";
}

section[spectitle]:before, 
example[spectitle]:before    {
	display: block;
	font-weight: bold;
	font-size: 10pt;
	content: attr(spectitle)": ";
}


/*== body content ==*/

/* apparently not supported in XXE */
section > p:first-child {
	display: block;
	margin-top: 6pt;
	margin-bottom: 6pt;
}

section > p {
	display: block;
	margin-top: 6pt;
}

p, note    {
	display: block;
	margin-bottom: 6pt;
}

note > p    {
	display: block;
	margin-top: 6pt;
	margin-bottom: 6pt;
}

note[type="note"]:before    {
	font-weight: bold;
	content: "Note: ";
}

note[type="tip"]:before    {
	font-weight: bold;
	content: "Tip: ";
}

note[type="fastpath"]:before    {
	font-weight: bold;
	content: "Fastpath: ";
}

/* additional to add here: attention, caution, danger, important, remember, restriction, other */ 

note:before    {
	font-weight: bold;
	content: attr(type) ": ";
}

/*== list item ==*/

li    {
	margin-left: 20pt;
	display: list-item;
	margin-bottom: 2pt;
	margin-top: 6pt;
}

ul, ol    {
	margin-top: 6pt;
        margin-bottom: 6pt;
}

ul > li    {
	list-style-type: disc;
}

ol > li    {
	list-style-type: decimal;
}

sl    {
	list-style: none;
}

sli    {
	display: list-item;
}



/*== phrase markup ==*/
q:before    {
	content: "\"";
}

q:after    {
	content: "\"";
}

cite    {
	font-style: italic;
}

fn:before    {
	color: purple;
	font-weight: bold;
	content: " [Footnote: ";
}

fn:after    {
	color: purple;
	font-weight: bold;
	content: "] ";
}

fn    {
	color: purple;
	font-weight: bold;
}


/*== default (preferred) rendering of dl as indented list ==*/

dl[title]:before, *[title]:before    {
	font-weight: bold;
	font-size: 10pt;
	content: attr(title) ": ";
}

dlhead    {
	font-weight: bold;
}

dl    {
	margin-left: 2ex;
	margin-top: 1.33ex;
	margin-bottom: 1.33ex;
}

dt, dthd    {
	font-weight: bold;
}

dd, ddhd    {
	margin-left: 4ex;
}


/*== line-oriented content ==*/

pre    {
	display: block;
	white-space: pre;
	background-color: #e0e0e0;
	border: thin solid gray;
	font-family: monospace;
//	font-size: .83em;
	margin-top: 1.33ex;
	margin-bottom: 1.33ex;
}

lines    {
	white-space: pre;
	display: block;
	font-style: normal;
}


/*== blocked paragraphs and contexts ==*/

lq    {
	margin-left: 20pt;
	display: block;
	margin-top: 6pt;
}

p > pre    {
	margin-top: 6pt;
}

note:before    {
	font-weight: bold;
	content: attr(type) ": ";
}


/* generic support for the scale attribute (must match an e*/
/*display-atts:
scale (50|60|70|80|90|100|110|120|140|160|180|200) #IMPLIED
frame (top | bottom |topbot | all | sides | none) #IMPLIED
expanse (page|column|textline) #IMPLIED
*/
*[scale="50"]    {
	font-size: 50%;
}

*[scale="60"]    {
	font-size: 60%;
}

*[scale="70"]    {
	font-size: 70%;
}

*[scale="80"]    {
	font-size: 80%;
}

*[scale="90"]    {
	font-size: 90%;
}

*[scale="100"]    {
	font-size: 100%;
}

*[scale="110"]    {
	font-size: 110%;
}

*[scale="120"]    {
	font-size: 120%;
}

*[scale="140"]    {
	font-size: 140%;
}

*[scale="160"]    {
	font-size: 160%;
}

*[scale="180"]    {
	font-size: 180%;
}

*[scale="200"]    {
	font-size: 200%;
}


/*== figure markup ==*/

fig[frame="all"]    {
	border: thin solid black;
}


/*== compact (for dl and its derivatives; considering deprecation) ==*/

*[compact="yes"] > li {
	margin-top: 0pt;
}


/* == titles for figs, tables == */

fig > title    {
	font-weight: bold;
	display: block;
	margin-bottom: 4pt;
}

fig > title:before    {
	font-weight: bold;
	content: "Figure: ";
}

table > title    {
	font-weight: bold;
	display: block;
	margin-bottom: 4pt;
}

table > title:before    {
	font-weight: bold;
	content: "Table: ";
}


/*== CALS table markup ==*/

table {
	display: block;
}

thead > row > entry    {
	font-weight: bold;
}

tgroup    {
	display: table;
}

thead    {
	display: table-header-group;
}

tfoot    {
	display: table-footer-group;
}

tbody    {
	display: table-row-group;
}

row    {
	display: table-row;
}

entry    {
	display: table-entry;
	border: thin solid black;
}


/* rendering for context dependent table content */
/*
section > table, example > table    {
	margin-top: 0pt;
}
*/

entry > image    {
	margin-top: 0pt;
	margin-bottom: 0pt;
}


/*== simple table markup ==*/

simpletable {
	display: table;
	border: thin solid gray;
}

strow, 
sthead {
	display: table-row;
}

sthead > stentry {
	display: table-cell;
	font-weight: bold;
	text-align: center;
	border: thin solid gray;
}

strow > stentry {
	display: table-cell;
	border: thin solid gray;
}



note    {
	margin-top: 6pt;
}


/*== frame support for figures, tables ==*/

*[class~="topic\/fig"][frame="topbot"] {
	border: thin solid black;
}


/* index terms in phrase contexts */

*[class~="topic\/indexterm"] {
	display: block;
	margin-left: +6pt;
	border: thin inset gray; 
	color: black;
	background-color: #ffddff;
}

*[class~="topic\/indexterm"]:before {
	content: "[index term: ";
}

*[class~="topic\/indexterm"]:after {
	content: "]";
}


/*== prolog and metadata ==*/
author:before    {
	color: blue;
	font-weight: bold;
	content: "Author [";
}

author:after    {
	color: blue;
	font-weight: bold;
	content: "]";
}

copyrholder    {
	display: block;
}

year:before    {
	content: "Copyright year " attr(year) " ";
}

copyright:before    {
	color: blue;
	font-weight: bold;
	content: "Copyright [";
}

copyright:after    {
	color: blue;
	font-weight: bold;
	content: "]";
}

critdates:before    {
	color: blue;
	font-weight: bold;
	content: "Critical dates [";
}

critdates:after    {
	color: blue;
	font-weight: bold;
	content: "]";
}

permissions:before    {
	color: blue;
	font-weight: bold;
	content: "Permissions [";
}

permissions:after    {
	color: blue;
	font-weight: bold;
	content: "]";
}

metadata    {
	display: block;
	background-color: #66FF66;
	padding-top: 3pt;
	padding-right: 3pt;
	padding-left: 3pt;
	padding-bottom: 6pt;
	border: thin solid red;
	margin-top: 2pt;
	margin-left: 2pt;
	margin-right: 2pt;
	margin-bottom: 2pt;
}

prolog:before    {
	color: black;
	font-weight: bold;
	content: "Prolog:";
}

metadata:before    {
	color: black;
	font-weight: bold;
	content: "Metadata:";
}

prodinfo {
	background-color: #e0e0e0;
	display: block;
	margin-left: 16pt;
	margin-top: 6pt;
	border: thin solid black;
}

category:before    {
	color: blue;
	font-weight: bold;
	content: "Category [";
}

category:after    {
	color: blue;
	font-weight: bold;
	content: "]";
}

audience:before    {
	color: blue;
	font-weight: bold;
	content: "Audience [" attr(type) "]";
}

keywords:before    {
	color: blue;
	font-weight: bold;
	content: "Keywords [";
}

keywords:after    {
	color: blue;
	font-weight: bold;
	content: "]";
}

language:before    {
	color: blue;
	font-weight: bold;
	content: "Language [" attr(lang) "]";
}

othermeta:before    {
	color: blue;
	font-weight: bold;
	content: "Other Metadata: name=[" attr(name) "] content=[" attr(content) "]";
}


/*== image data ==*/

image, image[placement="inline"] {
	display: inline;
	content: image(attr(href),-400,-200);
}

image[placement="break"] {
	display: block;
	content: image(attr(href),-400,-200);
}



/*== specially highlighted elements ==*/

required-cleanup {
	color: #CC3333;
	background-color: #FFFF99;
	border: thick solid black;
}

draft-comment {
	display: block;
	margin-top: 6pt;
	margin-bottom: 2pt;
	background-color: #FF99FF;
	border: thin solid black;
}
/*  color: #CC3333; */


draft-comment:before {
	font-weight: bold;
	content: "Comment by "attr(reviewer)": ";
}




/*== linking in topics ==*/

related-links {
	display: block;
}

related-links:before {
	display: block;
	color: black;
	font-weight: bold;
	content: "Related Links:";
}

links, linklist, linkpool    {
	margin-top: 1.33ex;
	margin-bottom: 1.33ex;
	display: block;
	margin-left: 2ex;
}

links:before, linklist:before, linkpool:before    {
	color: green;
	font-weight: bold;
	content: "Links:";
}

links > title, linklist > title, linkpool > title    {
	display: block;
	font-weight: bold;
	margin-top: 6pt;
}

/*== common and separate behaviors of link, xref, cite ==*/

link {
	display: block;
	margin-left: +20pt;
}

xref, cite    {
	display: inline;
}

link, xref, cite {
	text-decoration: underline;
	color: red;
}

link[href], xref[href], cite[href] {
	text-decoration: underline;
	color: blue;
}

xref:before    {
	font-weight: bold;
	content: "[" attr(type) "--" attr(href) "]";
}

*[class~="topic\/xref"]:before {
	font-weight: bold;
	content: "["attr(type)"--"attr(href)"]";
}


/* rendering support for XML meta elements (comments, PIs) */

*:comment, *:processing-instruction    {
	padding: 2px;
	font-size: smaller;
	font-family: monospace;
}

*:comment    {
	border: thin solid rgb(128, 128, 0);
	background-color: rgb(192, 192, 128);
}

*:processing-instruction    {
	border: thin solid rgb(0, 128, 0);
	background-color: rgb(192, 255, 192);
}

*:comment, *:processing-instruction    {
	display: block;
	white-space: pre;
	margin: 2px;
}





/* process specific behaviors */


@media morphon {
	*    {
		additional-helpset-location: url(dita-help.jar);
		additional-helpset-mapfile: url(morphon-map.xml);
		additional-helpset-name: dita-help;
	}
	entry    {
		display: table-cell;
	}
	xtgroup    {
		table-model: cals;
	}
	image[format="GIF"]    {
		plugin-view: "com.morphon.visualplugins.docbook.DocBook_ImageData";
	}

}


@media xxe {
/* list item */

}


/*== dl, table-like rendering ==*/
xdl:before    {
	font-weight: bold;
	font-size: 10pt;
}

xdl    {
	display: table;
}

xdlhead    {
	display: table-row;
}

xdthd    {
	display: table-cell;
	list-style-type: none;
	font-weight: bold;
	background-color: silver;
}

xddhd    {
	content: " - ";
	display: table-cell;
	font-weight: bold;
	background-color: silver;
}

xdlentry    {
	display: table-row;
}

xdt    {
	display: table-cell;
	font-weight: bold;
}

xdd    {
	display: table-cell;
}

/* yet another dl version */
xdt    {
	font-weight: bold;
}

xdd    {
	display: list-item;
	list-style-type: none;
}

