@use-default-attribute-values;

/*
 * Copyright (c) 2017 XMLmind Software. 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 bookmap elements. 
 */

/* map.css ================================================= */
@use-default-attribute-values;

/*
 * Copyright (c) 2017 XMLmind Software. 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. 
 */

/* Do not report an error if the "Easy Profiling" add-on 
   has not been installed. */
@import url(---profiling:common/profiling.imp);

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

@namespace dh "java:com.xmlmind.xmleditext.dita.DITAHelp";

/* metadata.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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~="ditavalref-d/ditavalmeta"],
*[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 #E0E0A0;
    padding: 0.5ex;
    border-radius: 1ex;
    margin-left: 20px;
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
}

*[class~="ditavalref-d/ditavalmeta:before"],
*[class~="map/topicmeta"]:before,
*[class~="topic/prolog"]:before {
    display: marker;
    color: #808000;
}

*[class~="ditavalref-d/ditavalmeta:before"],
*[class~="map/topicmeta"]:before {
    content: collapser(hide-when-disabled, yes,
                       show-level-menu, yes);
}

*[class~="topic/prolog"]:before {
    content: collapser();
}

*[class~="map/ux-window"],
*[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: 0.5em;
    margin-bottom: 0.5em; 
}

*[class~="map/ux-window"],
*[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),
                               " release=", attr(release),
                               " modification=", attr(modification)));
}

/*nothing before vrmlist*/
*[class~="topic/vrmlist"] {
    display: block;
    margin: 0.5em 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("appname=", attr(appname),
                               " appid=", attr(appid),
                               " ux-context-string=", attr(ux-context-string),
                               " ux-source-priority=", attr(ux-source-priority),
                               " ux-windowref=", attr(ux-windowref)));
}

*[class~="map/ux-window"] {
    content: paragraph(content("name=", attr(name),
                               " top=", attr(top),
                               " left=", attr(left),
                               " height=", attr(height),
                               " width=", attr(width),
                               " on-top=", attr(on-top),
                               " features=\"", attr(features), "\"",
                               " relative=", attr(relative),
                               " full-screen=", attr(full-screen)));
}

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

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

*[class~="map/ux-window"]:before,
*[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, 0) decode-uri(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, 0) xpath("dh:formatKeyref(.)");
    font-size: smaller;
    font-family: monospace;
    color: #404040;
}


/* ================================================= metadata.imp */
/* body.imp ================================================= */
/*
 * Copyright (c) 2017-2025 XMLmind Software. 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. 
 */

@namespace prop "http://www.xmlmind.com/xmleditor/namespace/property";

/*
 * Follow link tooltip.
 */

*[href] {
  tooltip-content: decode-uri(attr(href)) "\A \A "
    invoke("com.xmlmind.xmleditapp.dndview.ExtensionMethods.bindingDescription",
           "{$c}followLinkAt");
}

*[class~="topic/image"][href],
*[class~="svg-d/svgref"][href],
*[class~="mathml-d/mathmlref"][href] {
    tooltip-content: "";
}

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

/*
 * Divisions
 */

*[class~="topic/example"],
*[class~="topic/section"] {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* title */
    margin: 1em 0;
}

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

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

*[class~="topic/section"] > *[class~="topic/title"]:before {
    display: inline;
    content: collapser() " ";
}

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

*[class~="topic/div"],
*[class~="topic/sectiondiv"] {
    display: block;
    /* Transparent container: no margins */
}

/*
 * Simple lists
 */

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

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

*[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: 1em;
    margin-bottom: 1em;
}

*[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"],
*[class~="topic/ol"][outputclass*=decimal] {
    list-style-type: decimal;
    counter-reset: list-item; 
}

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

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

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

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

*[class~="topic/ol"][outputclass*="start("] { 
    counter-reset: list-item xpath("substring-before(substring-after(@outputclass, 'start('), ')')"); 
    counter-increment: list-item -1;
}

*[class~="topic/ol"][outputclass*=continue] {
    counter-reset: none; 
}

/*
 * Unlike ditac, "continue" not supported in nested ol.
 */
*[class~="topic/ol"] *[class~="topic/ol"][outputclass*=continue] {
    counter-reset: list-item; 
}

*[class~="topic/ol"] > *[class~="topic/li"] {
    list-item-counter: counter(list-item) ".";
    counter-increment: list-item; 
}

*[class~="topic/ol"][outputclass*="inheritnum"] > *[class~="topic/li"] {
    list-item-counter: counters(list-item, ".") ".";
}

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

*[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: 1em;
    margin-bottom: 1em;
}

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

*[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, 0) xpath("dh:formatKeyref(.)");
    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;
    resizable-columns: no;
    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~="equation-d/equation-figure"],
*[class~="topic/fig"] {
    display: block;
    margin: 1em 0;
}

*[class~="topic/figgroup"] {
    display: block;
    margin: 1em 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~="equation-d/equation-figure"] > *[class~="topic/desc"],
