/*
 * Copyright (c) 2017-2018 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 all kinds of topics. 
 */

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

/* Do not report an error if the "MathML support" add-on 
   has not been installed. */
@import url(---mathml-config:dita/mathml_support.imp);

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

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

/* topic.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.
 *
 * Topic elements. 
 */

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

dita {
    display: block;
}

glossentry,
glossgroup,
concept,
task,
troubleshooting,
reference,
topic {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* title */
}

/* Vertical margins for nested topics or topics contained in a dita. */
* > glossentry,
* > glossgroup,
* > concept,
* > task,
* > troubleshooting,
* > reference,
* > topic {
    margin: 1em 0;
}

glossgroup > title,
/* glossentry has no title */
concept > title,
task > title,
troubleshooting > title,
reference > title,
topic > title { 
    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;
}

topic > title {
    border-bottom-color: #6090B0;
}

glossgroup > title:before,
/* glossentry has no title */
glossentry > glossterm:before,
concept > title:before,
task > title:before,
troubleshooting > title:before,
reference > title:before,
topic > title:before {
    display: inline;
    content: collapser() " ";
}

body example > title,
body section > title,
topic > title {
    color: #6090B0;
}

titlealts {
    display: block;
    margin: 1em 0;
}

searchtitle,
navtitle,
abstract,
shortdesc,
related-links {
    display: block;
    margin-left: 16ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

searchtitle:before,
navtitle:before,
abstract:before,
shortdesc:before,
related-links:before {
    display: marker;
    content: element-name(); /*Support for specialization*/
    marker-offset: fill; /*Nicer*/
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

conbody,
taskbody,
troublebody,
refbody,
body {
    display: block;
    /*Vertical margins set in child elements*/
}

conbodydiv,
refbodydiv,
bodydiv {
    display: block;
    /* Transparent container: no margins */
}



/* ================================================= topic.imp */
/* 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 ------------------------------------------------------------------ */

ditavalmeta,
topicmeta,
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; 
}

ditavalmeta:before,
topicmeta:before,
prolog:before {
    display: marker;
    color: #808000;
}

ditavalmeta:before,
topicmeta:before {
    content: collapser(hide-when-disabled, yes,
                       show-level-menu, yes);
}

prolog:before {
    content: collapser();
}

ux-window,
resourceid,
series,
source,
permissions,
prognum,
publisher,
othermeta,
platform,
featnum,
keywords,
critdates,
copyright,
component,
prodname,
audience,
brand,
category,
prodinfo,
metadata,
author {
    display: block;
    margin-left: 16ex;
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
}

ux-window,
resourceid,
permissions,
othermeta,
created,
revised,
copyryear,
vrm,
audience {
    color: #404040;
}

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

vrm {
    display: block;
    margin-left: 16ex;
    content: paragraph(content("version=", attr(version),
                               " release=", attr(release),
                               " modification=", attr(modification)));
}

/*nothing before vrmlist*/
vrmlist {
    display: block;
    margin: 0.5em 0;
}

copyryear,
copyrholder {
    display: inline;
}

copyryear {
    content: " year=" attr(year) " ";
}

created,
revised {
    display: block;
    margin-left: 16ex;
    /*vertical margins in critdates*/
}

created {
    content: paragraph(content("date=", attr(date)));
}

created[golive] {
    content: paragraph(content("date=", attr(date), 
                               " golive=", attr(golive)));
}

revised {
    content: paragraph(content("modified=", attr(modified)));
}

revised[golive] {
    content: paragraph(content("modified=", attr(modified), 
                               " golive=", attr(golive)));
}

othermeta {
    content: paragraph(content("name=", attr(name),
                               " content=", attr(content)));
}

permissions {
    content: paragraph(content("view=", attr(view)));
}

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)));
}

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)));
}

keywords > *:before {
    display: inline;
    content: " ";
}

keywords > *:first-child:before {
    content: "";
}

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

copyryear:before {
    display: inline;
}

author[href]:after,
publisher[href]:after,
source[href]:after {
    display: inline;
    content: icon(right-link, 0) decode-uri(attr(href));
    font-size: smaller;
    font-family: monospace;
    color: #404040;
}

author[keyref]:after,
publisher[keyref]:after,
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");
}

image[href],
svgref[href],
mathmlref[href] {
    tooltip-content: "";
}

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

/*
 * Divisions
 */

example,
section {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* title */
    margin: 1em 0;
}

title {
    display: block;
    font-family: serif;
    font-weight: bold;
    margin: 1em 0;
}

example > title,
section > title { 
    font-size: 1.3em;
    margin: 0.77em 0;
}

section > title:before {
    display: inline;
    content: collapser() " ";
}

example > title:before {
    display: inline;
    content: collapser() " Example: ";
}

div,
sectiondiv {
    display: block;
    /* Transparent container: no margins */
}

/*
 * Simple lists
 */

