/*
   $Id$
   wings core CSS Style Sheet for gecko Browser (Mozilla, FireFox).

   >> This file contains CORE CSS declarations needed for correct operation.  <<
   >> Porting changes in this file to other browsers is REQUIRED              <<

   Includes CSS definitions that are required for wings to work correctly.
   - Please use gecko-optional.css for purely optional visual stylings
   - Please avoid generic/global css selectors and use the wings css
     classes in your selection path
*/

/* either use this or cellpadding/cellspacing/border in table element.
   css overwrites all attributes! */

/* Class for all invisible HTML tables used for layouting purposes. */
table.SLayout,
td.SLayout {
    border-collapse: collapse;
    padding: 0px;
    margin: 0px;
    border: none;
}


/* tables inherit certain properties from their parents. These need to be
   defined here. This works with konq, moz, opera. */
table tr {
    text-align:inherit;
    vertical-align:inherit;
/*    these already work without specifying them
    background-color:inherit;
    font-family:inherit;
    font-size:inherit;
    font-style:inherit;
    font-weight:inherit;
    color:inherit;*/
}

/* this stays in here! 
   it switches the gecko-compatible browsers into border-box mode */
div {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* links and buttons as tables? */
 A, BUTTON {
    display: table;
}

/* SFlowLayout can't flow if the immediate inner children has defined 100% width.
   Some wingS component inheritly define 100% width i.e. like SForm.
   We overwrite their width in this case to 1%. This leads to many rules, but is easily implementable. */
div.SFlowLayout > div > div.SForm_Box  > div.SForm
{
    width: 1%;
} 

/* TODO -- move this to renderer? */
IMG {
    /* keeps images inside tabs */
    vertical-align: middle;
    /* Avoid those ugly borders around linked imgs's */
    border: none !important;
}

div.SLabel_Box {
    display: table;
}

div.SLabel,
div.SCheckBox {
    white-space: pre;
}

pre.label {
    font-family: inherit;
    margin: 0px;
    padding: 0px;
}

div.SButton_Box {
    display: table;
}

div.SButton {
    color: #004;
}

/* selected state */
div.SButton > button.SButton_selected,
div.SToggleButton > button.SToggleButton_selected
{
    border-style: inset;
}

div.SRadioButton_Box {
    display: table;
}

div.STextField {
    font-family: sans-serif;
    font-weight: normal;
    font-style: normal;
    color: #000;
}

div.SFormattedTextField {
    font-family: sans-serif;
    font-weight: normal;
    font-style: normal;
    color: #000;
}

div.STree {
    vertical-align: top;
    text-align: left;
}

ul.STree{
    list-style: none;
    margin-left:0px;
    padding-left:0px;
}

ul.STree > li {
    padding-left: 0px;
    margin-left: 0px;
}

ul.STree > li * {
    white-space: nowrap;
    padding-right: 2px;
}

ul.STree > li[selected="true"] > table > tbody > tr > td > a > div,
ul.STree > li[selected="true"] > table > tbody > tr > td > button > div
 {
    background-color: #f6decc;
    border: 1px dotted black;
}

ul.STree > li button {
    border: none;
    background-color: inherit;
    padding: 0px;
    text-decoration: none;
    font-family: sans-serif;
    font-weight: normal;
    font-style: normal;
    color: #000000;
}

ul.STree > li > div.SSubTree {
    background-image: url('0');
    background-repeat:repeat-y;
    background-position: 0px 100px;
}

div.STable > table {
    width: 100%;
    border: 1px solid black;
    border-collapse: collapse;
}


div.STable > table > thead > tr > th {
    border: 1px solid black;
    padding-left: 8px;
    padding-right: 8px;
}

div.STable > table > tbody > tr > td {
    cursor: pointer;
    padding-left: 8px;
    padding-right: 8px;
    border-left: 1px solid black;
}

/* let the link span the whole table */
div.STable > table > tbody > tr > td > a {
    display: block;
    width: 100%;
}

div.STable > table > tbody > tr > td[col="numbering"] {
    text-align: right;
}

div.STable > table > tbody > tr > td button {
    border: none;
    background-color: inherit;
    padding: 0px;
}

div.SCheckBox > button {
    border: none;
    background-color: inherit;
    padding: 0px
}

div.SList > * > li.SList_selected {
    background-color: #f6decc !important;
    border: 1px dotted black;
    cursor: pointer
}

.SAnchor {
    color: #000044;
}

.SSeparator {
    color: #CCCCCC;
    height: 0px;
    white-space: nowrap;
    margin: 0px;
    padding: 0px;
    border-style: inset;
    border-width: 1px;
}

.STextArea {
    width: 100%;
}

div.SScrollBar_Box {
    height: 100%;
    width: 100%;
}

div.SScrollBar, div.SPageScroller {
    height: 100%;
    width: 100%;
}

div.SScrollBar table[area="buttons"], div.SPageScroller table[area="buttons"] {
    background-color: #eeeeff;
}

div.SScrollBar > table[orientation="vertical"], div.SPageScroller > table[orientation="vertical"] {
    /* height: 100%;  do we really want it this way? looks funny imho (ol) */
}

div.SScrollBar > table[orientation="horizontal"], div.SPageScroller > table[orientation="horizontal"] {
    /* width: 100%;  do we really want it this way? looks funny imho (ol) */
    height: auto;
}

div.SScrollBar table[area="buttons"] button, div.SScrollBar table[area="buttons"] a {
    border: 1px solid #cccccc;
}

div.SScrollBar table[area="buttons"] button:hover, div.SScrollBar table[area="buttons"] a:hover {
    border: 1px outset #cccccc;
}

div.SPageScroller table[area="buttons"] button, div.SPageScroller table[area="buttons"] a {
    border: 1px solid #cccccc;
}

div.SPageScroller table[area="buttons"] button:hover, div.SPageScroller table[area="buttons"] a:hover {
    border: 1px outset #cccccc;
}

div.SPageScroller table[area="pages"] button, div.SPageScroller table[area="pages"] a {
    border: 1px solid transparent;
}

div.SPageScroller table[area="pages"] button:hover, div.SPageScroller table[area="pages"] a:hover {
    border: 1px outset #cccccc;
}

div.SPageScroller table[area="pages"] button:hover[disabled="disabled"], div.SPageScroller table[area="pages"] a.disabled:hover {
    border: 1px solid transparent;
}


div.SScrollPane > div.SList_Box, div.SScrollPane > div.STree_Box, div.SScrollPane > div.STable_Box {
    width: 100%;
    height: 100%;
    overflow: scroll;
}

div.STabbedPane, div.STabbedPane > table {
    width: 100%;
    height: 100%;
}

div.STabbedPane > table > tbody > tr > th > * {
    display: inline;
    border: 1px solid black;
    white-space: nowrap;
    line-height: 1.6em;
}

div.STabbedPane > table > tbody > tr > th > *[selected="true"] {
    background-color: #f6decc;
}

div.STabbedPane > table > tbody > tr > th > *[disabled="true"] {
    color : #808080;
}

div.STabbedPane > table > tbody > tr > td {
    border: 2px ridge black;
    width: 100%;
    height: 100%;
}

div.STabbedPane > table > tbody > tr > th[placement="top"] {
    text-align: left;
}

div.STabbedPane > table > tbody > tr > th[placement="top"] > a,
div.STabbedPane > table > tbody > tr > th[placement="top"] > button {
    border-bottom: none !important;
    -moz-border-radius-topright: 4px;
    -moz-border-radius-topleft: 4px;
}

div.STabbedPane > table > tbody > tr > th[placement="left"] {
    vertical-align: top;
    text-align: right;
}

div.STabbedPane > table > tbody > tr > th[placement="left"] > a,
div.STabbedPane > table > tbody > tr > th[placement="left"] > button {
    display: block;
    border-right: none !important;
    margin-top: 2px;
    margin-bottom: 2px;
    -moz-border-radius-topleft: 4px;
    -moz-border-radius-bottomleft: 4px;
}

div.STabbedPane > table > tbody > tr > th[placement="right"] {
    vertical-align: top;
    text-align: left;
}

div.STabbedPane > table > tbody > tr > th[placement="right"] > a,
div.STabbedPane > table > tbody > tr > th[placement="right"] > button {
    display: block;
    border-left: none !important;
    margin-top: 2px;
    margin-bottom: 2px;
    -moz-border-radius-topright: 4px;
    -moz-border-radius-bottomright: 4px;
}

div.STabbedPane > table > tbody > tr > th[placement="bottom"] {
    text-align: left;
}

div.STabbedPane > table > tbody > tr > th[placement="bottom"] > a,
div.STabbedPane > table > tbody > tr > th[placement="bottom"] > button {
    border-top: none !important;
    -moz-border-radius-bottomright: 4px;
    -moz-border-radius-bottomleft: 4px;
}

div.SPanel, div.SContainer {
    width: 100%;
    height: 100%;
}


/* the layouts should all expand to 100% width & height of the surrounding SPanel */
table.SBorderLayout,
table.SGridBagLayout
/*
table.SBoxLayout,
table.SGridLayout,
table.SFlowLayout
*/ {
    width: 100%;
    height: 100%;
}

.STitledBorderLegend {
    position: relative;
    top:-1.7em;
    margin-bottom:-1em;
    margin-left: 1.0em;
    padding-left: 0.4em;
    padding-right: 0.4em;
    background-color: inherit;
}

.STitledBorder {
    margin-top: 1em;
}


/* ---------- DOM ToolTips */
div.domTT {
    border: 1px solid #333333;
    -moz-opacity: 0.8;
}
div.domTTCaption {
    font-family: serif;
    font-size: 12px;
    font-weight: bold;
    padding: 1px 2px;
    color: #FFFFFF;
    background-color: #333333;
}
div.domTTContent {
    font-size: 12px;
    font-family: sans-serif;
    padding: 3px 2px;
    background-color: #F1F1FF;
}

/* ---------- Menus */
div.SMenuBar{
    width:100%;
    background-color: #eef;
    border-bottom: 1px solid #ccc;
    color: #000044;
}

/* clears the menu */
div.SMenuBar div.spacer {
    height:0px;
    clear: both;
}

div.SMenuBar div.SMenu,
div.SMenuBar div.SMenu_Disabled {
    float:left;
    clear:right;
    border-style: solid;
    border-width: 1px;
    border-color: #eee #999 #999 #eee;
    padding:1px 3px 1px 3px;
    background:#eef;
    white-space:nowrap;
    margin:0;
}

div.SMenuBar div.SMenu{
    color: #004;
}

div.SMenuBar div.SMenu_Disabled {
    color: #666;
}

div.SMenu A,
div.SPopupMenu A {
    padding:1px 3px 1px 3px;
    display:block;
    white-space:nowrap;
    margin:0;
}
 
div.SMenu a, .SMenu a:visited,
div.SPopupMenu a, .SPopupMenu a:visited {
    color:#000;
}

div.SMenu a:hover,
div.SPopupMenu a:hover {
    color:#fff;
    background:#66b;
}

div.SMenu a:active,
div.SPopupMenu a:active{
    color:#aaa;
    background:#66b;
}

div.SMenu .SMenu_Disabled a,
div.SMenu .SMenuItem_Disabled a,
div.SPopupMenu .SMenu_Disabled a,
div.SPopupMenu .SMenuItem_Disabled a {
    color:#666;
}

div.SMenu .SMenu_Disabled a:hover,
div.SMenu .SMenuItem_Disabled a:hover,
div.SPopupMenu .SMenu_Disabled a:hover,
div.SPopupMenu .SMenuItem_Disabled a:hover{
    background:#eee;
}

div.SMenu li,
div.SPopupMenu li {
    position:relative;
    background: #eee;
    border-left: 1px solid #eee;
    border-right: 1px solid #999;
    width:auto;
}

div.SMenu ul,
div.SPopupMenu ul{
    list-style:none;
    margin:0px;
    padding:0px;
    position:absolute;
    z-index:500;
    top:auto;
    display:none;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #999;
    width:auto;
}

div.SMenu ul ul,
    div.SPopupMenu ul ul{
    top:-1px;
    left:100%;
}

div.SMenu a span.accelerator {
	font-size: .7em;
	margin-left: 1.5em;
}

/* Begin non-anchor hover selectors */

/* Enter the more specific element (div) selector
on non-anchor hovers for IE5.x to comply with the
older version of csshover.htc - V1.21.041022. It
improves IE's performance speed to use the older
file and this method */

div.SMenu li:hover,
div.SMenuBar div.SMenu:hover,
div.SPopupMenu li:hover{
cursor:pointer;
}

div.SMenu li:hover ul ul,
div.SMenu li li:hover ul ul,
div.SMenu li li li:hover ul ul,
div.SMenu li li li li:hover ul ul,
div.SPopupMenu li:hover ul ul,
div.SPopupMenu li li:hover ul ul,
div.SPopupMenu li li li:hover ul ul,
div.SPopupMenu li li li li:hover ul ul
{display:none;}

div.SMenu li:hover ul,
div.SMenu li li:hover ul,
div.SMenu li li li:hover ul,
div.SMenu li li li li:hover ul,
div.SPopupMenu li:hover ul,
div.SPopupMenu li li:hover ul,
div.SPopupMenu li li li:hover ul,
div.SPopupMenu li li li li:hover ul
{display:block;}

/* End of non-anchor hover selectors */

/* Styling for Expand */

div.SMenu a.x, div.SMenu a.x:visited,
div.SMenu a.y, div.SMenu a.y:visited, div.SMenu a.y:hover,
div.SPopupMenu a.x, div.SPopupMenu a.x:visited,
div.SPopupMenu a.y, div.SPopupMenu a.y:visited, div.SPopupMenu a.y:hover{
    background:#eee url('0') no-repeat center right;
    padding-right:10px;
}

div.SMenu a.x:hover,
div.SPopupMenu a.x:hover{
    background:#66b url('0') no-repeat center right;
    padding-right:10px;
}

div.SInternalFrame {
    border: 1px solid #ccc;
    margin: .2em;
    float:left;
/*    clear:right;*/
    display:table;
}

div.SInternalFrame > div.WindowBar {
    padding:.2em;
    background-color: #aaf;
}

div.SInternalFrame > div.WindowBar > div.WindowBar_title {
    padding-right:4em;
    white-space:pre;
}

div.SInternalFrame > div.WindowBar  a.WindowButton,
div.SInternalFrame > div.WindowBar  button.WindowButton {
    float: right;
}

div.SInternalFrame > div.WindowBar > a.DeiconifyButton {
    display: inline;
}

div.SInternalFrame > div.WindowContent {
    padding: .2em;
}

/* clears the windows */
div.SDesktopPane div.spacer,
.SFlowLayout div.spacer {
    height:0px;
    clear: both;
    line-height:0px; /* for konq */
    font-size: 1px; /* for konq */
}

/* ----------- SOPTIONPANE / SDIALOG */

/*  Note: SOptionPane extends SDialog. */
div.SDialog_Box,
div.SOptionPane_Box {
    display: table;
}
div.SDialog,
div.SOptionPane {
    border: 1px solid #cccccc;
}
div.SOptionPane {
    display: table-cell;
}