*[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: 1em;
}

*[class~="equation-d/equation-figure"] > *[class~="topic/desc"]:before,
*[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.09em;
}

*[class~="equation-d/equation-figure"] > *[class~="topic/desc"]:after,
*[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();
}

/*
 * Make figures collapsible.
 */

*[class~="equation-d/equation-figure"],
*[class~="topic/fig"] {
    collapsible: yes;
    not-collapsible-head: 1; /* title or desc */
    collapsed-content: url(icons/figure.png);
    collapsed-content-align: center;
}

*[class~="equation-d/equation-figure"] > *[class~="topic/title"]:before,
*[class~="topic/fig"] > *[class~="topic/title"]:before {
    content: collapser() " ";
}

/*
 * Image
 */

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

*[class~="equation-d/equation-figure"] > *[class~="topic/image"],
*[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: 1em;
}

*[class~="equation-d/equation-figure"] > *[class~="topic/image"]:empty,
*[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~="equation-d/equation-figure"] > *[class~="topic/image"][align=right],
*[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~="equation-d/equation-figure"] > *[class~="topic/image"][align=center],
*[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~="equation-d/equation-figure"] > *[class~="topic/image"]:before,
*[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: 1em;     
    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~="equation-d/equation-figure"] > *[class~="topic/image"] > *[class~="topic/alt"],
*[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, 0);
    font-family: monospace;
    font-size: small; /* otherwise image/@scale has an effect on it */
    color: #404040;
}

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

*[class~="topic/longdescref"][keyref] {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

*[class~="equation-d/equation-figure"] > *[class~="topic/image"] > *[class~="topic/longdescref"],
*[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: 1em 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;
}

@media media-player {
    *[class~="topic/object"][type^="audio/"],
    *[class~="topic/object"][type^="video/"] {
        /*Still a block*/
        collapsible: no;
        font-family: normal;
        font-size: medium;
        font-weight: normal;
        font-style: normal;
        text-decoration: none;
        color: normal;
        background-color: transparent;
        border-style: none;
        padding: 1px; /* Allows to see the red box around selected element. */
        margin: 0;
    }

    *[class~="topic/object"][type^="audio/"]:before,
    *[class~="topic/object"][type^="video/"]:before {
        content: "";
    }

    *[class~="topic/object"][type^="audio/"] {
      content: component("com.xmlmind.xmledit.cssext.media.MediaPlayerFactory",
                         type, audio,
                         delegate,
                         "com.xmlmind.xmleditext.dita.MediaPlayerDelegateImpl");
    }

    *[class~="topic/object"][type^="video/"] {
      content: component("com.xmlmind.xmledit.cssext.media.MediaPlayerFactory",
                         type, video,
                         delegate,
                         "com.xmlmind.xmleditext.dita.MediaPlayerDelegateImpl");
    }

    /*
     * Force the use of object view as a low-level editor
     */

    *[class~="topic/object"][type^="video/"]:property(prop|showObjectView),
    *[class~="topic/object"][type^="audio/"]:property(prop|showObjectView) {
        content: "";
    }

    *[class~="topic/object"][type^="video/"]:property(prop|showObjectView),
    *[class~="topic/object"][type^="audio/"]:property(prop|showObjectView) {
        property-group: object-properties(#E0E0E0);
    }

    *[class~="topic/object"][type^="video/"]:property(prop|showObjectView):before,
    *[class~="topic/object"][type^="audio/"]:property(prop|showObjectView):before {
        property-group: media-object-before-properties(#E0E0E0); 
    }

    *[class~="topic/object"][type^="video/"]:property(prop|showObjectView)::attribute,
    *[class~="topic/object"][type^="audio/"]:property(prop|showObjectView)::attribute {
        property-group: object-attribute-properties(); 
    }
}

/*
 * Block elements
 */

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

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

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

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

*[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;
    margin: 1em 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, 0)
             text(decode-uri(attr(href)), font-family, monospace);
}

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

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

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

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

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

*[class~="topic/longquoteref"][keyref] {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

/*
 * 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, 0) xpath("dh:formatKeyref(.)");
    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, 0);
    text-decoration: none;
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

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

*[class~="topic/xref"][keyref]:after {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

/*
 * Miscellaneous
 */

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

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

*[class~="topic/draft-comment"] {
    display: block;
    color: red;
    margin: 1em 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.2em;
    margin-bottom: 1.2em;
}

*[class~="topic/fn"]:before {
    display: marker;
    content: xpath("concat(index-of-node(//fn,.),'.')");
    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: 1em 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, 0), " ", element-name(), 
                               " conref=", attr(conref)));
}

*[conkeyref]:not([conaction]) {
    content: paragraph(content(icon(pop-se, 0), " ", element-name(), 
                               " conkeyref=", xpath("dh:formatConkeyref(.)")));
}

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

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

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