sl {
    display: block;
    margin-left: 2ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

sli {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
}

sl[compact=yes] > sli {
    margin-top: 0;
    margin-bottom: 0;
}

/*
 * Ordered and unordered lists
 */

ol,
ul { 
    display: block;
    margin-left: 2ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

ul { 
    list-style-type: disc;
}

ul ul { 
    list-style-type: square;
}

ul ul ul { 
    list-style-type: circle;
}

ol,
ol[outputclass*=decimal] {
    list-style-type: decimal;
    counter-reset: list-item; 
}

ol[outputclass*=lower-alpha] { 
    list-style-type: lower-alpha;
}

ol[outputclass*=upper-alpha] { 
    list-style-type: upper-alpha;
}

ol[outputclass*=lower-roman] { 
    list-style-type: lower-roman;
}

ol[outputclass*=upper-roman] { 
    list-style-type: upper-roman;
}

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

ol[outputclass*=continue] {
    counter-reset: none; 
}

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

ol > li {
    list-item-counter: counter(list-item) ".";
    counter-increment: list-item; 
}

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

li {
    display: list-item;
    margin-top: 1em;
    margin-bottom: 1em;
}

ul[compact=yes] > li,
ol[compact=yes] > li {
    margin-top: 0;
    margin-bottom: 0;
}

li > *:first-child {
    margin-top: 0; 
    margin-bottom: 0; 
}
      
/*
 * Definition lists
 */

dl {
    display: block;
    margin-left: 2ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

dlhead,
dlentry {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
}

dl[compact=yes] > dlhead,
dl[compact=yes] > dlentry {
    margin-top: 0;
    margin-bottom: 0;
}

dthd,
dt {
    display: block;
    font-weight: bold; 
}

dt[keyref]:after {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
    display: inline;
    font-size: smaller;
    font-weight: normal;
    color: #404040;
}

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

dl:contains-element(dlhead) {
    display: table;
    resizable-columns: no;
    border: 1 solid #E0E0E0;
}

dl:contains-element(dlhead) > dlhead,
dl:contains-element(dlhead) > dlentry {
    display: table-row;
    margin-top: 0;
    margin-bottom: 0;
}

dl:contains-element(dlhead) > dlhead {
    background-color: #E0E0E0;
}

dl:contains-element(dlhead) > dlentry {
    background-color: inherit; /*e.g. from read-only dl*/
}

dl:contains-element(dlhead) > dlhead > dthd,
dl:contains-element(dlhead) > dlhead > ddhd,
dl:contains-element(dlhead) > dlentry > dt,
dl:contains-element(dlhead) > dlentry > dd {
    display: table-cell;
    margin-left: 0;
    border: 1 solid #E0E0E0;
    padding: 2px;
    background-color: inherit;
}

/*
 * Figures
 */

equation-figure,
fig {
    display: block;
    margin: 1em 0;
}

figgroup {
    display: block;
    margin: 1em 0;
}

desc {
    display: inline;
}

desc:before {
    display: inline;
    content: " [";
    color: #404040;
}

desc:after {
    display: inline;
    content: "]";
    color: #404040;
}

equation-figure > desc,
fig > desc,
object > desc,
table > desc,
linklist > desc {
    display: block;
    border: 1px solid #E0E0E0;
    padding: 0.5ex;
    margin-bottom: 1em;
}

equation-figure > desc:before,
fig > desc:before,
object > desc:before,
table > desc:before,
linklist > desc:before {
    display: block;
    content: element-name();
    font-size: smaller;
    font-weight: bold;
    color: #404040;
    margin-top: 1.09em;
}

equation-figure > desc:after,
fig > desc:after,
object > desc:after,
table > desc:after,
linklist > desc:after {
    content: "";
}

object > desc,
object > desc:before {
    margin-left: object-horizontal-margin();
    margin-right: object-horizontal-margin();
}

/*
 * Make figures collapsible.
 */

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

equation-figure > title:before,
fig > title:before {
    content: collapser() " ";
}

/*
 * Image
 */

image {
    display: inline;
}

equation-figure > image,
fig > image,
imagemap > image,
image[placement=break] {
    display: block;
    margin-top: 0;
    margin-bottom: 1em;
}

equation-figure > image:empty,
fig > image:empty,
imagemap > image:empty,
image[placement=break]:empty {
    content: icon(invisible);
}

equation-figure > image[align=right],
fig > image[align=right],
imagemap > image[align=right],
image[placement=break][align=right] {
    text-align: right;
    margin-left: auto;
}

equation-figure > image[align=center],
fig > image[align=center],
imagemap > image[align=center],
image[placement=break][align=center] {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

image:before {
    display: inline;
    content: gadget("com.xmlmind.xmleditext.dita.Image");
}

equation-figure > image:before,
fig > image:before,
imagemap > image:before,
image[placement=break]:before {
    display: block;
    margin-top: 1em;     
    margin-bottom: 0;
}

alt {
    display: inline; /*alt element of an image*/
    font-size: medium; /* otherwise image/@scale has an effect on it */
}

alt:before {
    display: inline;
    content: " [";
    color: #404040;
}

alt:after {
    display: inline;
    content: "]";
    color: #404040;
}

equation-figure > image > alt,
fig > image > alt,
imagemap > image > alt,
image[placement=break] > alt {
    display: block;
    margin-top: 0.5ex;
}

longdescref {
    display: inline;
    content: icon(right-link, 0);
    font-family: monospace;
    font-size: small; /* otherwise image/@scale has an effect on it */
    color: #404040;
}

longdescref[href] {
    content: icon(right-link, 0) decode-uri(attr(href));
}

longdescref[keyref] {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

equation-figure > image > longdescref,
fig > image > longdescref,
imagemap > image > longdescref,
image[placement=break] > longdescref {
    display: block;
    margin-top: 0.5ex;
}

object > longdescref {
    display: block;
    margin: 1em object-horizontal-margin();
}

/*
 * Objects
 */

object,
param {
    display: block;
    property-group: object-properties(#E0E0E0);
}

object:before,
param:before {
    property-group: object-before-properties(#E0E0E0);
}

object::attribute,
param::attribute {
    property-group: object-attribute-properties();
}

param::attribute(name),
param::attribute(value) {
    show-attribute: always;
}

@media media-player {
    object[type^="audio/"],
    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;
    }

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

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

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

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

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

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

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

/*
 * Block elements
 */

p {
    display: block;
    margin: 1em 0;
}

lines {
    display: block;
    white-space: pre;
    margin: 1em 0;
}

pre {
    display: block;
    white-space: pre;
    font-family: monospace;
    background-color: #F0F0F0; 
    border: 1px solid #E0E0E0; 
    padding: 0.5ex; 
    margin: 1em 0;
}

note {
    display: block;
    margin-left: 16ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

note:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

note[type]:before {
    content: attr(type);
}

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

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

lq {
    display: block;
    margin: 1em 10ex;
}

lq[reftitle]:after,
lq[href]:after,
lq[keyref]:after {
    display: inline;
    font-size: smaller;
    color: #404040;
}

lq[reftitle]:after {
    content: " (" attr(reftitle) ")";
}

lq[href]:after {
    content: icon(right-link, 0)
             text(decode-uri(attr(href)), font-family, monospace);
}

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

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

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

longquoteref {
    display: inline;
    content: icon(right-link, 0);
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

longquoteref[href] {
    content: icon(right-link, 0) decode-uri(attr(href));
}

longquoteref[keyref] {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

/*
 * Inline elements
 */

text {
    display: inline;
}

ph {
    display: inline;
}

term {
    display: inline;
    font-style: italic;
}

keyword {
    display: inline;
    font-weight: bold;
}

cite {
    display: inline;
    font-style: italic;
}

ph[keyref]:after,
term[keyref]:after,
keyword[keyref]:after,
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;
}

tm {
    display: inline;
}

tm:after {
    display: inline;
    content: "[" attr(tmtype) "]";
    font-size: smaller;
    color: #404040;
}

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

q:before {
    display: inline;
    content: open-quote;
    color: #404040;
}

q:after {
    display: inline;
    content: close-quote;
    color: #404040;
}

xref {
    display: inline;
    color: navy;
    text-decoration: underline;
}

xref:after {
    display: inline;
    content: icon(right-link, 0);
    text-decoration: none;
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

xref[href]:after {
    content: icon(right-link, 0) decode-uri(attr(href));
}

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

/*
 * Miscellaneous
 */

abbreviated-form {
    display: inline;
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
    font-style: italic;
    color: #404040;
}

abbreviated-form[keyref]:after {
    content: "";
}

draft-comment {
    display: block;
    color: red;
    margin: 1em 0;
}

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;
}

fn:before {
    display: marker;
    content: xpath("concat(index-of-node(//fn,.),'.')");
    font-weight: bold;
    color: #404040;
}

fn[callout]:before {
    content: attr(callout);
}

fn,
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; 
}

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],
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";

simpletable {
    display: table; 
    border: 1 outset gray;
    margin: 1em 0; 
}

sthead {
    display: table-row;
    font-weight: bold;
    background-color: #E0E0E0;
}

strow {
    display: table-row; 
    background-color: inherit; /*e.g. from read-only simpletable*/
}

stentry {
    display: table-cell; 
    background-color: inherit;
    border: 1 inset gray;
    padding: 2px; 
}

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

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

simpletable[outputclass*="bgcolor("],
sthead[outputclass*="bgcolor("],
strow[outputclass*="bgcolor("],
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 ------------------------------------------------------------------ */

indextermref,
indexterm {
    display: inline;
    font-size: small; /*not smaller*/
}

indextermref:before,
indexterm:first-child:before, /*Often used in keywords*/
indexterm:before {
    display: inline;
    content: icon(left-half-disc, 0);
    color: gray;
}

indexterm:after {
    display: inline;
    content: icon(right-half-disc, 0);
    color: gray;
}

indextermref:after {
    display: inline;
    content: icon(right-half-disc, gray)
             icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
    color: #404040;
}

indexterm[start]:first-child:before,
indexterm[start]:before {
    content: icon(left-half-disc, 0) attr(start) icon(half-disc-separator, 0);
}

indexterm[end]:after {
    content: icon(half-disc-separator, 0) attr(end) icon(right-half-disc, 0);
}

/*
 * Indexing domain
 */

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

index-base,
index-see,
index-see-also,
index-sort-as {
    display: inline;
    font-size: small; /*not smaller*/
}

index-base:before,
index-see:before,
index-see-also:before,
index-sort-as:before {
    display: inline;
    font-weight: bold;
    color: gray;
}

index-base:before {
    content: " " element-name() " ";
}

index-see:before {
    content: " see ";
}

index-see-also:before {
    content: " see also ";
}

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

boolean,
state {
    display: inline;
    color: #404040;
}

boolean {
    content: "state=" attr(state);
}

state {
    content: "name=" attr(name) " value=" attr(value);
}

boolean:before,
state:before {
    display: inline;
    content: element-name() " ";
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

foreign,
unknown {
    display: inline-tree;
    collapsed: yes;
}

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

    equation-figure > foreign[outputclass*=embed-latex] {
        display: block;
        margin: 1.09em 0 0 0;
    }

    /*
     * Previewing TeX equations requires installing 
     * the "JLaTeXMath image toolkit plug-in".
     */
    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;
    }

    equation-figure > foreign[outputclass*=embed-latex]:after,
    equation-block > 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;
    }

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

itemgroup {
    display: block;
    margin: 1em 0;
}

/*
 * data, data-about
 */

data-about,
data {
    display: block;
    property-group: object-properties(#E0E0A0);
    background-color: #F8F8E0;
}

data-about:before,
data:before {
    property-group: object-before-properties(#E8E8C0);
}

data-about::attribute,
data::attribute {
    property-group: object-attribute-properties();
}

data-about::attribute(href) {
    show-attribute: always;
}

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


/* ================================================= specialization.imp */
/* related-links.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.
 *
 * Related links elements. 
 */

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

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

linklist {
    list-style-type: circle;
}

linkpool {
    list-style-type: square;
}

linkinfo {
    display: block;
    margin-left: 16ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

linkinfo:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

linktext {
    display: inline;
}

link {
    display: list-item;
}

link:after {
    display: inline;
    content: icon(right-link, 0);
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

link[href]:after {
    content: icon(right-link, 0) decode-uri(attr(href));
}

link[keyref]:after {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}


/* ================================================= related-links.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 -------------------------------------------------------------- */

change-historylist,
change-item,
change-organization,
change-person,
change-revisionid,
change-started,
change-completed,
change-summary,
change-request-reference,
change-request-system,
change-request-id {
    display: block;
    margin-left: 24ex;
    margin-top: 1em;
    margin-bottom: 1em; 
}

change-historylist,
change-item {
    margin-left: 16ex;
}

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

change-historylist:before,
change-item:before,
change-organization:before,
change-person:before,
change-revisionid:before,
change-started:before,
change-completed:before,
change-summary:before,
change-request-reference:before,
change-request-system:before,
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 --------------------------------------------------------------- */

hazardstatement {
    display: block;
    background-color: #F0FFF0;
    border: 1px solid #C0DDC0;
    padding: 1ex;
    margin: 1em 4ex;
}

hazardstatement[type=danger] {
    background-color: #FFF0F0;
    border: 1px solid #DDC0C0;
}

hazardstatement[type=warning] {
    background-color: #FFF0E0;
    border: 1px solid #FFA500;
}

hazardstatement[type=caution] {
    background-color: #FFFFF0;
    border: 1px solid #DDDDC0;
}

hazardstatement[type=notice] {
    background-color: #E0F0FF;
    border: 1px solid #B0C0DD;
}

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);

hazardstatement:before {
    content: hazardstatement-header('other', #C0DDC0);
}

hazardstatement[type=danger]:before {
    content: hazardstatement-header('danger', #DDC0C0);
}

hazardstatement[type=warning]:before {
    content: hazardstatement-header('warning', #FFA500);
}

hazardstatement[type=caution]:before {
    content: hazardstatement-header('caution', #DDDDC0);
}

hazardstatement[type=notice]:before {
    content: hazardstatement-header('notice', #B0C0DD);
}

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);
}

messagepanel {
    display: block;
    margin: 1em 0; 
}

messagepanel:first-child {
    margin-top: 2em; 
}

typeofhazard,
consequence,
howtoavoid {
    display: block;
    margin-top: 1em;     
    margin-bottom: 1em;     
    margin-left: 16ex;     
}

typeofhazard:before,
consequence:before,
howtoavoid:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

hazardsymbol {
    display: block;
    margin-top: 0;
    margin-bottom: 1em;
}

hazardsymbol:empty {
    content: icon(invisible);
}

hazardsymbol[align=right] {
    text-align: right;
    margin-left: auto;
}

hazardsymbol[align=center] {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

hazardsymbol:before {
    display: block;
    content: gadget("com.xmlmind.xmleditext.dita.Image");
    margin-top: 1em;     
    margin-bottom: 0;
}

hazardsymbol > alt,
hazardsymbol > 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 ------------------------------------------------------------------- */

b {
    display: inline;
    font-weight: bold;
}

i {
    display: inline;
    font-style: italic;
}

u {
    display: inline;
    text-decoration: underline;
}

line-through {
    display: inline;
    text-decoration: line-through;
}

overline {
    display: inline;
    text-decoration: overline;
}

tt {
    display: inline;
    font-family: monospace;
}

sup,
sub {
    display: inline-block;
    font-size: smaller;
}

sup {
    vertical-align: super;
}

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

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

numcharref {
    display: inline;
    font-family: monospace;
}

numcharref:before {
    content: "&#";
    color: gray;
}

numcharref:after {
    content: ";";
    color: gray;
}

parameterentity {
    display: inline;
    font-family: monospace;
}

parameterentity:before {
    content: "%";
    color: gray;
}

parameterentity:after {
    content: ";";
    color: gray;
}

textentity {
    display: inline;
    font-family: monospace;
}

textentity:before {
    content: "&";
    color: gray;
}

textentity:after {
    content: ";";
    color: gray;
}

xmlatt {
    display: inline;
    font-family: monospace;
}

xmlatt:before {
    content: "@";
    color: gray;
}

xmlelement {
    display: inline;
    font-family: monospace;
}

xmlelement:before {
    content: "<";
    color: gray;
}

xmlelement:after {
    content: ">";
    color: gray;
}

xmlnsname {
    display: inline;
    font-family: monospace;
}

xmlnsname:before {
    content: '"';
    color: gray;
}

xmlnsname:after {
    content: '"';
    color: gray;
}

xmlpi {
    display: inline;
    font-family: monospace;
}

xmlpi:before {
    content: "<?";
    color: gray;
}

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

imagemap {
    display: block;
    margin: 1em 0;
    border: 1px solid #C0C0C0; 
    padding: 0.5ex; 
}

area {
    display: block;
    margin-left: 20px;
    margin-top: 0;
    margin-bottom: 0;
}

area:before {
    display: marker;
    content: square;
}

shape,
coords,
sort-as {
    display: inline;
    font-size: 1em;
    font-weight: normal;
    font-style: normal;
    text-decoration: none;
    color: normal;
    background-color:transparent;
}

shape:before,
coords:before,
sort-as:before {
    display: inline;
    content: element-name() " ";
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

sort-as[value]:before {
    content: element-name() " value=" attr(value) " ";
}

shape:after,
coords:after,
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 ------------------------------------------------------------------- */

codeblock,
codeph {
    font-family: monospace;
}

codeph {
    display: inline;
}

coderef {
    display: inline;
    color: #404040;
}

coderef:after {
    display: inline;
    content: icon(right-link, 0);
    font-family: monospace;
    font-size: smaller;
}

coderef[href]:after {
    content: icon(right-link, 0) decode-uri(attr(href));
}

coderef[keyref]:after {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

codeblock {
    display: block;
    white-space: pre;
    background-color: #F0F0F0; 
    border: 1px solid #C0C0C0;
    padding: 0.5ex;
    margin: 1em 0;
}

option {
    display: inline;
    font-weight: bold;
}

apiname,
parmname {
    display: inline;
    font-family: monospace;
}

parmname {
    font-style: italic;
}

parml {
    display: block;
    margin-left: 2ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

plentry {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
}

pt {
    display: block;
    font-weight: bold; 
}

pd {
    display: block;
    margin-left: 4ex;
}

/*
 * Syntax diagram elements
 */

syntaxdiagram {
    display: block;
    margin-left: 16ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

syntaxdiagram > title,
synblk > title,
groupseq > title,
groupchoice > title,
groupcomp > title,
fragment > title {
    margin-top: 0;
    margin-bottom: 0;
}

synblk,
groupseq,
groupchoice,
groupcomp,
fragment,
synnote,
fragref,
synnoteref {
    display: block;
    margin-left: 16ex;
    margin-top: 0;
    margin-bottom: 0;
}

synnote,
synnote:before {
    font-size: 1em;
    border-style: none;
    padding: 0;
}

syntaxdiagram:before,
synblk:before,
groupseq:before,
groupchoice:before,
groupcomp:before,
fragment:before,
synnote:before,
fragref:before,
synnoteref:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

fragref {
    color: navy;
    text-decoration: underline;
}

/* fragref and synnoteref do not have @keyref */
fragref:after,
synnoteref {
    content: icon(right-link, 0) decode-uri(attr(href));
    text-decoration: none;
    font-family: monospace;
    color: #404040;
}

fragref:after {
    display: inline;
    font-size: smaller;
}

synnoteref:after {
    /* Inherits from xref: would mean link displayed twice */
    content: "";
}

repsep {
    display: block;
}

repsep:before {
    content: "(";
    color: #404040;
}

repsep:after {
    content: ")";
    color: #404040;
}

synph,
oper,
sep,
delim,
var,
kwd {
    display: inline;
}

oper:before,
sep:before,
delim:before,
var:before,
kwd:before {
    display: inline;
    content: " ";
}

oper:first-child:before,
sep:first-child:before,
delim:first-child:before,
var:first-child:before,
kwd:first-child:before {
    content: "";
}

kwd {
    font-weight: bold;
}

var {
    font-style: italic;
}

oper {
    color: rgb(96,0,96);
}

sep {
    color: rgb(96,96,0);
}

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

msgnum,
msgblock,
msgph {
    font-family: monospace;
    background-color: #E0F0F0;
}

msgph {
    display: inline;
}

msgblock {
    display: block;
    white-space: pre;
    border: 1px solid #C0D0D0;
    padding: 0.5ex;
    margin: 1em 0;
}

msgnum {
    display: inline;
    font-weight: bold;
}

userinput,
systemoutput,
filepath,
varname,
cmdname {
    display: inline;
    font-family: monospace;
}

cmdname {
    font-weight: bold;
}

varname {
    font-style: italic;
}

userinput {
    background-color: rgb(192,255,192);
}

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

uicontrol,
wintitle {
    display: inline;
    font-weight: bold;
}

menucascade {
    display: inline;
}

menucascade > uicontrol:before {
    content: " \279C  ";
    color: gray;
}

menucascade > uicontrol:first-child:before {
    content: "";
}

shortcut {
    display: inline;
    text-decoration: underline;
}

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 */
/* equation-d.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.
 *
 * Equation domain elements. 
 */

/* equation-d ------------------------------------------------------------- */

equation-block {
    display: block;
    margin: 1em 0;
}

/* equation-figure like fig in body.imp */

equation-inline {
    display: inline;
}

equation-number {
    display: inline;
}

equation-number:before,
equation-number:after {
    display: inline;
    font-weight: bold;
    color: gray;
}

equation-number:before {
    content: " ( ";
}

equation-number:after {
    content: " ) ";
}

equation-number:last-child:before {
   content: "      ( ";
}

equation-number:first-child:after {
   content: " )      ";
}


/* ================================================= equation-d.imp */
/* mathml-d.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.
 *
 * MathML domain elements. 
 */

@namespace m "http://www.w3.org/1998/Math/MathML";

/* mathml-d --------------------------------------------------------------- */

mathml {
    display: inline;
    content: "";
    font-weight: normal;
    color: normal;
}

equation-figure > mathml,
fig > mathml {
    display: block;
    margin-top: 0;
    margin-bottom: 1em;
}

@media xmlmind-xml-editor {
    m|math {
        content: image-viewport(data-type, XML);
    }
}
@media xxe-client {
    m|math {
        content: gadget("com.xmlmind.xmleditsrv.webview.MathJaxPane");
    }
}

mathml > mathmlref {
    display: inline;
    content: gadget("com.xmlmind.xmleditext.dita.Image"); /*Supports keyref!*/
}

mathml > mathmlref:after {
    content: "";
}


/* ================================================= mathml-d.imp */
/* svg-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.
 *
 * SVG domain elements. 
 */

@namespace svg "http://www.w3.org/2000/svg";

/* svg-d ------------------------------------------------------------------ */

svg-container {
    display: inline;
    content: "";
    font-weight: normal;
    color: normal;
}

equation-figure > svg-container,
fig > svg-container {
    display: block;
    margin-top: 0;
    margin-bottom: 1em;
}

svg|svg {
    content: image-viewport(data-type, XML);
}

svg-container > svgref {
    display: inline;
    content: gadget("com.xmlmind.xmleditext.dita.Image"); /*Supports keyref!*/
}

svg-container > svgref:after {
    content: "";
}


/* ================================================= svg-d.imp */
/* media-d.imp ================================================= */
/*
 * Copyright (c) 2018-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.
 *
 * User interface elements. 
 */

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

/* media-d ---------------------------------------------------------------- */

audio {
    display: block; 
    property-group: object-properties(#E0F0F0);
}

video {
    display: block; 
    property-group: object-properties(#E0E0F0);
}

audio:before {
    property-group: object-before-properties(#E0F0F0); 
}

video:before {
    property-group: object-before-properties(#E0E0F0); 
}

video-poster,
media-controls,
media-autoplay,
media-loop, 
media-muted,
media-source,
media-track {
    display: block; 
    property-group: object-properties(#E0E0E0);
}

video-poster:before,
media-controls:before,
media-autoplay:before,
media-loop:before, 
media-muted:before,
media-source:before,
media-track:before {
    property-group: object-before-properties(#E0E0E0); 
}

audio::attribute,
video::attribute,
video-poster::attribute,
media-controls::attribute,
media-autoplay::attribute,
media-loop::attribute, 
media-muted::attribute,
media-source::attribute,
media-track::attribute { 
    property-group: object-attribute-properties(); 
}

@media media-player {
    audio,
    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;
    }

    audio:before,
    video:before {
        content: "";
    }

    audio {
      content: component("com.xmlmind.xmledit.cssext.media.MediaPlayerFactory",
                        type, audio,
                        delegate,
                        "com.xmlmind.xmleditext.dita.MediaPlayerDelegateImpl2");
    }

    video {
      content: component("com.xmlmind.xmledit.cssext.media.MediaPlayerFactory",
                        type, video,
                        delegate,
                        "com.xmlmind.xmleditext.dita.MediaPlayerDelegateImpl2");
    }

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

    video:property(prop|showObjectView),
    audio:property(prop|showObjectView) {
        content: "";
    }

    video:property(prop|showObjectView) {
        property-group: object-properties(#E0E0F0);
    }

    audio:property(prop|showObjectView) {
        property-group: object-properties(#E0F0F0);
    }

    video:property(prop|showObjectView):before {
        property-group: media-object-before-properties(#E0E0F0); 
    }

    audio:property(prop|showObjectView):before {
        property-group: media-object-before-properties(#E0F0F0); 
    }

    video:property(prop|showObjectView)::attribute,
    audio:property(prop|showObjectView)::attribute {
        property-group: object-attribute-properties(); 
    }
}



/* ================================================= media-d.imp */

/* concept.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.
 *
 * Concept elements. 
 */

/* concept ---------------------------------------------------------------- */

concept > title {
    border-bottom-color: rgb(139,0,0);
}

conbody example > title,
conbody section > title,
concept > title {
    color: rgb(139,0,0);
}


/* ================================================= concept.imp */
/* reference.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.
 *
 * Reference elements. 
 */

/* reference -------------------------------------------------------------- */

reference > title { 
    border-bottom-color: rgb(85,26,139);
}

refbody example > title,
refbody section > title,
reference > title { 
    color: rgb(85,26,139);
}

refsyn {
    display: block;
    margin: 1em 0;
    background-color: #F0EAFF;
    padding: 0.5ex;
}

properties {
    display: table;
    resizable-columns: no;
    border: 1 solid #F0D0FF;
    margin: 1em 0;
}

prophead,
property {
    display: table-row;
}

prophead {
    background-color: #F0EAFF;
}

property {
    background-color: inherit; /*e.g. from read-only properties*/
}

proptypehd,
propvaluehd,
propdeschd,
proptype,
propvalue,
propdesc {
    display: table-cell;
    margin-left: 0;
    border: 1px solid #EAE0FF;
    padding: 2px;
    background-color: inherit;
}

propdeschd,
propdesc {
    width: 50%;
}

proptypehd,
proptype {
    start-column: 0;
}

propvaluehd,
propvalue {
    start-column: 1;
}

propdeschd,
propdesc {
    start-column: 2;
}


/* ================================================= reference.imp */
/* task.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.
 *
 * Task elements. 
 */

/* task ------------------------------------------------------------------- */

task > title { 
    border-bottom-color: rgb(0,100,0);
}

taskbody example > title,
taskbody section > title,
task > title { 
    color: rgb(0,100,0);
}

/* 
 * parent>child selectors are needed by only for the classed CSS.
 * Without it, the weight of the following rules would be less than
 * the weight of section rules.
 */

taskbody > prereq,
taskbody > context,
taskbody > result,
taskbody > tasktroubleshooting,
taskbody > postreq,
info,
tutorialinfo,
stepxmp,
stepresult,
steptroubleshooting {
    display: block;
    margin-left: 16ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

taskbody > prereq:before,
taskbody > context:before,
taskbody > result:before,
taskbody > tasktroubleshooting:before,
taskbody > postreq:before,
info:before,
tutorialinfo:before,
stepxmp:before,
stepresult:before,
steptroubleshooting:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

taskbody > tasktroubleshooting:before,
steptroubleshooting:before {
    content: "troubleshooting";
}

steps-informal {
    display: block;
    margin: 1em 0;
}

choices,
substeps,
steps-unordered,
steps {
    display: block;
    margin-left: 2ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

stepsection,
step[importance],
step {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
}

steps-unordered > stepsection,
steps-unordered > step {
    margin-left: 20px;
}

@property-value step-marker() 
    concatenate("url(icons/", xpath("if(@importance='required', 'required_', @importance='optional', 'optional_', '')"), "step.png)");

steps-unordered > step:before {
    display: marker;
    content: step-marker();
}

steps > stepsection,
steps > step {
    margin-left: 6ex;
}

steps > step:before {
    display: marker;
    content: simple-counter(n, decimal) " " step-marker();
}

steps > stepsection:before,
steps-unordered > stepsection:before {
    display: marker;
    content: url(icons/step_section.png);
}

substep[importance],
substep {
    display: block;
    margin-left: 6ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

substep:before {
    display: marker;
    content: simple-counter(n, lower-alpha) " " step-marker();
}

choice {
    display: block;
    margin-left: 20px;
    margin-top: 1em;
    margin-bottom: 1em;
}

choice:before {
    display: marker;
    content: url(icons/choice.png);
}

cmd {
    display: block;
    /* Mandatory first element of a step or a substep: 
       no need to add vertical margins. */
}

choicetable {
    display: table;
    resizable-columns: no;
    border: 1 solid #D0FFD0;
    margin: 1em 0;
}

chhead,
chrow {
    display: table-row;
}

chhead {
    background-color: #D0FFC0;
}

chrow {
    background-color: inherit; /*e.g. for a read-only choicetable*/
}

choptionhd,
chdeschd,
choption,
chdesc {
    display: table-cell;
    border: 1 solid #D0FFD0;
    padding: 2px;
    background-color: inherit;
}

chdeschd,
chdesc {
    width: 66%;
}


/* ================================================= task.imp */
/* troubleshooting.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.
 *
 * Troubleshooting elements. 
 */

/* troubleshooting -------------------------------------------------------- */

troubleshooting > title {
    color: rgb(0,100,50);
    border-bottom-color: rgb(0,100,50);
}

condition,
troubleSolution,
cause,
remedy,
responsibleParty {
    display: block;
    collapsible: no;
    margin-top: 1em;
    margin-bottom: 1em;
}

condition,
troubleSolution,
cause,
responsibleParty {
    margin-left: 16ex;
}

condition:before,
troubleSolution:before,
cause:before,
remedy:before,
responsibleParty:before {
    content: element-name();
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

condition:before,
troubleSolution:before,
cause:before,
responsibleParty:before {
    display: marker;
    marker-offset: fill;
}

remedy:before {
    display: block;
}

/* 
 * These sections having an optional title are not collapsible 
 * inside troubleshooting.
 */
troublebody > condition > title,
troubleSolution > cause > title,
troubleSolution > remedy > title {
    font-size: 1em;
    font-style: normal;
    color: normal;
    margin-top: 1em;
    margin-bottom: 1em;
}

condition > title:before,
troubleSolution > cause > title:before,
troubleSolution > remedy > title:before {
    content: "";
}


/* ================================================= troubleshooting.imp */
/* glossary.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.
 *
 * Glossary elements. 
 */

/* glossgroup ------------------------------------------------------------- */

glossgroup > title {
    color: #6060B0;
    border-bottom-color: #6060B0;
}

/* glossgroup has no body */

/* glossentry ------------------------------------------------------------- */

/* 
 * parent>child selectors are needed by only for the classed CSS.
 * Without it, the weight of the following rules would be less than
 * the weight of concept>title rules.
 */

glossentry > glossterm {
    display: block;
    font: normal bold medium sans-serif; 
    color: #6060B0;
    border-style: none;
    margin-bottom: 0;
}

glossentry > glossdef {
    display: block;
    margin-top: 0;
    margin-left: 4ex;
}

glossentry > glossdef:before {
    content: "";
}

glossBody {
    display: block;
    margin-left: 4ex;
    /*Vertical margins set in child elements*/
}

glossentry > related-links {
    margin-left: 4ex;
}

glossentry > related-links:before {
    display: block;
    margin-left: 4ex;
    margin-top: 1em;
    margin-bottom: 1em; 
}

/* The long selectors for glossAbbreviation, etc, are needed
   in the case of the classed CSS because these elements are
   a kind of title. */

glossPartOfSpeech,
glossStatus,
glossProperty,
glossSurfaceForm,
glossUsage,
glossScopeNote,
glossentry > glossBody > glossAlt > glossAbbreviation,
glossentry > glossBody > glossAlt > glossAcronym,
glossentry > glossBody > glossAlt > glossShortForm,
glossentry > glossBody > glossAlt > glossSynonym,
glossAlternateFor {
    display: block;
    font: normal normal medium sans-serif;
    color: normal;
    background-color: transparent;
    border-style: none;
    margin-left: 20ex;
    margin-top: 0.5em;
    margin-bottom: 0.5em; 
}

glossPartOfSpeech:before,
glossStatus:before,
glossProperty:before,
glossSurfaceForm:before,
glossUsage:before,
glossScopeNote:before,
glossentry > glossBody > glossAlt > glossAbbreviation:before,
glossentry > glossBody > glossAlt > glossAcronym:before,
glossentry > glossBody > glossAlt > glossShortForm:before,
glossentry > glossBody > glossAlt > glossSynonym:before,
glossAlternateFor:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

glossPartOfSpeech,
glossStatus {
    /*Without paragraph, does not wrap line.*/
    content: paragraph(content("value=", attr(value)));
}

glossProperty:empty {
    content: paragraph(content("name=", attr(name),
                               " value=" attr(value)));
}

glossAlt {
    display: block;
    border: 1px solid gray;
    padding: 0.5ex;
    margin: 0.5em 0;
}

glossAlternateFor:after {
    display: inline;
    content: icon(right-link, 0);
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

glossAlternateFor[href]:after {
    content: icon(right-link, 0) decode-uri(attr(href));
}

glossAlternateFor[keyref]:after {
    content: icon(external-link-small, 0) xpath("dh:formatKeyref(.)");
}

glossSymbol {
    display: block;
    margin-top: 0;
    margin-bottom: 0.5em;
}

glossSymbol:empty {
    content: icon(invisible);
}

glossSymbol[align=right] {
    text-align: right;
    margin-left: auto;
}

glossSymbol[align=center] {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

glossSymbol:before {
    display: block;
    content: gadget("com.xmlmind.xmleditext.dita.Image");
    margin-top: 0.5em;     
    margin-bottom: 0;
}

glossSymbol > alt,
glossSymbol > longdescref {
    display: block;
    margin-top: 0.5em;
}


/* ================================================= glossary.imp */

/* taskreq-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.
 *
 * Machinery task elements. 
 */

/* taskreq-d -------------------------------------------------------------- */

prelreqs,
closereqs,
reqcond,
reqcontp,
personnel,
perscat,
perskill, 
esttime {
    display: block;
    margin-left: 10ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

prelreqs,
closereqs {
    margin-left: 16ex;
}

prelreqs:before,
closereqs:before,
reqcond:before,
reqcontp:before,
personnel:before,
perscat:before,
perskill:before, 
esttime:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

reqconds,
reqpers,
supequip,
supplies,
spares,
safety {
    display: block;
    margin-left: 4ex;
    margin-top: 1em;
    margin-bottom: 1em;
}

reqconds:before,
reqpers:before,
supequip:before,
supplies:before,
spares:before,
safety:before {
    display: block;
    content: element-name();
    font-size: smaller;
    font-weight: bold;
    color: #404040;
    margin-top: 1.09em;
    margin-bottom: 1.09em;
}

supeqli,
supplyli,
sparesli {
    display: block;
    margin-left: 0;
    margin-top: 1em;
    margin-bottom: 1em;
}

supequi,
supply,
spare,
safecond {
    display: list-item;
    margin-top: 1em;
    margin-bottom: 1em;
}

safecond {
    list-style-type: decimal;
}

noconds,
nosupeq,
nosupply,
nospares,
nosafety {
    display: block;
    content: icon(left-half-disc) element-name() icon(right-half-disc);
    font-size: smaller;
    font-weight: bold;
    color: #404040;
    border-style: none;
    background-color: transparent;
    margin: 1.09em 0;
}

noconds:before,
nosupeq:before,
nosupply:before,
nospares:before,
nosafety:before {
    content: "";
}


/* ================================================= taskreq-d.imp */

