.word-count .icon {position:relative}
.word-count.mode-word .icon:after {content:"Words";position:absolute;top:130%;right:0%;}
.word-count.mode-char .icon:after {content:"Characters";position:absolute;top:130%;right:0%;}

/* emulate quirks mode for enhanced tables (ripped from FX quirks.css) */
#content table[data-enhanced]{
    table-layout: auto;
    border-collapse: separate;
   /* empty-cells: hide;*/
    text-align: start;
    white-space: normal; /* compatible with IE & spec */
	line-height: normal; 
	/* Quirk: cut off all font inheritance in tables except for family. */
	font-size: initial;
	font-weight: initial;
	font-style: initial;
	font-variant: initial;
    /*border: gray 1px solid;*/
    box-sizing:border-box;
}
#content table[data-enhanced] td {
    box-sizing: border-box;
    /*border: gray 1px solid;    */
}
#content table[data-enhanced] td br:last-child {display:none;}
#content table[data-enhanced]:not[bordercolor],#content table[data-enhanced]:not[bordercolor] td{
    border-color:gray;
}
#content table[data-enhanced]:not([border]),#content table[data-enhanced]:not([border]) td{
    border: 1px solid;
}
#content table[data-enhanced][border="0"],table[data-enhanced][border=""]
{
    border-style: none;
}
#content table[data-enhanced][border="0"] td:not([style*="border"]),
#content table[data-enhanced][border=""] td:not([style*="border"])
{
    border-style:none;
}

/* V5/HTML5 explicitly sets table borders using CSS thus rendering the border attribute useless! */
#content table[data-enhanced][border="1"],table[data-enhanced][border="1"] td
{
    border: 1px solid;
}
#content table[data-enhanced][border="2"],table[data-enhanced][border="2"] td
{
    border: 2px solid;
}
#content table[data-enhanced][border="3"],table[data-enhanced][border="3"] td
{
    border: 3px solid;
}
#content table[data-enhanced][border="4"],table[data-enhanced][border="4"] td
{
    border: 4px solid;
}
#content table[data-enhanced][border="5"],table[data-enhanced][border="5"] td
{
    border: 5px solid;
}
#content table[data-enhanced][border="6"],table[data-enhanced][border="6"] td
{
    border: 6px solid;
}
#content table[data-enhanced][border="7"],table[data-enhanced][border="7"] td
{
    border: 7px solid;
}
#content table[data-enhanced][border="8"],table[data-enhanced][border="8"] td
{
    border: 8px solid;
}
#content table[data-enhanced][border="9"],table[data-enhanced][border="9"] td
{
    border: 9px solid;
}


/*V5 explicitly sets table spacing to "inherit" so setup a few overrides */
#content table[data-enhanced][cellspacing="0"]{
    border-spacing: 0px;
}
#content table[data-enhanced][cellspacing="1"]{
    border-spacing: 1px;
}
#content table[data-enhanced][cellspacing="2"]{
    border-spacing: 2px;
}
#content table[data-enhanced][cellspacing="3"]{
    border-spacing: 3px;
}
#content table[data-enhanced][cellspacing="4"]{
    border-spacing: 4px;
}
#content table[data-enhanced][cellspacing="5"]{
    border-spacing: 5px;
}
#content table[data-enhanced][cellspacing="6"]{
    border-spacing: 6px;
}
#content table[data-enhanced][cellspacing="7"]{
    border-spacing: 7px;
}
#content table[data-enhanced][cellspacing="8"]{
    border-spacing: 8px;
}
#content table[data-enhanced][cellspacing="9"]{
    border-spacing: 9px;
}

/*V5 explicitly sets table padding to "3px" so setup a few overrides */
#content table[data-enhanced][cellpadding="0"] td{
    padding: 0px;
}
#content table[data-enhanced][cellpadding="1"] td{
    padding: 1px;
}
#content table[data-enhanced][cellpadding="2"] td{
    padding: 2px;
}
#content table[data-enhanced][cellpadding="3"] td{
    padding: 3px;
}
#content table[data-enhanced][cellpadding="4"] td{
    padding: 4px;
}
#content table[data-enhanced][cellpadding="5"] td{
    padding: 5px;
}
#content table[data-enhanced][cellpadding="6"] td{
    padding: 6px;
}
#content table[data-enhanced][cellpadding="7"] td{
    padding: 7px;
}
#content table[data-enhanced][cellpadding="8"] td{
    padding: 8px;
}
#content table[data-enhanced][cellpadding="9"] td{
    padding: 9px;
}


/* Quirk: collapse top and bottom margin of TD */
table[data-enhanced] td > p:first-child,table[data-enhanced] td > blockquote:first-child,
table[data-enhanced] td > pre:first-child,table[data-enhanced] td > ul:first-child{
    margin-top: 0;
}
table[data-enhanced] td > p:last-child,table[data-enhanced] td > blockquote:last-child,
table[data-enhanced] td > pre:last-child,table[data-enhanced] td > ul:last-child{
    margin-bottom: 0;
}

/* Quirk: support the ways of making PRE have wrapping */ 
#content table[data-enhanced] pre[wrap], table[data-enhanced] pre[cols], table[data-enhanced] pre[width] {
	white-space: pre-wrap;
}

/* Quirk: Make floated images have a margin  (b=58899) */
#content table[data-enhanced] img[align=left] {
	margin-right: 3px;
}
 
#content table[data-enhanced] img[align=right] {
	margin-left: 3px;
}


/* THE FOLLOWING RULES AFFECT NOT JUST ENHANCED TABLES (CAREFUL) */
#content .message img, #content.wysiwyg img {
 	vertical-align:bottom;   
}