@use-default-attribute-values;

/*
 * Copyright (c) 2006-2013 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Styles for map elements. 
 */

@import url(xxe-config:common/css/object.imp);

/* metadata.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Metadata elements. 
 */

/* topic ------------------------------------------------------------------ */

*[class~="map/topicmeta"],
*[class~="topic/prolog"] {
    display: block;
    collapsible: yes;
    collapsed: yes;
    collapsed-content: paragraph(content("(", element-name(), ")"), 
                                 color, #808000, 
                                 font-size, smaller,
                                 font-weight, bold);
    collapsed-content-align: center;
    background-color: #F8F8E0;
    border: 1px solid #C0C080;
    padding: 0.5ex;
    border-radius: 1ex;
    margin-left: 20px;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex; 
}

*[class~="map/topicmeta"]:before,
*[class~="topic/prolog"]:before {
    display: marker;
    content: collapser(collapsed-icon, icon(pop-right), 
                       expanded-icon, icon(pop-down));
    color: #808000;
}

*[class~="topic/resourceid"],
*[class~="topic/series"],
*[class~="topic/source"],
*[class~="topic/permissions"],
*[class~="topic/prognum"],
*[class~="topic/publisher"],
*[class~="topic/othermeta"],
*[class~="topic/platform"],
*[class~="topic/featnum"],
*[class~="topic/keywords"],
*[class~="topic/critdates"],
*[class~="topic/copyright"],
*[class~="topic/component"],
*[class~="topic/prodname"],
*[class~="topic/audience"],
*[class~="topic/brand"],
*[class~="topic/category"],
*[class~="topic/prodinfo"],
*[class~="topic/metadata"],
*[class~="topic/author"] {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex; 
}

*[class~="topic/resourceid"],
*[class~="topic/permissions"],
*[class~="topic/othermeta"],
*[class~="topic/created"],
*[class~="topic/revised"],
*[class~="topic/copyryear"],
*[class~="topic/vrm"],
*[class~="topic/audience"] {
    color: #404040;
}

*[class~="topic/audience"] {
    /*Without paragraph, does not wrap line.*/
    content: paragraph(content("type=", attr(type),
                              " job=", attr(job),
                              " experiencelevel=", attr(experiencelevel)));
}

*[class~="topic/vrm"] {
    display: block;
    margin-left: 16ex;
    content: paragraph(content("version=", attr(version),
                               " modification=", attr(modification),
                               " release=", attr(release)));
}

/*nothing before vrmlist*/
*[class~="topic/vrmlist"] {
    display: block;
    margin: 1.33ex 0;
}

*[class~="topic/copyryear"],
*[class~="topic/copyrholder"] {
    display: inline;
}

*[class~="topic/copyryear"] {
    content: " year=" attr(year) " ";
}

*[class~="topic/created"],
*[class~="topic/revised"] {
    display: block;
    margin-left: 16ex;
    /*vertical margins in critdates*/
}

*[class~="topic/created"] {
    content: paragraph(content("date=", attr(date)));
}

*[class~="topic/created"][golive] {
    content: paragraph(content("date=", attr(date), 
                               " golive=", attr(golive)));
}

*[class~="topic/revised"] {
    content: paragraph(content("modified=", attr(modified)));
}

*[class~="topic/revised"][golive] {
    content: paragraph(content("modified=", attr(modified), 
                               " golive=", attr(golive)));
}

*[class~="topic/othermeta"] {
    content: paragraph(content("name=", attr(name),
                               " content=", attr(content)));
}

*[class~="topic/permissions"] {
    content: paragraph(content("view=", attr(view)));
}

*[class~="topic/resourceid"] {
    content: paragraph(content("id=", attr(id),
                               " appname=", attr(appname)));
}

*[class~="topic/keywords"] > *:before {
    display: inline;
    content: " ";
}

*[class~="topic/keywords"] > *:first-child:before {
    content: "";
}

*[class~="topic/resourceid"]:before,
*[class~="topic/series"]:before,
*[class~="topic/source"]:before,
*[class~="topic/permissions"]:before,
*[class~="topic/prognum"]:before,
*[class~="topic/publisher"]:before,
*[class~="topic/othermeta"]:before,
*[class~="topic/platform"]:before,
*[class~="topic/featnum"]:before,
*[class~="topic/keywords"]:before,
*[class~="topic/critdates"]:before,
*[class~="topic/created"]:before,
*[class~="topic/revised"]:before,
*[class~="topic/copyryear"]:before,
*[class~="topic/copyright"]:before,
*[class~="topic/component"]:before,
*[class~="topic/vrm"]:before,
*[class~="topic/prodname"]:before,
*[class~="topic/audience"]:before,
*[class~="topic/brand"]:before,
*[class~="topic/category"]:before,
*[class~="topic/prodinfo"]:before,
*[class~="topic/metadata"]:before,
*[class~="topic/author"]:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="topic/copyryear"]:before {
    display: inline;
}

*[class~="topic/author"][href]:after,
*[class~="topic/publisher"][href]:after,
*[class~="topic/source"][href]:after {
    display: inline;
    content: icon(right-link) attr(href);
    font-size: smaller;
    font-family: monospace;
    color: #404040;
}

*[class~="topic/author"][keyref]:after,
*[class~="topic/publisher"][keyref]:after,
*[class~="topic/source"][keyref]:after {
    display: inline;
    content: icon(external-link-small) attr(keyref);
    font-size: smaller;
    font-family: monospace;
    color: #404040;
}


/* ================================================= metadata.imp */
/* body.imp ================================================= */
/*
 * Copyright (c) 2006-2013 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Body elements. 
 */

/* topic ------------------------------------------------------------------ */

/*
 * Divisions
 */

*[class~="topic/example"],
*[class~="topic/section"] {
    display: block;
    margin: 1.33ex 0;
}

*[class~="topic/title"] {
    display: block;
    font-family: serif;
    font-weight: bold;
    margin: 1.33ex 0;
}

*[class~="topic/example"] > *[class~="topic/title"],
*[class~="topic/section"] > *[class~="topic/title"] { 
    font-size: 1.3em;
    margin: 1ex 0;
}

*[class~="topic/example"] > *[class~="topic/title"]:before {
    display: inline;
    content: "Example: ";
}

*[class~="topic/sectiondiv"] {
    display: block;
    margin: 1.33ex 0;
}