*[conkeyref][conref][conrefend]:not([conaction]) {
    content: paragraph(content(icon(pop-se, 0), " ", element-name(), 
                               " conkeyref=", xpath("dh:formatConkeyref(.)"),
                               " 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) 2017-2024 XMLmind Software. 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.
 *
 * Arguments:
 *
 * simpletable_spec_property_name [bold|normal [color]]
 *
 * The optional last two arguments specify respectively the font-weight and  
 * the background-color of cells belonging to the keycol column (if any).
 */
@extension 
"com.xmlmind.xmleditext.dita.SimpleTableSupport dita.simpleTableEdit.tableSpecification bold #E0E0E0";

*[class~="topic/simpletable"] {
    display: table; 
    border: 1 outset gray;
    margin: 1em 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; 
}

@property-value bgcolor() 
    concatenate(xpath("substring-before(substring-after(@outputclass, 'bgcolor('), ')')"));

*[class~="topic/simpletable"][outputclass*="bgcolor("],
*[class~="topic/sthead"][outputclass*="bgcolor("],
*[class~="topic/strow"][outputclass*="bgcolor("],
*[class~="topic/stentry"][outputclass*="bgcolor("] {
    background-color: bgcolor();
}

/*
 * 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.
 */

/*
 * TableSupport is a stylesheet extension allowing to style CALS tables.
 *
 * Argument "true" means: show gridlines. Suppress it or pass "false"
 * to hide gridlines.
 *
 * For more information about CALS table support, see 
 * XMLmind XML Editor - Configuration and Deployment.
 */
@extension 
"com.xmlmind.xmleditext.docbook.table.TableSupport true";

table {
    display: block;
    margin: 1em 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-color: gray; /*Needed by TableSupport*/
    border-width: 1;
}
    
thead {
    display: table-header-group;
    font-weight: bold; 
    background-color: #E0E0E0;
}
       
/*
 * TableSupport (which is invoked *before* this CSS stylesheet) sets
 * background-color:inherit (e.g. from read-only row) on
 * tbody, row, entry, as workaround for XXE's row/row group implementation.
 */

tbody {
    display: table-row-group;
}

row {
    display: table-row; 
}
          
entry {
    display: table-cell; 
    border-color: gray; /*Needed by TableSupport*/
    border-width: 1;
    padding: 2px; 
}

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

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

tgroup[outputclass*="bgcolor("],
thead[outputclass*="bgcolor("],
tbody[outputclass*="bgcolor("],
row[outputclass*="bgcolor("],
entry[outputclass*="bgcolor("] {
    background-color: bgcolor();
}

/*
 * Make tables collapsible.
 */

table { 
    collapsible: yes;
    not-collapsible-head: 1; /* title or desc */
    collapsed-content: url(icons/table.png);
    collapsed-content-align: center;
}

table > title:before {
    content: collapser() " ";
}


/* ================================================= table.imp */
/* indexing.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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, 0);
    color: gray;
}

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

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

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

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

/*
 * 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) 2017-2025 XMLmind Software. 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: inline-tree;
    collapsed: yes;
}

@media xmlmind-xml-editor {
    *[class~="topic/foreign"][outputclass*=embed-latex] {
        display: inline-block;
        white-space: pre;
        font-family: monospace;
        font-size: 0.92em;
        background-color: #F8FFFF;
    }

    *[class~="equation-d/equation-figure"] > *[class~="topic/foreign"][outputclass*=embed-latex] {
        display: block;
        margin: 1.09em 0 0 0;
    }

    /*
     * Previewing TeX equations requires installing 
     * the "JLaTeXMath image toolkit plug-in".
     */
    *[class~="topic/foreign"][outputclass*=embed-latex]:after {
        display: inline;
        content: " " image-viewport(interactive, no, data-type, XML,
                                    smooth, yes, background-color, normal);
        font-family: normal;
        vertical-align: middle;
    }

    *[class~="equation-d/equation-figure"] > *[class~="topic/foreign"][outputclass*=embed-latex]:after,
    *[class~="equation-d/equation-block"] > *[class~="topic/foreign"][outputclass*=embed-latex]:after {
        display: block;
        content: image-viewport(interactive, no, data-type, XML, smooth, yes,
                                background-color, normal);
        font-family: normal;
        margin-top: 1ex;
    }

    *[class~="equation-d/equation-figure"] > *[class~="topic/foreign"][outputclass*=embed-latex]:after {
        margin-bottom: 1em;
        margin-left: auto;
        margin-right: auto;
    }
}
@media xxe-client {
    *[class~="topic/foreign"][outputclass*=embed-latex] {
        display: inline;
        content: gadget("com.xmlmind.xmleditsrv.webview.MathJaxPane");
    }
}

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

/*
 * data, data-about
 */

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

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

*[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 */

/* relmgmt-d.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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.
 *
 * Release-management domain elements. 
 */

/* relmgmt-d -------------------------------------------------------------- */

*[class~="relmgmt-d/change-historylist"],
*[class~="relmgmt-d/change-item"],
*[class~="relmgmt-d/change-organization"],
*[class~="relmgmt-d/change-person"],
*[class~="relmgmt-d/change-revisionid"],
*[class~="relmgmt-d/change-started"],
*[class~="relmgmt-d/change-completed"],
*[class~="relmgmt-d/change-summary"],
*[class~="relmgmt-d/change-request-reference"],
*[class~="relmgmt-d/change-request-system"],
*[class~="relmgmt-d/change-request-id"] {
    display: block;
    margin-left: 24ex;
    margin-top: 1em;
    margin-bottom: 1em; 
}

*[class~="relmgmt-d/change-historylist"],
*[class~="relmgmt-d/change-item"] {
    margin-left: 16ex;
}

/* 
 * These inherit from topic/data.
 */
*[class~="relmgmt-d/change-item"],
*[class~="relmgmt-d/change-organization"],
*[class~="relmgmt-d/change-person"],
*[class~="relmgmt-d/change-revisionid"],
*[class~="relmgmt-d/change-started"],
*[class~="relmgmt-d/change-completed"],
*[class~="relmgmt-d/change-summary"],
*[class~="relmgmt-d/change-request-reference"],
*[class~="relmgmt-d/change-request-system"],
*[class~="relmgmt-d/change-request-id"] {
    hide-tags: no;
    border-style: none;
    padding: 0;
    margin-right: 0;
}

*[class~="relmgmt-d/change-historylist"]:before,
*[class~="relmgmt-d/change-item"]:before,
*[class~="relmgmt-d/change-organization"]:before,
*[class~="relmgmt-d/change-person"]:before,
*[class~="relmgmt-d/change-revisionid"]:before,
*[class~="relmgmt-d/change-started"]:before,
*[class~="relmgmt-d/change-completed"]:before,
*[class~="relmgmt-d/change-summary"]:before,
*[class~="relmgmt-d/change-request-reference"]:before,
*[class~="relmgmt-d/change-request-system"]:before,
*[class~="relmgmt-d/change-request-id"]:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}


/* ================================================= relmgmt-d.imp */
/* hazard-d.imp ================================================= */
/*
 * Copyright (c) 2017-2021 XMLmind Software. 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: 1em 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;
}

@property-value hazardstatement-header(type, bg)
    paragraph(content(concatenate("url(icons/", type, ".png)"), " ", type),
              padding-top, 1ex,
              padding-bottom, 1ex,
              padding-left, 1ex,
              padding-right, 1ex,
              background-color, bg);

*[class~="hazard-d/hazardstatement"]:before {
    content: hazardstatement-header('other', #C0DDC0);
}

*[class~="hazard-d/hazardstatement"][type=danger]:before {
    content: hazardstatement-header('danger', #DDC0C0);
}

*[class~="hazard-d/hazardstatement"][type=warning]:before {
    content: hazardstatement-header('warning', #FFA500);
}

*[class~="hazard-d/hazardstatement"][type=caution]:before {
    content: hazardstatement-header('caution', #DDDDC0);
}

*[class~="hazard-d/hazardstatement"][type=notice]:before {
    content: hazardstatement-header('notice', #B0C0DD);
}

*[class~="hazard-d/hazardstatement"][type=other][othertype]:before {
    content: paragraph(content(url(icons/other.png), " ", attr(othertype)),
                       padding-top, 1ex,
                       padding-bottom, 1ex,
                       padding-left, 1ex,
                       padding-right, 1ex,
                       background-color, #C0DDC0);
}

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

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

*[class~="hazard-d/typeofhazard"],
*[class~="hazard-d/consequence"],
*[class~="hazard-d/howtoavoid"] {
    display: block;
    margin-top: 1em;     
    margin-bottom: 1em;     
    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: 1em;
}

*[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: 1em;     
    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) 2017 XMLmind Software. 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/line-through"] {
    display: inline;
    text-decoration: line-through;
}

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

*[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 */
/* markup-d.imp ================================================= */
/*
 * Copyright (c) 2017 XMLmind Software. 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.
 *
 * Markup domain elements. 
 */

/* markup-d --------------------------------------------------------------- */

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


/* ================================================= markup-d.imp */
/* xml-d.imp ================================================= */
/*
 * Copyright (c) 2017 XMLmind Software. 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.
 *
 * XML mention domain elements. 
 */

/* xml-d ------------------------------------------------------------------ */

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

*[class~="xml-d/numcharref"]:before {
    content: "&#";
    color: gray;
}

*[class~="xml-d/numcharref"]:after {
    content: ";";
    color: gray;
}

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

*[class~="xml-d/parameterentity"]:before {
    content: "%";
    color: gray;
}

*[class~="xml-d/parameterentity"]:after {
    content: ";";
    color: gray;
}

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

*[class~="xml-d/textentity"]:before {
    content: "&";
    color: gray;
}

*[class~="xml-d/textentity"]:after {
    content: ";";
    color: gray;
}

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

*[class~="xml-d/xmlatt"]:before {
    content: "@";
    color: gray;
}

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

*[class~="xml-d/xmlelement"]:before {
    content: "<";
    color: gray;
}

*[class~="xml-d/xmlelement"]:after {
    content: ">";
    color: gray;
}

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

*[class~="xml-d/xmlnsname"]:before {
    content: '"';
    color: gray;
}

*[class~="xml-d/xmlnsname"]:after {
    content: '"';
    color: gray;
}

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

*[class~="xml-d/xmlpi"]:before {
    content: "<?";
    color: gray;
}

*[class~="xml-d/xmlpi"]:after {
    content: "?>";
    color: gray;
}


/* ================================================= xml-d.imp */
/* ut-d.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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: 1em 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"],
*[class~="ut-d/sort-as"] {
    display: inline;
    font-size: 1em;
    font-weight: normal;
    font-style: normal;
    text-decoration: none;
    color: normal;
    background-color:transparent;
}

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

*[class~="ut-d/sort-as"][value]:before {
    content: element-name() " value=" attr(value) " ";
}

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


/* ================================================= ut-d.imp */
/* pr-d.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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, 0);
    font-family: monospace;
    font-size: smaller;
}

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

*[class~="pr-d/coderef"][keyref]:after {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

*[class~="pr-d/codeblock"] {
    display: block;
    white-space: pre;
    background-color: #F0F0F0; 
    border: 1px solid #C0C0C0;
    padding: 0.5ex;
    margin: 1em 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: 1em;
    margin-bottom: 1em;
}

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

*[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: 1em;
    margin-bottom: 1em;
}

*[class~="pr-d/syntaxdiagram"] > *[class~="topic/title"],
*[class~="pr-d/synblk"] > *[class~="topic/title"],
*[class~="pr-d/groupseq"] > *[class~="topic/title"],
*[class~="pr-d/groupchoice"] > *[class~="topic/title"],
*[class~="pr-d/groupcomp"] > *[class~="topic/title"],
*[class~="pr-d/fragment"] > *[class~="topic/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, 0) decode-uri(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) 2017-2019 XMLmind Software. 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: 1em 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) 2017-2022 XMLmind Software. 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: #F0F0FF; 
    border: 1px solid #E0E0FF; 
    padding: 0.5ex; 
    margin: 1em 0;
}


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

/* mapmeta.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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~="ditavalref-d/dvrResourcePrefix"],
*[class~="ditavalref-d/dvrResourceSuffix"],
*[class~="ditavalref-d/dvrKeyscopePrefix"],
*[class~="ditavalref-d/dvrKeyscopeSuffix"],
*[class~="topic/navtitle"],
*[class~="map/linktext"],
*[class~="map/searchtitle"],
*[class~="map/shortdesc"] {
    display: block;
    margin-left: 16ex;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* 
 * These inherit from topic/data.
 */
*[class~="ditavalref-d/dvrResourcePrefix"],
*[class~="ditavalref-d/dvrResourceSuffix"],
*[class~="ditavalref-d/dvrKeyscopePrefix"],
*[class~="ditavalref-d/dvrKeyscopeSuffix"] {
    hide-tags: no;
    border-style: none;
    padding: 0;
    margin-right: 0;
}

*[class~="ditavalref-d/dvrResourcePrefix"]:before,
*[class~="ditavalref-d/dvrResourceSuffix"]:before,
*[class~="ditavalref-d/dvrKeyscopePrefix"]:before,
*[class~="ditavalref-d/dvrKeyscopeSuffix"]:before,
*[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) 2017-2019 XMLmind Software. 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: 1em;
    margin-bottom: 1em;
}

*[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=" xpath("dh:formatKeyref(.)");
}

*[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) 2017-2025 XMLmind Software. 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. 
 */

/*
 * MapStyleSheetExtension is the implementation of methods 
 * topicrefContent() and chunkIcon().
 *
 * Constructor arguments:
 * 
 * showTopicTitles true|false 
 *     Specifies whether topic titles are displayed by the stylesheet
 *     when both topicref/topicmeta/navtitle and topicref/@navtitle are missing.
 *     Value "true" implies that many referenced topic files may be loaded 
 *     (and cached) in order to obtain the titles of the topics.
 *     Value "false" is therefore adapted to large maps and/or 
 *     slow computers/slow network connections.
 *
 * Methods:
 *
 * topicrefContent([ value of property font-size ]?)
 *     Generates: collapser(), element-name(), a compact representation 
 *     of most other attributes, a representation of attribute "keys", 
 *     a navigation title along with a representation of attribute "locktitle", 
 *     a representation of attribute "type", a representation of 
 *     attribute "keyref", a representation of attribute "href", chunkIcon().
 *
 * chunkIcon()
 *     Generates an icon having a tooltip representing 
 *     the value of attributes "chunk" and "copy-to".
 */
@extension "com.xmlmind.xmleditext.dita.MapStyleSheetExtension true";

/* ditavalref-d ----------------------------------------------------------- */

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

/* 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(hide-when-disabled, yes,
              show-level-menu, yes);

@property-group map-content() {
    /* This ``inline paragraph'' is added as a *header* to the map block. */
    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.67em 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~="ditavalref-d/ditavalmeta"],
