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

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

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

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

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 #C0C080;
    padding: 0.5ex;
    border-radius: 1ex;
    margin-left: 20px;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex; 
}

topicmeta:before,
prolog:before {
    display: marker;
    content: collapser(collapsed-icon, icon(pop-right), 
                       expanded-icon, icon(pop-down));
    color: #808000;
}

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: 1.33ex;
    margin-bottom: 1.33ex; 
}

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),
                               " modification=", attr(modification),
                               " release=", attr(release)));
}

/*nothing before vrmlist*/
vrmlist {
    display: block;
    margin: 1.33ex 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("id=", attr(id),
                               " appname=", attr(appname)));
}

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

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

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) 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) attr(keyref);
    font-size: smaller;
    font-family: monospace;
    color: #404040;
}


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

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

/*
 * Divisions
 */

example,
section {
    display: block;
    margin: 1.33ex 0;
}

title {
    display: block;
    font-family: serif;
    font-weight: bold;
    margin: 1.33ex 0;
}

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

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

sectiondiv {
    display: block;
    margin: 1.33ex 0;
}

/*
 * Simple lists
 */

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

sli {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

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

/*
 * Ordered and unordered lists
 */

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

ul { 
    list-style-type: disc;
}

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

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

ol { 
    list-style-type: decimal;
}

li {
    display: list-item;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

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: 1.33ex;
    margin-bottom: 1.33ex;
}

dlhead,
dlentry {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

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) attr(keyref);
    display: inline;
    font-size: smaller;
    font-weight: normal;
    color: #404040;
}

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

dl:contains-element(dlhead) {
    display: table;
    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
 */

fig {
    display: block;
    margin: 1.33ex 0;
}

figgroup {
    display: block;
    margin: 1.33ex 0;
}

desc {
    display: inline;
}

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

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

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

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.33ex;
    margin-bottom: 0.5ex;
}

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

/*
 * Image
 */

image {
    display: inline;
}

fig > image,
imagemap > image,
image[placement=break] {
    display: block;
    margin-top: 0;
    margin-bottom: 1.33ex;
}

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

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

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

fig > image:before,
imagemap > image:before,
image[placement=break]:before {
    display: block;
    margin-top: 1.33ex;     
    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;
}

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

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

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

longdescref[keyref] {
    content: icon(external-link-small) attr(keyref);
}

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

object > longdescref {
    display: block;
    margin: 1.33ex 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;
}

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

/*
 * Block elements
 */

p {
    display: block;
    margin: 1.33ex 0;
}

lines {
    display: block;
    white-space: pre;
    margin: 1.33ex 0;
}

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

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

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;
    line-height: 1.2;
    margin: 1.33ex 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) text(attr(href), font-family, monospace);
}

lq[keyref]:after {
    content: icon(external-link-small) 
             text(attr(keyref), font-family, monospace);
}

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

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

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

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

longquoteref[keyref] {
    content: icon(external-link-small) attr(keyref);
}

/*
 * 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) attr(keyref);
    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);
    text-decoration: none;
    font-family: monospace;
    font-size: smaller;
    color: #404040;
}

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

xref[keyref]:after {
    content: icon(external-link-small) attr(keyref);
}

/*
 * Miscellaneous
 */

abbreviated-form {
    display: inline;
    content: icon(external-link-small) attr(keyref);
    font-style: italic;
    color: #404040;
}

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

draft-comment {
    display: block;
    color: red;
    margin: 1.33ex 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.33ex;
    margin-bottom: 1.33ex;
}

fn:before {
    display: marker;
    content: xpath("concat(index-of-node(//fn,.),'.')");
    font-size: smaller;
    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: 1.33ex 0;
}

/*
 * Visual attributes
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

*[frame=none],
table[frame] {
    border-width: 0;
    padding: 0;
}

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

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

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

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

/*
 * conref
 */

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

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

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

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

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

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

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

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

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


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

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

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

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

simpletable {
    display: table; 
    border: 1 outset gray;
    margin: 1.33ex 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; 
}

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

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

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

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

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

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

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

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


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

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

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);
    color: gray;
}

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

indextermref:after {
    display: inline;
    content: icon(right-half-disc, gray) icon(external-link-small) attr(keyref);
    color: #404040;
}

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

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

/*
 * 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) 2006-2013 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Specialization elements. 
 */

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

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: block;
    content: "<" xpath("if(./*, name(./*[1]), '???')") ">";
    font-weight: bold;
    color: gray;
    margin: 1.33ex 0;
}

itemgroup {
    display: block;
    margin: 1.33ex 0;
}

/*
 * data, data-about
 */

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

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

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

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

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

hazardstatement {
    display: block;
    background-color: #F0FFF0;
    border: 1px solid #C0DDC0;
    padding: 1ex;
    margin: 1.33ex 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;
}

hazardstatement:before {
    content: url(icons/other.png);
}

hazardstatement[type]:before {
    content: concatenate("url(icons/", attr(type), ".png)") " " attr(type);
}

hazardstatement[type=other][othertype]:before {
    content: attr(othertype);
}

messagepanel {
    display: block;
    margin: 1.33ex 0; 
}

messagepanel:first-child {
    margin-top: 3.66ex; 
}

typeofhazard,
consequence,
howtoavoid {
    display: block;
    margin-top: 1.33ex;     
    margin-bottom: 1.33ex;     
    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: 1.33ex;
}

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: 1.33ex;     
    margin-bottom: 0;
}