/*
 * Simple lists
 */

*[class~="topic/sl"] {
    display: block;
    margin-left: 2ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/sli"] {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/sl"][compact=yes] > *[class~="topic/sli"] {
    margin-top: 0;
    margin-bottom: 0;
}

/*
 * Ordered and unordered lists
 */

*[class~="topic/ol"],
*[class~="topic/ul"] { 
    display: block;
    margin-left: 2ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/ul"] { 
    list-style-type: disc;
}

*[class~="topic/ul"] *[class~="topic/ul"] { 
    list-style-type: square;
}

*[class~="topic/ul"] *[class~="topic/ul"] *[class~="topic/ul"] { 
    list-style-type: circle;
}

*[class~="topic/ol"] { 
    list-style-type: decimal;
}

*[class~="topic/li"] {
    display: list-item;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/ul"][compact=yes] > *[class~="topic/li"],
*[class~="topic/ol"][compact=yes] > *[class~="topic/li"] {
    margin-top: 0;
    margin-bottom: 0;
}

*[class~="topic/li"] > *:first-child {
    margin-top: 0; 
    margin-bottom: 0; 
}
      
/*
 * Definition lists
 */

*[class~="topic/dl"] {
    display: block;
    margin-left: 2ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/dlhead"],
*[class~="topic/dlentry"] {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/dl"][compact=yes] > *[class~="topic/dlhead"],
*[class~="topic/dl"][compact=yes] > *[class~="topic/dlentry"] {
    margin-top: 0;
    margin-bottom: 0;
}

*[class~="topic/dthd"],
*[class~="topic/dt"] {
    display: block;
    font-weight: bold; 
}

*[class~="topic/dt"][keyref]:after {
    content: icon(external-link-small) attr(keyref);
    display: inline;
    font-size: smaller;
    font-weight: normal;
    color: #404040;
}

*[class~="topic/ddhd"],
*[class~="topic/dd"] {
    display: block;
    margin-left: 4ex;
}

*[class~="topic/dl"]:contains-element(dlhead) {
    display: table;
    border: 1 solid #E0E0E0;
}

*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlhead"],
*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlentry"] {
    display: table-row;
    margin-top: 0;
    margin-bottom: 0;
}

*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlhead"] {
    background-color: #E0E0E0;
}

*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlentry"] {
    background-color: inherit; /*e.g. from read-only dl*/
}

*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlhead"] > *[class~="topic/dthd"],
*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlhead"] > *[class~="topic/ddhd"],
*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlentry"] > *[class~="topic/dt"],
*[class~="topic/dl"]:contains-element(dlhead) > *[class~="topic/dlentry"] > *[class~="topic/dd"] {
    display: table-cell;
    margin-left: 0;
    border: 1 solid #E0E0E0;
    padding: 2px;
    background-color: inherit;
}

/*
 * Figures
 */

*[class~="topic/fig"] {
    display: block;
    margin: 1.33ex 0;
}

*[class~="topic/figgroup"] {
    display: block;
    margin: 1.33ex 0;
}

*[class~="topic/desc"] {
    display: inline;
}

*[class~="topic/desc"]:before {
    display: inline;
    content: " [";
    color: #404040;
}

*[class~="topic/desc"]:after {
    display: inline;
    content: "]";
    color: #404040;
}