*[class~="map/topicmeta"] {
    margin-left: 6.5ex; /*4ex+20px*/
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
}

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

/*
 * Map content
 */

*[class~="ditavalref-d/ditavalref"],
*[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.5em;
    margin-bottom: 0.5em;
}

*[class~="map/map"] > *[class~="ditavalref-d/ditavalref"],
*[class~="map/relcolspec"] > *[class~="ditavalref-d/ditavalref"],
*[class~="map/relcell"] > *[class~="ditavalref-d/ditavalref"],
*[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: element-name() " " icon(right, 0) attr(mapref);
    color: #008000;
}

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

/*
 * topicref
 */

*[class~="ditavalref-d/ditavalref"]:before,
*[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");
}

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

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

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

*[class~="ditavalref-d/ditavalref"]:before,
*[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: 1em;
    margin-bottom: 1em; 
}

*[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;
    resizable-columns: no;
    border: 1 solid #E0F0FF;
    margin: 1em 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 #E0F0FF;
    padding: 2px;
}

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

*[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 */


/* ================================================= map.css */

/* bookmapmeta.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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.
 *
 * Bookmap metadata elements other than xNAL.
 */

/* bookmap ---------------------------------------------------------------- */

*[class~="bookmap/bookmeta"] {
    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 #E0E0A0;
    padding: 0.5ex;
    border-radius: 1ex;
    margin-left: 20px;
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
}

*[class~="bookmap/bookmeta"]:before {
    display: marker;
    content: item-collapser();
    color: #808000;
}

*[class~="bookmap/publisherinformation"],
*[class~="bookmap/person"],
*[class~="bookmap/organization"],
*[class~="bookmap/printlocation"],
*[class~="bookmap/published"],
*[class~="bookmap/publishtype"],
*[class~="bookmap/revisionid"],
*[class~="bookmap/started"],
*[class~="bookmap/year"],
*[class~="bookmap/month"],
*[class~="bookmap/day"],
*[class~="bookmap/completed"],
*[class~="bookmap/bookid"],
*[class~="bookmap/bookpartno"],
*[class~="bookmap/edition"],
*[class~="bookmap/isbn"],
*[class~="bookmap/booknumber"],
*[class~="bookmap/volume"],
*[class~="bookmap/maintainer"],
*[class~="bookmap/bookchangehistory"],
*[class~="bookmap/reviewed"],
*[class~="bookmap/edited"],
*[class~="bookmap/tested"],
*[class~="bookmap/approved"],
*[class~="bookmap/bookevent"],
*[class~="bookmap/bookeventtype"],
*[class~="bookmap/bookrights"],
*[class~="bookmap/copyrfirst"],
*[class~="bookmap/copyrlast"],
*[class~="bookmap/bookowner"],
*[class~="bookmap/bookrestriction"],
*[class~="bookmap/summary"] {
    display: block;
    collapsible: no;
    margin-left: 16ex;
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
    border-width: 0;
    border-style: none;
    padding: 0;
}

*[class~="bookmap/publisherinformation"]:before,
*[class~="bookmap/person"]:before,
*[class~="bookmap/organization"]:before,
*[class~="bookmap/printlocation"]:before,
*[class~="bookmap/published"]:before,
*[class~="bookmap/publishtype"]:before,
*[class~="bookmap/revisionid"]:before,
*[class~="bookmap/started"]:before,
*[class~="bookmap/year"]:before,
*[class~="bookmap/month"]:before,
*[class~="bookmap/day"]:before,
*[class~="bookmap/completed"]:before,
*[class~="bookmap/bookid"]:before,
*[class~="bookmap/bookpartno"]:before,
*[class~="bookmap/edition"]:before,
*[class~="bookmap/isbn"]:before,
*[class~="bookmap/booknumber"]:before,
*[class~="bookmap/volume"]:before,
*[class~="bookmap/maintainer"]:before,
*[class~="bookmap/bookchangehistory"]:before,
*[class~="bookmap/reviewed"]:before,
*[class~="bookmap/edited"]:before,
*[class~="bookmap/tested"]:before,
*[class~="bookmap/approved"]:before,
*[class~="bookmap/bookevent"]:before,
*[class~="bookmap/bookeventtype"]:before,
*[class~="bookmap/bookrights"]:before,
*[class~="bookmap/copyrfirst"]:before,
*[class~="bookmap/copyrlast"]:before,
*[class~="bookmap/bookowner"]:before,
*[class~="bookmap/bookrestriction"]:before,
*[class~="bookmap/summary"]:before {
    display: marker;
    /* Limit the length of very long tags such as publisherinformation. */
    content: xpath("substring(name(),1,14)");
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="bookmap/bookeventtype"] {
    content: paragraph(content("name=", attr(name)));
    color: #404040;
}

*[class~="bookmap/publishtype"],
*[class~="bookmap/bookrestriction"] {
    content: paragraph(content("value=", attr(value)));
    color: #404040;
}


/* ================================================= bookmapmeta.imp */
/* xnal-d.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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.
 *
 * xNAL elements. 
 */

/* xnal-d ----------------------------------------------------------------- */

*[class~="xnal-d/authorinformation"],
*[class~="xnal-d/personinfo"],
*[class~="xnal-d/organizationinfo"],
*[class~="xnal-d/namedetails"],
*[class~="xnal-d/personname"],
*[class~="xnal-d/organizationnamedetails"],
*[class~="xnal-d/addressdetails"],
*[class~="xnal-d/contactnumbers"],
*[class~="xnal-d/emailaddresses"],
*[class~="xnal-d/urls"] {
    display: block;
    collapsible: no;
    margin-left: 16ex;
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
    border-width: 0;
    border-style: none;
    padding: 0;
}

*[class~="xnal-d/addressdetails"] {
    white-space: pre;
}

*[class~="xnal-d/authorinformation"]:before,
*[class~="xnal-d/personinfo"]:before,
*[class~="xnal-d/organizationinfo"]:before,
*[class~="xnal-d/namedetails"]:before,
*[class~="xnal-d/personname"]:before,
*[class~="xnal-d/organizationnamedetails"]:before,
*[class~="xnal-d/addressdetails"]:before,
*[class~="xnal-d/contactnumbers"]:before,
*[class~="xnal-d/emailaddresses"]:before,
*[class~="xnal-d/urls"]:before {
    display: marker;
    content: xpath("substring(name(),1,14)");
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

*[class~="xnal-d/honorific"],
*[class~="xnal-d/firstname"],
*[class~="xnal-d/middlename"],
*[class~="xnal-d/lastname"],
*[class~="xnal-d/generationidentifier"],
*[class~="xnal-d/organizationname"],
*[class~="xnal-d/otherinfo"] {
    display: inline;
    border-width: 0;
    border-style: none;
    padding: 0;
}

*[class~="xnal-d/honorific"]:before,
*[class~="xnal-d/firstname"]:before,
*[class~="xnal-d/middlename"]:before,
*[class~="xnal-d/lastname"]:before,
*[class~="xnal-d/generationidentifier"]:before,
*[class~="xnal-d/organizationname"]:before {
    display: inline;
    content: " ";
}

*[class~="xnal-d/otherinfo"]:before {
    display: inline;
    content: ", ";
    color: gray;
}

*[class~="xnal-d/personname"] > *:first-child:before,
*[class~="xnal-d/organizationnamedetails"]  > *:first-child:before {
    content: "";
}

*[class~="xnal-d/locality"],
*[class~="xnal-d/administrativearea"],
*[class~="xnal-d/thoroughfare"],
*[class~="xnal-d/country"] {
    display: inline;
    border-width: 0;
    border-style: none;
    padding: 0;
}

*[class~="xnal-d/localityname"],
*[class~="xnal-d/postalcode"] {
    display: inline;
    border-width: 0;
    border-style: none;
    padding: 0;
}

*[class~="xnal-d/contactnumber"],
*[class~="xnal-d/emailaddress"],
*[class~="xnal-d/url"] {
    display: block;
    margin-left: 20px;
    margin-top: 0;
    margin-bottom: 0; 
    border-width: 0;
    border-style: none;
    padding: 0;
}

*[class~="xnal-d/contactnumber"]:before,
*[class~="xnal-d/emailaddress"]:before,
*[class~="xnal-d/url"]:before {
    display: marker;
    marker-offset: fill;
    content: disc;
    color: #404040;
}


/* ================================================= xnal-d.imp */
/* bookmap.imp ================================================= */
/*
 * Copyright (c) 2017-2019 XMLmind Software. 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.
 *
 * Bookmap elements other than metadata.
 */

/* bookmap ---------------------------------------------------------------- */

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

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

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

*[class~="bookmap/booklibrary"] {
    display: block;
    margin: 1em 0;
}

*[class~="bookmap/mainbooktitle"],
*[class~="bookmap/booktitlealt"] {
    display: block;
    font-family: serif;
    font-weight: bold;
}

*[class~="bookmap/mainbooktitle"] {
    font-size: 1.5em;
    margin: 0.67em 0;
}

*[class~="bookmap/booktitlealt"] {
    margin: 1em 0;
}

*[class~="bookmap/bookmap"] > *[class~="bookmap/booktitle"],
*[class~="bookmap/bookmap"] > *[class~="bookmap/frontmatter"],
*[class~="bookmap/bookmap"] > *[class~="bookmap/backmatter"] {
    display: block;
    collapsible: no;
    font-family: sans-serif;
    font-size: medium;
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 1em;
    border: 1px solid #E0E0F0;
    padding: 0.5ex;
}

*[class~="bookmap/bookmap"] > *[class~="bookmap/booktitle"]:before,
*[class~="bookmap/bookmap"] > *[class~="bookmap/frontmatter"]:before,
*[class~="bookmap/bookmap"] > *[class~="bookmap/backmatter"]:before {
    display: block;
    color: #606080;
    font-size: larger;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0;
}

*[class~="bookmap/bookmap"] > *[class~="bookmap/booktitle"]:before {
    content: element-name();
}

*[class~="bookmap/bookmap"] > *[class~="bookmap/frontmatter"]:before,
*[class~="bookmap/bookmap"] > *[class~="bookmap/backmatter"]:before {
    content: paragraph(content(element-name(), " ", invoke("chunkIcon")));
}

*[class~="bookmap/booklists"] {
    display: block;
    collapsible: no;
    border: 1px dotted #E0E0F0;
    padding: 0.5ex;
    margin: 0;
}

*[class~="bookmap/booklists"]:before {
    content: "";
}

/*
 * Specialized topicrefs
 */

*[class~="bookmap/toc"],
*[class~="bookmap/examplelist"],
*[class~="bookmap/equationlist"],
*[class~="bookmap/figurelist"],
*[class~="bookmap/tablelist"],
*[class~="bookmap/abbrevlist"],
*[class~="bookmap/trademarklist"],
*[class~="bookmap/bibliolist"],
*[class~="bookmap/indexlist"],
*[class~="bookmap/booklist"],
*[class~="bookmap/glossarylist"],
*[class~="bookmap/notices"],
*[class~="bookmap/dedication"],
*[class~="bookmap/colophon"],
*[class~="bookmap/amendments"],
*[class~="bookmap/bookabstract"],
*[class~="bookmap/draftintro"],
*[class~="bookmap/preface"],
*[class~="bookmap/part"],
*[class~="bookmap/chapter"],
*[class~="bookmap/appendix"],
*[class~="bookmap/appendices"] {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* first line */
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

*[class~="bookmap/chapter"],
*[class~="bookmap/appendix"] {
    margin-left: 4ex;
}

*[class~="bookmap/bookmap"] > *[class~="bookmap/chapter"],
*[class~="bookmap/bookmap"] > *[class~="bookmap/appendix"] {
    margin-left: 0;
}

*[class~="bookmap/toc"]:before,
*[class~="bookmap/examplelist"]:before,
*[class~="bookmap/equationlist"]:before,
*[class~="bookmap/figurelist"]:before,
*[class~="bookmap/tablelist"]:before,
*[class~="bookmap/abbrevlist"]:before,
*[class~="bookmap/trademarklist"]:before,
*[class~="bookmap/bibliolist"]:before,
*[class~="bookmap/indexlist"]:before,
*[class~="bookmap/booklist"]:before,
*[class~="bookmap/glossarylist"]:before,
*[class~="bookmap/notices"]:before,
*[class~="bookmap/dedication"]:before,
*[class~="bookmap/colophon"]:before,
*[class~="bookmap/amendments"]:before,
*[class~="bookmap/bookabstract"]:before,
*[class~="bookmap/draftintro"]:before,
*[class~="bookmap/preface"]:before,
*[class~="bookmap/part"]:before,
*[class~="bookmap/chapter"]:before,
*[class~="bookmap/appendix"]:before,
*[class~="bookmap/appendices"]:before {
    display: inline;
    content: invoke("topicrefContent", normal);
    color: #404060;
}

*[class~="bookmap/part"]:before {
    content: invoke("topicrefContent", 1.3em);
    color: #804000;
}

*[class~="bookmap/chapter"]:before {
    content: invoke("topicrefContent", 1.1em);
    color: #006080;
}

*[class~="bookmap/appendices"]:before {
    content: invoke("topicrefContent", 1.3em);
    color: #408000;
}

*[class~="bookmap/appendix"]:before {
    content: invoke("topicrefContent", 1.1em);
    color: #408000;
}

*[class~="bookmap/part"][processing-role=resource-only]:before,
*[class~="bookmap/chapter"][processing-role=resource-only]:before,
*[class~="bookmap/appendices"][processing-role=resource-only]:before,
*[class~="bookmap/appendix"][processing-role=resource-only]:before {
    color: #606060;
}

*[class~="bookmap/part"][format=ditamap]:before,
*[class~="bookmap/chapter"][format=ditamap]:before,
*[class~="bookmap/appendices"][format=ditamap]:before,
*[class~="bookmap/appendix"][format=ditamap]:before {
    color: #204080;
}

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


/* ================================================= bookmap.imp */