hazardsymbol > alt,
hazardsymbol > longdescref {
    display: block;
    margin-top: 0.5ex;
}


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

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

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

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

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

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

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

imagemap {
    display: block;
    margin: 1.33ex 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 {
    display: inline;
}

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

shape:after,
coords:after {
    display: inline;
    content: " ";
}


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

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

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

codeblock,
codeph {
    font-family: monospace;
}

codeph {
    display: inline;
}

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

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

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

coderef[keyref]:after {
    content: icon(external-link-small) attr(keyref);
}

codeblock {
    display: block;
    white-space: pre;
    background-color: #F0F0F0; 
    border: 1px solid #C0C0C0;
    padding: 0.5ex;
    margin: 1.33ex 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: 1.33ex;
    margin-bottom: 1.33ex;
}

plentry {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

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

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

/*
 * Syntax diagram elements
 */

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

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) 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) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Software elements. 
 */

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

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: 1.33ex 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) 2006-2010 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * User interface elements. 
 */

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

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: #E0E0FF; 
    border: 1px solid #C0C0FF; 
    padding: 0.5ex; 
    margin: 1.33ex 0;
}


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

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

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

navtitle,
linktext,
searchtitle,
shortdesc {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

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


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

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

exportanchors,
exportanchors > anchorid,
exportanchors > anchorkey {
    display: block;
    margin-left: 16ex;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

exportanchors:before,
exportanchors > anchorid:before,
exportanchors > anchorkey:before {
    display: marker;
    content: element-name();
    marker-offset: fill;
    font-size: smaller;
    font-weight: bold;
    color: #404040;
}

exportanchors > anchorid,
exportanchors > anchorkey {
    font-weight: normal;
    color: #404040;
}

exportanchors > anchorid {
    content: "id=" attr(id);
}

exportanchors > anchorkey {
    content: "keyref=" attr(keyref);
}

exportanchors > anchorid:after,
exportanchors > anchorkey:after {
    content: "";
}


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

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

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

anchorref,
keydef,
mapref,
topicset,
topicsetref,
topicgroup,
topichead {
    display: block;
}

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

glossref {
    display: block;
}

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

map {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* first line */
}

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

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

map:before {
    property-group: map-content();
}

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

map > title {
    property-group: map-title();
}

topicmeta {
    margin-left: 6.5ex; /*4ex+20px*/
    margin-top: 0.5ex;
    margin-bottom: 0.5ex; 
}

map > topicmeta,
relcolspec > topicmeta,
relcell > topicmeta {
    margin-left: 20px;
}

/*
 * Map content
 */

navref,
anchor,
anchorref,
keydef,
mapref,
topicset,
topicsetref,
glossref,
topicgroup,
topichead,
topicref {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1; /* first line */
    margin-left: 4ex;
    margin-top: 0.5ex;
    margin-bottom: 0.5ex;
}

map > navref,
map > anchor,
map > anchorref,
map > keydef,
map > mapref,
map > topicset,
map > topicsetref,
map > glossref,
map > topicgroup,
map > topichead,
map > topicref,
relcolspec > anchorref,
relcolspec > keydef,
relcolspec > mapref,
relcolspec > topicset,
relcolspec > topicsetref,
relcolspec > glossref,
relcolspec > topicgroup,
relcolspec > topichead,
relcolspec > topicref,
relcell > anchorref,
relcell > keydef,
relcell > mapref,
relcell > topicset,
relcell > topicsetref,
relcell > glossref,
relcell > topicgroup,
relcell > topichead,
relcell > topicref {
    margin-left: 0;
}

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

anchor:before {
    display: inline;
    content: paragraph(content(element-name(), " ", 
                               icon(left-target), " ", attr(id)));
    color: #800000;
}

/*
 * topicref
 */

anchorref:before,
keydef:before,
mapref:before,
topicset:before,
topicsetref:before,
glossref:before,
topicgroup:before,
topichead:before,
topicref:before {
    display: inline;
    content: invoke("topicrefContent", normal);
}

topicref:before {
    color: #000080;
}

topichead:before {
    color: #800080;
}

topicgroup:before {
    color: #008080;
}

topicref[processing-role=resource-only]:before,
keydef:before {
    color: #606060;
}

topicref[format=ditamap]:before,
mapref:before {
    color: #204080;
}

anchorref:before {
    color: #804020;
}

topicset {
    padding: 0.5ex;
    border: 1px dashed #208040;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex; 
}

topicset:before {
    color: #208040;
}

topicsetref:before {
    color: #106020;
}

glossref:before {
    color: #402040;
}

/*
 * reltable
 */

reltable {
    display: table;
    border: 1 solid #D0E0F0;
    margin: 1.33ex 0;
}

reltable title {
    color: #406080;
}

reltable > title {
    display: table-caption;
}

reltable > topicmeta {
    display: table-caption;
    /* A table-caption cannot be made collapsible. */
    collapsible: no;
    margin-left: 0;
}

reltable > topicmeta:before {
    content: "";
}

relheader,
relrow {
    display: table-row;
}

relcolspec,
relcell {
    display: table-cell;
    border: 1 solid #D0E0F0;
    padding: 2px;
}

relcolspec {
    background-color: #D0E0F0;
}

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

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


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