*[class~="topic/fig"] > *[class~="topic/desc"],
*[class~="topic/object"] > *[class~="topic/desc"],
*[class~="topic/table"] > *[class~="topic/desc"],
*[class~="topic/linklist"] > *[class~="topic/desc"] {
    display: block;
    border: 1px solid #E0E0E0;
    padding: 0.5ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/fig"] > *[class~="topic/desc"]:before,
*[class~="topic/object"] > *[class~="topic/desc"]:before,
*[class~="topic/table"] > *[class~="topic/desc"]:before,
*[class~="topic/linklist"] > *[class~="topic/desc"]:before {
    display: block;
    content: element-name();
    font-size: smaller;
    font-weight: bold;
    color: #404040;
    margin-top: 1.33ex;
    margin-bottom: 0.5ex;
}

*[class~="topic/fig"] > *[class~="topic/desc"]:after,
*[class~="topic/object"] > *[class~="topic/desc"]:after,
*[class~="topic/table"] > *[class~="topic/desc"]:after,
*[class~="topic/linklist"] > *[class~="topic/desc"]:after {
    content: "";
}

*[class~="topic/object"] > *[class~="topic/desc"],
*[class~="topic/object"] > *[class~="topic/desc"]:before {
    margin-left: object-horizontal-margin();
    margin-right: object-horizontal-margin();
}

/*
 * Image
 */

*[class~="topic/image"] {
    display: inline;
}

*[class~="topic/fig"] > *[class~="topic/image"],
*[class~="ut-d/imagemap"] > *[class~="topic/image"],
*[class~="topic/image"][placement=break] {
    display: block;
    margin-top: 0;
    margin-bottom: 1.33ex;
}

*[class~="topic/fig"] > *[class~="topic/image"]:empty,
*[class~="ut-d/imagemap"] > *[class~="topic/image"]:empty,
*[class~="topic/image"][placement=break]:empty {
    content: icon(invisible);
}

*[class~="topic/fig"] > *[class~="topic/image"][align=right],
*[class~="ut-d/imagemap"] > *[class~="topic/image"][align=right],
*[class~="topic/image"][placement=break][align=right] {
    text-align: right;
    margin-left: auto;
}

*[class~="topic/fig"] > *[class~="topic/image"][align=center],
*[class~="ut-d/imagemap"] > *[class~="topic/image"][align=center],
*[class~="topic/image"][placement=break][align=center] {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

*[class~="topic/image"]:before {
    display: inline;
    content: gadget("com.xmlmind.xmleditext.dita.Image");
}

*[class~="topic/fig"] > *[class~="topic/image"]:before,
*[class~="ut-d/imagemap"] > *[class~="topic/image"]:before,
*[class~="topic/image"][placement=break]:before {
    display: block;
    margin-top: 1.33ex;     
    margin-bottom: 0;
}

*[class~="topic/alt"] {
    display: inline; /*alt element of an image*/
    font-size: medium; /* otherwise image/@scale has an effect on it */
}

*[class~="topic/alt"]:before {
    display: inline;
    content: " [";
    color: #404040;
}

*[class~="topic/alt"]:after {
    display: inline;
    content: "]";
    color: #404040;
}

*[class~="topic/fig"] > *[class~="topic/image"] > *[class~="topic/alt"],
*[class~="ut-d/imagemap"] > *[class~="topic/image"] > *[class~="topic/alt"],
*[class~="topic/image"][placement=break] > *[class~="topic/alt"] {
    display: block;
    margin-top: 0.5ex;
}

*[class~="topic/longdescref"] {
    display: inline;
    content: icon(right-link);
    font-family: monospace;
    font-size: small; /* otherwise image/@scale has an effect on it */
    color: #404040;
}

*[class~="topic/longdescref"][href] {
    content: icon(right-link) attr(href);
}

*[class~="topic/longdescref"][keyref] {
    content: icon(external-link-small) attr(keyref);
}

*[class~="topic/fig"] > *[class~="topic/image"] > *[class~="topic/longdescref"],
*[class~="ut-d/imagemap"] > *[class~="topic/image"] > *[class~="topic/longdescref"],
*[class~="topic/image"][placement=break] > *[class~="topic/longdescref"] {
    display: block;
    margin-top: 0.5ex;
}

*[class~="topic/object"] > *[class~="topic/longdescref"] {
    display: block;
    margin: 1.33ex object-horizontal-margin();
}

/*
 * Objects
 */

*[class~="topic/object"],
*[class~="topic/param"] {
    display: block;
    property-group: object-properties(#E0E0E0);
}

*[class~="topic/object"]:before,
*[class~="topic/param"]:before {
    property-group: object-before-properties(#E0E0E0);
}

*[class~="topic/object"]::attribute,
*[class~="topic/param"]::attribute {
    property-group: object-attribute-properties();
}

*[class~="topic/param"]::attribute(name),
*[class~="topic/param"]::attribute(value) {
    show-attribute: always;
}

*::processing-instruction(onclick) {
    display: inline;
    content: gadget("com.xmlmind.xmleditapp.cmd.object.Onclick");
    background-color: transparent;
}

/*
 * Block elements
 */

*[class~="topic/p"] {
    display: block;
    margin: 1.33ex 0;
}

*[class~="topic/lines"] {
    display: block;
    white-space: pre;
    margin: 1.33ex 0;
}

*[class~="topic/pre"] {
    display: block;
    white-space: pre;
    font-family: monospace;
    background-color: #F0F0F0; 
    border: 1px solid #C0C0C0; 
    padding: 0.5ex; 
    margin: 1.33ex 0;
}

*[class~="topic/note"] {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/note"]:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="topic/note"][type]:before {
    content: attr(type);
}

*[class~="topic/note"][type=other][othertype]:before {
    content: xpath("substring(@othertype,1,14)");
}

*[class~="topic/note"] > *:first-child {
    margin-top: 0; 
    margin-bottom: 0; 
}

*[class~="topic/lq"] {
    display: block;
    line-height: 1.2;
    margin: 1.33ex 10ex;
}

*[class~="topic/lq"][reftitle]:after,
*[class~="topic/lq"][href]:after,
*[class~="topic/lq"][keyref]:after {
    display: inline;
    font-size: smaller;
    color: #404040;
}

*[class~="topic/lq"][reftitle]:after {
    content: " (" attr(reftitle) ")";
}

*[class~="topic/lq"][href]:after {
    content: icon(right-link) text(attr(href), font-family, monospace);
}

*[class~="topic/lq"][keyref]:after {
    content: icon(external-link-small) 
             text(attr(keyref), font-family, monospace);
}

*[class~="topic/lq"][href][reftitle]:after {
    content: icon(right-link) text(attr(href), font-family, monospace) 
             " (" attr(reftitle) ")";
}

*[class~="topic/lq"][keyref][reftitle]:after {
    content: icon(external-link-small) 
             text(attr(keyref), font-family, monospace) 
             " (" attr(reftitle) ")";
}

*[class~="topic/longquoteref"] {
    display: inline;
    content: icon(right-link);
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

*[class~="topic/longquoteref"][href] {
    content: icon(right-link) attr(href);
}

*[class~="topic/longquoteref"][keyref] {
    content: icon(external-link-small) attr(keyref);
}

/*
 * Inline elements
 */

*[class~="topic/text"] {
    display: inline;
}

*[class~="topic/ph"] {
    display: inline;
}

*[class~="topic/term"] {
    display: inline;
    font-style: italic;
}

*[class~="topic/keyword"] {
    display: inline;
    font-weight: bold;
}

*[class~="topic/cite"] {
    display: inline;
    font-style: italic;
}

*[class~="topic/ph"][keyref]:after,
*[class~="topic/term"][keyref]:after,
*[class~="topic/keyword"][keyref]:after,
*[class~="topic/cite"][keyref]:after {
    display: inline;
    content: icon(external-link-small) attr(keyref);
    text-decoration: none;
    font-family: monospace;
    font-style: normal;
    font-weight: normal;
    font-size: smaller;
    color: #404040;
}

*[class~="topic/tm"] {
    display: inline;
}

*[class~="topic/tm"]:after {
    display: inline;
    content: "[" attr(tmtype) "]";
    font-size: smaller;
    color: #404040;
}

/* The type of quotes depends on the language */
*[class~="topic/q"][xml|lang],
*[class~="topic/q"] {
    display: inline;
}

*[class~="topic/q"]:before {
    display: inline;
    content: open-quote;
    color: #404040;
}

*[class~="topic/q"]:after {
    display: inline;
    content: close-quote;
    color: #404040;
}

*[class~="topic/xref"] {
    display: inline;
    color: navy;
    text-decoration: underline;
}

*[class~="topic/xref"]:after {
    display: inline;
    content: icon(right-link);
    text-decoration: none;
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

*[class~="topic/xref"][href]:after {
    content: icon(right-link) attr(href);
}

*[class~="topic/xref"][keyref]:after {
    content: icon(external-link-small) attr(keyref);
}

/*
 * Miscellaneous
 */

*[class~="abbrev-d/abbreviated-form"] {
    display: inline;
    content: icon(external-link-small) attr(keyref);
    font-style: italic;
    color: #404040;
}

*[class~="abbrev-d/abbreviated-form"][keyref]:after {
    content: "";
}

*[class~="topic/draft-comment"] {
    display: block;
    color: red;
    margin: 1.33ex 0;
}

*[class~="topic/fn"] {
    display: block;
    white-space: normal;
    font-family: normal;
    font-size: small; /*Not smaller*/
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    margin-left: 8ex;
    margin-right: 8ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/fn"]:before {
    display: marker;
    content: xpath("concat(index-of-node(//fn,.),'.')");
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="topic/fn"][callout]:before {
    content: attr(callout);
}

*[class~="topic/fn"],
*[class~="topic/fn"]:before {
    border-width: 1px;
    border-style: solid;
    border-top-color: gray;
    border-bottom-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
    padding: 2px; 
}

*[class~="topic/required-cleanup"] {
    display: block;
    background-image: icon(hatch2, #FFF0F0);
    padding: 0.5ex; 
    margin: 1.33ex 0;
}

/*
 * Visual attributes
 */

*[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%;
}

*[frame] {
    border: 1px solid black;
    padding: 0.5ex;
}

*[frame=none],
*[class~="topic/table"][frame] {
    border-width: 0;
    padding: 0;
}

*[frame=top] {
    border-left-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
}

*[frame=bottom] {
    border-top-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
}

*[frame=topbot] {
    border-left-color: transparent;
    border-right-color: transparent;
}

*[frame=sides] {
    border-top-color: transparent;
    border-bottom-color: transparent;
}

/*
 * conref
 */

*[conkeyref]:not([conaction]),
*[conref]:not([conaction]) {
    /* Keep same display. */
    font-family: sans-serif;
    font-size: medium;
    font-weight: normal;
    font-style: italic;
    color: gray;
    background-color: transparent;
    border-style: none;
    padding: 0;
    /* Keep same margins. */
}

*[conref]:not([conaction]) {
    content: paragraph(content(icon(pop-se), " ", element-name(), 
                               " conref=", attr(conref)));
}

*[conkeyref]:not([conaction]) {
    content: paragraph(content(icon(pop-se), " ", element-name(), 
                               " conkeyref=", attr(conkeyref)));
}

*[conkeyref][conref]:not([conaction]) {
    content: paragraph(content(icon(pop-se), " ", element-name(), 
                               " conkeyref=", attr(conkeyref),
                               " conref=", attr(conref)));
}

*[conref][conrefend]:not([conaction]) {
    /* Same display */
    content: paragraph(content(icon(pop-se), " ", element-name(), 
                               " conref=", attr(conref),
                               " conrefend=", attr(conrefend)));
}

*[conkeyref][conrefend]:not([conaction]) {
    content: paragraph(content(icon(pop-se), " ", element-name(), 
                               " conkeyref=", attr(conkeyref),
                               " conrefend=", attr(conrefend)));
}

*[conkeyref][conref][conrefend]:not([conaction]) {
    content: paragraph(content(icon(pop-se), " ", element-name(), 
                               " conkeyref=", attr(conkeyref),
                               " conref=", attr(conref),
                               " conrefend=", attr(conrefend)));
}

*[conkeyref]:not([conaction]):before,
*[conref]:not([conaction]):before {
    content: "";
}

*[conkeyref]:not([conaction]):after,
*[conref]:not([conaction]):after {
    content: "";
}


/* ================================================= body.imp */
/* table.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Table elements. 
 */

/* topic ------------------------------------------------------------------ */

/*
 * Simple table
 *
 * Specialization of simpletables is supported: suffice to modify
 * property element having dita.simpleTableEdit.tableSpecification as its name 
 * in the DITA configuration. This property is used by both 
 * com.xmlmind.xmleditext.dita.SimpleTableSupport (cell renderer) and 
 * com.xmlmind.xmleditext.dita.SimpleTableEdit (table editor).
 */

/*
 * Support for the relcolwidth and keycol attributes of simpletable.
 * Not really important. Just nice to have it.
 */
@extension 
"com.xmlmind.xmleditext.dita.SimpleTableSupport dita.simpleTableEdit.tableSpecification";

*[class~="topic/simpletable"] {
    display: table; 
    border: 1 outset gray;
    margin: 1.33ex 0; 
}

*[class~="topic/sthead"] {
    display: table-row;
    font-weight: bold;
    background-color: #E0E0E0;
}

*[class~="topic/strow"] {
    display: table-row; 
    background-color: inherit; /*e.g. from read-only simpletable*/
}

*[class~="topic/stentry"] {
    display: table-cell; 
    background-color: inherit;
    border: 1 inset gray;
    padding: 2px; 
}

*[class~="topic/stentry"] > *:first-child {
    margin-top: 0; 
    margin-bottom: 0; 
}

/*
 * CALS table (but simplified: no spanspec, tfoot, entrytbl, 
 * no colspec inside thead)
 *
 * SPECIALIZATION OF TABLE ``STRUCTURE'' NOT SUPPORTED:
 * The extension used to properly style CALS tables uses element names.
 */

/*
 * "black" is the color used to draw a border around the table and its
 * cells based on values of attributes such as frame, rowsep and colsep.
 *
 * "rgb(238,238,224)" (a very light gray) is the color used to draw 
 * a border around each cell whether the cell actually has borders or not.
 * Remove this parameter if this ``cell footprint'' disturbs you.
 *
 * For more information about CALS table support, see 
 * XMLmind XML Editor - Configuration and Deployment.
 */
@extension 
"com.xmlmind.xmleditext.docbook.table.TableSupport black rgb(238,238,224)";

table {
    display: block;
    margin: 1.33ex 0; 
}
          
table > title {
    font-weight: normal;
    font-style: italic; 
    text-align: center; 
    /* keep margin because tgroup has no margin */
}

colspec {
    display: table-column;
    collapsed: yes;
}

tgroup {
    display: table; 
    border-style: solid;
    border-width: 1;
}
    
thead {
    display: table-row-group;
    font-weight: bold; 
    background-color: #E0E0E0;
}
       
tbody {
    display: table-row-group;
    background-color: inherit; /*e.g. from read-only tgroup*/
}

row {
    display: table-row; 
    background-color: inherit; /*e.g. from read-only tbody*/
}
          
entry {
    display: table-cell; 
    background-color: inherit; /*e.g. from read-only row*/
    border-style: solid;
    border-width: 1;
    padding: 2px; 
}

entry > *:first-child {
    margin-top: 0; 
    margin-bottom: 0; 
}

@media print {
    colspec {
        display: none; 
    }
}


/* ================================================= table.imp */
/* indexing.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Indexing elements. 
 */

/* topic ------------------------------------------------------------------ */

*[class~="topic/indextermref"],
*[class~="topic/indexterm"] {
    display: inline;
    font-size: small; /*not smaller*/
}

*[class~="topic/indextermref"]:before,
*[class~="topic/indexterm"]:first-child:before, /*Often used in keywords*/
*[class~="topic/indexterm"]:before {
    display: inline;
    content: icon(left-half-disc);
    color: gray;
}

*[class~="topic/indexterm"]:after {
    display: inline;
    content: icon(right-half-disc);
    color: gray;
}

*[class~="topic/indextermref"]:after {
    display: inline;
    content: icon(right-half-disc, gray) icon(external-link-small) attr(keyref);
    color: #404040;
}

*[class~="topic/indexterm"][start]:first-child:before,
*[class~="topic/indexterm"][start]:before {
    content: icon(left-half-disc) attr(start) icon(half-disc-separator);
}

*[class~="topic/indexterm"][end]:after {
    content: icon(half-disc-separator) attr(end) icon(right-half-disc);
}

/*
 * Indexing domain
 */

/* indexing-d ------------------------------------------------------------- */

*[class~="topic/index-base"],
*[class~="indexing-d/index-see"],
*[class~="indexing-d/index-see-also"],
*[class~="indexing-d/index-sort-as"] {
    display: inline;
    font-size: small; /*not smaller*/
}

*[class~="topic/index-base"]:before,
*[class~="indexing-d/index-see"]:before,
*[class~="indexing-d/index-see-also"]:before,
*[class~="indexing-d/index-sort-as"]:before {
    display: inline;
    font-weight: bold;
    color: gray;
}

*[class~="topic/index-base"]:before {
    content: " " element-name() " ";
}

*[class~="indexing-d/index-see"]:before {
    content: " see ";
}

*[class~="indexing-d/index-see-also"]:before {
    content: " see also ";
}

*[class~="indexing-d/index-sort-as"]:before {
    content: " sort as ";
}


/* ================================================= indexing.imp */
/* specialization.imp ================================================= */
/*
 * Copyright (c) 2006-2013 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Specialization elements. 
 */

/* topic ------------------------------------------------------------------ */

*[class~="topic/boolean"],
*[class~="topic/state"] {
    display: inline;
    color: #404040;
}

*[class~="topic/boolean"] {
    content: "state=" attr(state);
}

*[class~="topic/state"] {
    content: "name=" attr(name) " value=" attr(value);
}

*[class~="topic/boolean"]:before,
*[class~="topic/state"]:before {
    display: inline;
    content: element-name() " ";
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="topic/foreign"],
*[class~="topic/unknown"] {
    display: block;
    content: "<" xpath("if(./*, name(./*[1]), '???')") ">";
    font-weight: bold;
    color: gray;
    margin: 1.33ex 0;
}

*[class~="topic/itemgroup"] {
    display: block;
    margin: 1.33ex 0;
}

/*
 * data, data-about
 */

*[class~="topic/data-about"],
*[class~="topic/data"] {
    display: block;
    property-group: object-properties(#C0C080);
    background-color: #F8F8E0;
}

*[class~="topic/data-about"]:before,
*[class~="topic/data"]:before {
    property-group: object-before-properties(#E0E0C0);
}

*[class~="topic/data-about"]::attribute,
*[class~="topic/data"]::attribute {
    property-group: object-attribute-properties();
}

*[class~="topic/data-about"]::attribute(href) {
    show-attribute: always;
}

/*
 * no-topic-nesting does not need to be styled.
 */


/* ================================================= specialization.imp */

/* hazard-d.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 *  elements. 
 */

/* hazard-d --------------------------------------------------------------- */

*[class~="hazard-d/hazardstatement"] {
    display: block;
    background-color: #F0FFF0;
    border: 1px solid #C0DDC0;
    padding: 1ex;
    margin: 1.33ex 4ex;
}

*[class~="hazard-d/hazardstatement"][type=danger] {
    background-color: #FFF0F0;
    border: 1px solid #DDC0C0;
}

*[class~="hazard-d/hazardstatement"][type=warning] {
    background-color: #FFF0E0;
    border: 1px solid #FFA500;
}

*[class~="hazard-d/hazardstatement"][type=caution] {
    background-color: #FFFFF0;
    border: 1px solid #DDDDC0;
}

*[class~="hazard-d/hazardstatement"][type=notice] {
    background-color: #E0F0FF;
    border: 1px solid #B0C0DD;
}

*[class~="hazard-d/hazardstatement"]:before {
    display: inline;
    font-weight: bold;
    font-size: larger;
}

*[class~="hazard-d/hazardstatement"]:before {
    content: url(icons/other.png);
}

*[class~="hazard-d/hazardstatement"][type]:before {
    content: concatenate("url(icons/", attr(type), ".png)") " " attr(type);
}

*[class~="hazard-d/hazardstatement"][type=other][othertype]:before {
    content: attr(othertype);
}

*[class~="hazard-d/messagepanel"] {
    display: block;
    margin: 1.33ex 0; 
}

*[class~="hazard-d/messagepanel"]:first-child {
    margin-top: 3.66ex; 
}

*[class~="hazard-d/typeofhazard"],
*[class~="hazard-d/consequence"],
*[class~="hazard-d/howtoavoid"] {
    display: block;
    margin-top: 1.33ex;     
    margin-bottom: 1.33ex;     
    margin-left: 16ex;     
}

*[class~="hazard-d/typeofhazard"]:before,
*[class~="hazard-d/consequence"]:before,
*[class~="hazard-d/howtoavoid"]:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="hazard-d/hazardsymbol"] {
    display: block;
    margin-top: 0;
    margin-bottom: 1.33ex;
}

*[class~="hazard-d/hazardsymbol"]:empty {
    content: icon(invisible);
}

*[class~="hazard-d/hazardsymbol"][align=right] {
    text-align: right;
    margin-left: auto;
}

*[class~="hazard-d/hazardsymbol"][align=center] {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

*[class~="hazard-d/hazardsymbol"]:before {
    display: block;
    content: gadget("com.xmlmind.xmleditext.dita.Image");
    margin-top: 1.33ex;     
    margin-bottom: 0;
}

*[class~="hazard-d/hazardsymbol"] > *[class~="topic/alt"],
*[class~="hazard-d/hazardsymbol"] > *[class~="topic/longdescref"] {
    display: block;
    margin-top: 0.5ex;
}


/* ================================================= hazard-d.imp */
/* hi-d.imp ================================================= */
/*
 * Copyright (c) 2006-2013 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Typographic elements. 
 */

/* hi-d ------------------------------------------------------------------- */

*[class~="hi-d/b"] {
    display: inline;
    font-weight: bold;
}

*[class~="hi-d/i"] {
    display: inline;
    font-style: italic;
}

*[class~="hi-d/u"] {
    display: inline;
     text-decoration: underline;
}

*[class~="hi-d/tt"] {
    display: inline;
    font-family: monospace;
}

*[class~="hi-d/sup"],
*[class~="hi-d/sub"] {
    display: inline-block;
    font-size: smaller;
}

*[class~="hi-d/sup"] {
    vertical-align: super;
}

*[class~="hi-d/sub"] {
    vertical-align: sub;
}


/* ================================================= hi-d.imp */
/* ut-d.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Utilities elements. 
 */

/* ut-d ------------------------------------------------------------------- */

*[class~="ut-d/imagemap"] {
    display: block;
    margin: 1.33ex 0;
    border: 1px solid #C0C0C0; 
    padding: 0.5ex; 
}

*[class~="ut-d/area"] {
    display: block;
    margin-left: 20px;
    margin-top: 0;
    margin-bottom: 0;
}

*[class~="ut-d/area"]:before {
    display: marker;
    content: square;
}

*[class~="ut-d/shape"],
*[class~="ut-d/coords"] {
    display: inline;
}

*[class~="ut-d/shape"]:before,
*[class~="ut-d/coords"]:before {
    display: inline;
    content: element-name() " ";
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="ut-d/shape"]:after,
*[class~="ut-d/coords"]:after {
    display: inline;
    content: " ";
}


/* ================================================= ut-d.imp */

/* pr-d.imp ================================================= */
/*
 * Copyright (c) 2006-2012 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Programming elements. 
 */

/* pr-d ------------------------------------------------------------------- */

*[class~="pr-d/codeblock"],
*[class~="pr-d/codeph"] {
    font-family: monospace;
}

*[class~="pr-d/codeph"] {
    display: inline;
}

*[class~="pr-d/coderef"] {
    display: inline;
    color: #404040;
}

*[class~="pr-d/coderef"]:after {
    display: inline;
    content: icon(right-link);
    font-family: monospace;
    font-size: smaller;
}

*[class~="pr-d/coderef"][href]:after {
    content: icon(right-link) attr(href);
}

*[class~="pr-d/coderef"][keyref]:after {
    content: icon(external-link-small) attr(keyref);
}

*[class~="pr-d/codeblock"] {
    display: block;
    white-space: pre;
    background-color: #F0F0F0; 
    border: 1px solid #C0C0C0;
    padding: 0.5ex;
    margin: 1.33ex 0;
}

*[class~="pr-d/option"] {
    display: inline;
    font-weight: bold;
}

*[class~="pr-d/apiname"],
*[class~="pr-d/parmname"] {
    display: inline;
    font-family: monospace;
}

*[class~="pr-d/parmname"] {
    font-style: italic;
}

*[class~="pr-d/parml"] {
    display: block;
    margin-left: 2ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="pr-d/plentry"] {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="pr-d/pt"] {
    display: block;
    font-weight: bold; 
}

*[class~="pr-d/pd"] {
    display: block;
    margin-left: 4ex;
}

/*
 * Syntax diagram elements
 */

*[class~="pr-d/syntaxdiagram"] {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="pr-d/syntaxdiagram"] > *[class~="pr-d/title"],
*[class~="pr-d/synblk"] > *[class~="pr-d/title"],
*[class~="pr-d/groupseq"] > *[class~="pr-d/title"],
*[class~="pr-d/groupchoice"] > *[class~="pr-d/title"],
*[class~="pr-d/groupcomp"] > *[class~="pr-d/title"],
*[class~="pr-d/fragment"] > *[class~="pr-d/title"] {
    margin-top: 0;
    margin-bottom: 0;
}

*[class~="pr-d/synblk"],
*[class~="pr-d/groupseq"],
*[class~="pr-d/groupchoice"],
*[class~="pr-d/groupcomp"],
*[class~="pr-d/fragment"],
*[class~="pr-d/synnote"],
*[class~="pr-d/fragref"],
*[class~="pr-d/synnoteref"] {
    display: block;
    margin-left: 16ex;
    margin-top: 0;
    margin-bottom: 0;
}

*[class~="pr-d/synnote"],
*[class~="pr-d/synnote"]:before {
    font-size: 1em;
    border-style: none;
    padding: 0;
}

*[class~="pr-d/syntaxdiagram"]:before,
*[class~="pr-d/synblk"]:before,
*[class~="pr-d/groupseq"]:before,
*[class~="pr-d/groupchoice"]:before,
*[class~="pr-d/groupcomp"]:before,
*[class~="pr-d/fragment"]:before,
*[class~="pr-d/synnote"]:before,
*[class~="pr-d/fragref"]:before,
*[class~="pr-d/synnoteref"]:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="pr-d/fragref"] {
    color: navy;
    text-decoration: underline;
}

/* fragref and synnoteref do not have @keyref */
*[class~="pr-d/fragref"]:after,
*[class~="pr-d/synnoteref"] {
    content: icon(right-link) attr(href);
    text-decoration: none;
    font-family: monospace;
    color: #404040;
}

*[class~="pr-d/fragref"]:after {
    display: inline;
    font-size: smaller;
}

*[class~="pr-d/synnoteref"]:after {
    /* Inherits from xref: would mean link displayed twice */
    content: "";
}

*[class~="pr-d/repsep"] {
    display: block;
}

*[class~="pr-d/repsep"]:before {
    content: "(";
    color: #404040;
}

*[class~="pr-d/repsep"]:after {
    content: ")";
    color: #404040;
}

*[class~="pr-d/synph"],
*[class~="pr-d/oper"],
*[class~="pr-d/sep"],
*[class~="pr-d/delim"],
*[class~="pr-d/var"],
*[class~="pr-d/kwd"] {
    display: inline;
}

*[class~="pr-d/oper"]:before,
*[class~="pr-d/sep"]:before,
*[class~="pr-d/delim"]:before,
*[class~="pr-d/var"]:before,
*[class~="pr-d/kwd"]:before {
    display: inline;
    content: " ";
}

*[class~="pr-d/oper"]:first-child:before,
*[class~="pr-d/sep"]:first-child:before,
*[class~="pr-d/delim"]:first-child:before,
*[class~="pr-d/var"]:first-child:before,
*[class~="pr-d/kwd"]:first-child:before {
    content: "";
}

*[class~="pr-d/kwd"] {
    font-weight: bold;
}

*[class~="pr-d/var"] {
    font-style: italic;
}

*[class~="pr-d/oper"] {
    color: rgb(96,0,96);
}

*[class~="pr-d/sep"] {
    color: rgb(96,96,0);
}

*[class~="pr-d/delim"] {
    color: rgb(0,96,96);
}


/* ================================================= pr-d.imp */
/* sw-d.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Software elements. 
 */

/* sw-d ------------------------------------------------------------------- */

*[class~="sw-d/msgnum"],
*[class~="sw-d/msgblock"],
*[class~="sw-d/msgph"] {
    font-family: monospace;
    background-color: #E0F0F0;
}

*[class~="sw-d/msgph"] {
    display: inline;
}

*[class~="sw-d/msgblock"] {
    display: block;
    white-space: pre;
    border: 1px solid #C0D0D0;
    padding: 0.5ex;
    margin: 1.33ex 0;
}

*[class~="sw-d/msgnum"] {
    display: inline;
    font-weight: bold;
}

*[class~="sw-d/userinput"],
*[class~="sw-d/systemoutput"],
*[class~="sw-d/filepath"],
*[class~="sw-d/varname"],
*[class~="sw-d/cmdname"] {
    display: inline;
    font-family: monospace;
}

*[class~="sw-d/cmdname"] {
    font-weight: bold;
}

*[class~="sw-d/varname"] {
    font-style: italic;
}

*[class~="sw-d/userinput"] {
    background-color: rgb(192,255,192);
}

*[class~="sw-d/systemoutput"] {
    background-color: rgb(255,255,192);
}


/* ================================================= sw-d.imp */
/* ui-d.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * User interface elements. 
 */

/* ui-d ------------------------------------------------------------------- */

*[class~="ui-d/uicontrol"],
*[class~="ui-d/wintitle"] {
    display: inline;
    font-weight: bold;
}

*[class~="ui-d/menucascade"] {
    display: inline;
}

*[class~="ui-d/menucascade"] > *[class~="ui-d/uicontrol"]:before {
    content: " \279C  ";
    color: gray;
}

*[class~="ui-d/menucascade"] > *[class~="ui-d/uicontrol"]:first-child:before {
    content: "";
}

*[class~="ui-d/shortcut"] {
    display: inline;
    text-decoration: underline;
}

*[class~="ui-d/screen"] {
    display: block;
    white-space: pre;
    font-family: monospace;
    background-color: #E0E0FF; 
    border: 1px solid #C0C0FF; 
    padding: 0.5ex; 
    margin: 1.33ex 0;
}


/* ================================================= ui-d.imp */

/* mapmeta.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Metadata elements found in topicmeta and not in prolog. 
 */

/* map -------------------------------------------------------------------- */

*[class~="topic/navtitle"],
*[class~="map/linktext"],
*[class~="map/searchtitle"],
*[class~="map/shortdesc"] {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="topic/navtitle"]:before,
*[class~="map/linktext"]:before,
*[class~="map/searchtitle"]:before,
*[class~="map/shortdesc"]:before {
    display: marker;
    content: element-name(); /*Support for specialization*/
    marker-offset: fill; /*Nicer*/
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}


/* ================================================= mapmeta.imp */
/* delay-d.imp ================================================= */
/*
 * Copyright (c) 2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Delayed conref resolution elements. 
 */

/* delay-d ---------------------------------------------------------------- */

*[class~="delay-d/exportanchors"],
*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorid"],
*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorkey"] {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

*[class~="delay-d/exportanchors"]:before,
*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorid"]:before,
*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorkey"]:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorid"],
*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorkey"] {
    font-weight: normal;
    color: #404040;
}

*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorid"] {
    content: "id=" attr(id);
}

*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorkey"] {
    content: "keyref=" attr(keyref);
}

*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorid"]:after,
*[class~="delay-d/exportanchors"] > *[class~="delay-d/anchorkey"]:after {
    content: "";
}


/* ================================================= delay-d.imp */
/* map.imp ================================================= */
/*
 * Copyright (c) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Map elements. 
 */

/*
 * Implementation of methods topicrefContent and chunkIcon.
 */
@extension "com.xmlmind.xmleditext.dita.MapStyleSheetExtension";

/* mapgroup-d ------------------------------------------------------------- */

*[class~="mapgroup-d/anchorref"],
*[class~="mapgroup-d/keydef"],
*[class~="mapgroup-d/mapref"],
*[class~="mapgroup-d/topicset"],
*[class~="mapgroup-d/topicsetref"],
*[class~="mapgroup-d/topicgroup"],
*[class~="mapgroup-d/topichead"] {
    display: block;
}

/* glossref-d ------------------------------------------------------------- */

*[class~="glossref-d/glossref"] {
    display: block;
}

/* map -------------------------------------------------------------------- */

*[class~="map/map"] {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* first line */
}

@property-value item-collapser()
    collapser(collapsed-icon, icon(pop-right), 
              expanded-icon, icon(pop-down));

@property-group map-content() {
    display: inline;
    content: paragraph(content(item-collapser(), 
                               " ", element-name(), 
                               " ", text(attr(title),
                                         font-family, serif,
                                         font-size, 1.5em,
                                         font-weight, bold),
                               " ", invoke("chunkIcon")),
                       border-width, 1px,
                       border-style, solid,
                       border-top-color, transparent,
                       border-left-color, transparent,
                       border-right-color transparent);
    color: #404040;
}

*[class~="map/map"]:before {
    property-group: map-content();
}

@property-group map-title() {
    font-family: serif;
    font-size: 1.5em;
    margin: 0.83ex 0;
    border-width: 1px;
    border-style: solid;
    border-top-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
}

*[class~="map/map"] > *[class~="topic/title"] {
    property-group: map-title();
}

*[class~="map/topicmeta"] {
    margin-left: 6.5ex; /*4ex+20px*/
    margin-top: 0.5ex;
    margin-bottom: 0.5ex; 
}

*[class~="map/map"] > *[class~="map/topicmeta"],
*[class~="map/relcolspec"] > *[class~="map/topicmeta"],
*[class~="map/relcell"] > *[class~="map/topicmeta"] {
    margin-left: 20px;
}

/*
 * Map content
 */

*[class~="map/navref"],
*[class~="map/anchor"],
*[class~="mapgroup-d/anchorref"],
*[class~="mapgroup-d/keydef"],
*[class~="mapgroup-d/mapref"],
*[class~="mapgroup-d/topicset"],
*[class~="mapgroup-d/topicsetref"],
*[class~="glossref-d/glossref"],
*[class~="mapgroup-d/topicgroup"],
*[class~="mapgroup-d/topichead"],
*[class~="map/topicref"] {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* first line */
    margin-left: 4ex;
    margin-top: 0.5ex;
    margin-bottom: 0.5ex;
}

*[class~="map/map"] > *[class~="map/navref"],
*[class~="map/map"] > *[class~="map/anchor"],
*[class~="map/map"] > *[class~="mapgroup-d/anchorref"],
*[class~="map/map"] > *[class~="mapgroup-d/keydef"],
*[class~="map/map"] > *[class~="mapgroup-d/mapref"],
*[class~="map/map"] > *[class~="mapgroup-d/topicset"],
*[class~="map/map"] > *[class~="mapgroup-d/topicsetref"],
*[class~="map/map"] > *[class~="glossref-d/glossref"],
*[class~="map/map"] > *[class~="mapgroup-d/topicgroup"],
*[class~="map/map"] > *[class~="mapgroup-d/topichead"],
*[class~="map/map"] > *[class~="map/topicref"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/anchorref"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/keydef"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/mapref"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/topicset"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/topicsetref"],
*[class~="map/relcolspec"] > *[class~="glossref-d/glossref"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/topicgroup"],
*[class~="map/relcolspec"] > *[class~="mapgroup-d/topichead"],
*[class~="map/relcolspec"] > *[class~="map/topicref"],
*[class~="map/relcell"] > *[class~="mapgroup-d/anchorref"],
*[class~="map/relcell"] > *[class~="mapgroup-d/keydef"],
*[class~="map/relcell"] > *[class~="mapgroup-d/mapref"],
*[class~="map/relcell"] > *[class~="mapgroup-d/topicset"],
*[class~="map/relcell"] > *[class~="mapgroup-d/topicsetref"],
*[class~="map/relcell"] > *[class~="glossref-d/glossref"],
*[class~="map/relcell"] > *[class~="mapgroup-d/topicgroup"],
*[class~="map/relcell"] > *[class~="mapgroup-d/topichead"],
*[class~="map/relcell"] > *[class~="map/topicref"] {
    margin-left: 0;
}

*[class~="map/navref"]:before {
    display: inline;
    content: paragraph(content(element-name(), " ",
                               drop-site(icon, icon(right),
                                         text, attr(mapref),
                                         command, "ditamap.dropHref",
                                         parameter, "mapref '%{value}'")));
    color: #008000;
}

*[class~="map/anchor"]:before {
    display: inline;
    content: paragraph(content(element-name(), " ", 
                               icon(left-target), " ", attr(id)));
    color: #800000;
}

/*
 * topicref
 */

*[class~="mapgroup-d/anchorref"]:before,
*[class~="mapgroup-d/keydef"]:before,
*[class~="mapgroup-d/mapref"]:before,
*[class~="mapgroup-d/topicset"]:before,
*[class~="mapgroup-d/topicsetref"]:before,
*[class~="glossref-d/glossref"]:before,
*[class~="mapgroup-d/topicgroup"]:before,
*[class~="mapgroup-d/topichead"]:before,
*[class~="map/topicref"]:before {
    display: inline;
    content: invoke("topicrefContent", normal);
}

*[class~="map/topicref"]:before {
    color: #000080;
}

*[class~="mapgroup-d/topichead"]:before {
    color: #800080;
}

*[class~="mapgroup-d/topicgroup"]:before {
    color: #008080;
}

*[class~="map/topicref"][processing-role=resource-only]:before,
*[class~="mapgroup-d/keydef"]:before {
    color: #606060;
}

*[class~="map/topicref"][format=ditamap]:before,
*[class~="mapgroup-d/mapref"]:before {
    color: #204080;
}

*[class~="mapgroup-d/anchorref"]:before {
    color: #804020;
}

*[class~="mapgroup-d/topicset"] {
    padding: 0.5ex;
    border: 1px dashed #208040;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex; 
}

*[class~="mapgroup-d/topicset"]:before {
    color: #208040;
}

*[class~="mapgroup-d/topicsetref"]:before {
    color: #106020;
}

*[class~="glossref-d/glossref"]:before {
    color: #402040;
}

/*
 * reltable
 */

*[class~="map/reltable"] {
    display: table;
    border: 1 solid #D0E0F0;
    margin: 1.33ex 0;
}

*[class~="map/reltable"] *[class~="topic/title"] {
    color: #406080;
}

*[class~="map/reltable"] > *[class~="topic/title"] {
    display: table-caption;
}

*[class~="map/reltable"] > *[class~="map/topicmeta"] {
    display: table-caption;
    /* A table-caption cannot be made collapsible. */
    collapsible: no;
    margin-left: 0;
}

*[class~="map/reltable"] > *[class~="map/topicmeta"]:before {
    content: "";
}

*[class~="map/relheader"],
*[class~="map/relrow"] {
    display: table-row;
}

*[class~="map/relcolspec"],
*[class~="map/relcell"] {
    display: table-cell;
    border: 1 solid #D0E0F0;
    padding: 2px;
}

*[class~="map/relcolspec"] {
    background-color: #D0E0F0;
}

*[class~="map/relcolspec"]:empty {
    content: icon(invisible);
}

*[class~="map/relcolspec"][type]:before {
    display: inline;
    content: "type=" attr(type);
    font-weight: bold;
    color: #404040;
}


/* ================================================= map.imp */

