
/*** TAB: TOP <tab> ***/

tab { 
  -moz-binding		: url(chrome://global/skin/globalBindings.xml#tab);
  margin			: 0px;
  padding			: 0px;
  font        : menu;
  color				: #1C1D1F;
}

.tab-image-left-top {
  background		: url(chrome://global/skin/tab-unselect-left.gif) no-repeat;
  width				: 11px;
  height			: 19px;
}

.tab-image-left-mid {
  border-left: 1px solid #333D4B;
  background-color: #9BA8AA;
}

.tab-image-left-btm {
  border-top: 1px solid #333D4B;
  border-bottom: 1px solid #D7E2E3;
}

.tab-image-mid {
  background		: url(chrome://global/skin/tab-unselect-middle.gif) repeat-x top;
  background-color: #9BA8AA;
}

.tab-image-mid-btm {
  border-top: 1px solid #333D4B;
  border-bottom: 1px solid #D7E2E3;
}

.tab-image-right-top {
  background		: url(chrome://global/skin/tab-unselect-right.gif) no-repeat;
  width				: 11px;
  height			: 19px;
}

.tab-image-right-mid {
  background: url(chrome://global/skin/tab-unselect-right-mid.gif) repeat-y;
}

.tab-image-right-btm {
  min-height: 2px;
  border-top: 1px solid #333D4B;
  border-bottom: 1px solid #D7E2E3;
}

.tab-text {
  padding			: 3px 0px 3px 0px;
}

tab:hover:active {
  color				: #FEFEFE;
}

tab:hover:active > box > box > .tab-image-left-top { 
  background-image: url(chrome://global/skin/tab-clicked-left.gif);
}

tab:hover:active > box > box > .tab-image-left-mid { 
  background-image: url(chrome://global/skin/tab-clicked-left-mid.gif);
}

tab:hover:active > box > .tab-image-mid { 
  background-image: url(chrome://global/skin/tab-clicked-middle.gif);
  background-color: #7A878C;
}

tab:hover:active > box > box > .tab-image-right-top { 
  background-image: url(chrome://global/skin/tab-clicked-right.gif);
}

tab:hover:active > box > box > .tab-image-right-mid { 
  background-image: url(chrome://global/skin/tab-clicked-right-mid.gif);
}

/* when a tab is selected this is how it should look */
tab[selected="true"], tab:hover:active[selected="true"],
tab[selected="1"], tab:hover:active[selected="1"] {
	color			: #1C1D1F;
}

.tab-image-left-top[selected="true"],
tab:hover:active[selected="true"] > box > box > .tab-image-left-top { 
  background-image: url(chrome://global/skin/tab-select-left.gif);
}

.tab-image-left-mid[selected="true"],
tab:hover:active[selected="true"] > box > box > .tab-image-left-mid { 
  background-image: none;
  background-color: #C3D1D1;
}

.tab-image-left-btm[selected="true"],
tab:hover:active[selected="true"] > box > box > .tab-image-left-btm { 
  background: url(chrome://global/skin/tab-select-left-btm.gif);
  border: none;
  height: 2px;
}

.tab-image-mid[selected="true"],
tab:hover:active[selected="true"] > box > .tab-image-mid { 
  background-image: url(chrome://global/skin/tab-select-middle.gif);
  background-color: #C3D1D1;
}

.tab-image-mid-btm[selected="true"],
tab:hover:active[selected="true"] > box > box > .tab-image-mid-btm { 
  border-top: 1px solid #919FA3;
  border-bottom: 1px solid #F4F7F9;
}

.tab-image-right-top[selected="true"],
tab:hover:active[selected="true"] > box > box > .tab-image-right-top { 
  background-image: url(chrome://global/skin/tab-select-right.gif);
}

.tab-image-right-mid[selected="true"],
tab:hover:active[selected="true"] > box > box > .tab-image-right-mid { 
  background-image: url(chrome://global/skin/tab-select-right-mid.gif);
}

.tab-image-right-btm[selected="true"],
tab:hover:active[selected="true"] > box >box >  .tab-image-right-btm { 
  background: url(chrome://global/skin/tab-select-right-btm.gif);
  border: none;
  height: 2px;
}

.tab-border-top-left, 
.tab-border-top-right {
  background		: url(chrome://global/skin/tab-top-border.gif) repeat-x bottom;
  height			: 2px;
}

.tab-border-top-left-cap {
  background		: url(chrome://global/skin/tab-top-border-leftcap.gif) no-repeat bottom;
  width				: 2px;
  height			: 2px;
}

.tab-border-top-right-cap {
  background		: url(chrome://global/skin/tab-top-border-rightcap.gif) no-repeat bottom;
  width				: 2px;
  height			: 2px;
}

tabbox {
  -moz-binding		: url(chrome://global/skin/globalBindings.xml#tabbox);
  padding			: 0px;
}

    /* top tabs */
tabcontrol[align="vertical"] > tabbox[align="horizontal"] > tab { 
  padding: 0px; 
  margin: 0px;
}

/*** TAB: BOTTOM <tab class="tab-bottom"> ***/
/* Found in editor.xul & editorOverlay.xul 
 * SMALL TABS FOR NOW */

.tab-bottom {
  min-height: 21px;
}
 
.tab-bottom > .tab-top > .tab-image-left > .tab-image-left-top {
  border-top: 1px solid #919FA3;
  border-bottom: 1px solid #333D4B;
  height: 0px;
  background: none;
}

.tab-bottom > .tab-top > .tab-image-left > .tab-image-left-middle {
  border-left: 1px solid #333D4B;
  background-color: #9BA8AA;
}

.tab-bottom > .tab-top > .tab-image-left > .tab-image-left-btm {
  border: none;
  background	: url(chrome://global/skin/tab-bot-unselect-left.gif) no-repeat;
  width				: 11px;
  height			: 19px;
}

.tab-bottom > .tab-top > .tab-image-mid > .tab-image-mid-top {
  border-top: 1px solid #919FA3;
  border-bottom: 1px solid #333D4B;
}

.tab-bottom > .tab-top > .tab-image-mid > .tab-image-mid-mid {
  background: url(chrome://global/skin/tab-bot-unselect-middle.gif) repeat-x bottom;
  background-color: #9BA8AA;
}

.tab-bottom > .tab-top > .tab-image-mid > .tab-image-mid-btm {
  border: none;
}

.tab-bottom > .tab-top > .tab-image-right > .tab-image-right-top {
  border-top: 1px solid #919FA3;
  border-bottom: 1px solid #333D4B;
  height: 0px;
  background: none;
}

.tab-bottom > .tab-top > .tab-image-right > .tab-image-right-mid {
  background: url(chrome://global/skin/tab-unselect-right-mid.gif) repeat-y;
}

.tab-bottom > .tab-top > .tab-image-right > .tab-image-right-btm {
  border: none;
  background		: url(chrome://global/skin/tab-bot-unselect-right.gif) no-repeat;
  width				: 11px;
  height			: 19px;
}

/* active state */

.tab-bottom:hover:active > .tab-top > .tab-image-left > .tab-image-left-btm { 
  background-image: url(chrome://global/skin/tab-bot-clicked-left.gif);
}

.tab-bottom:hover:active > .tab-top > .tab-image-mid > .tab-image-mid-mid { 
  background-image: url(chrome://global/skin/tab-bot-clicked-middle.gif);
}

.tab-bottom:hover:active > .tab-top > .tab-image-right > .tab-image-right-btm {
  background-image: url(chrome://global/skin/tab-bot-clicked-right.gif);
}

/* selected state */

.tab-bottom[selected="true"] > .tab-top > .tab-image-left > .tab-image-left-btm,
.tab-bottom:hover:active[selected="true"] > .tab-top > .tab-image-left > .tab-image-left-btm { 
  background-image: url(chrome://global/skin/tab-bot-select-left.gif);
}

.tab-bottom[selected="true"] > .tab-top > .tab-image-mid > .tab-image-mid-mid ,
.tab-bottom:hover:active[selected="true"] > .tab-top > .tab-image-mid > .tab-image-mid-mid  { 
  background-image: url(chrome://global/skin/tab-bot-select-middle.gif);
}

.tab-bottom[selected="true"] > .tab-top > .tab-image-right > .tab-image-right-btm,
.tab-bottom:hover:active[selected="true"] > .tab-top > .tab-image-right > .tab-image-right-btm { 
  background-image: url(chrome://global/skin/tab-bot-select-right.gif);
}

/* tabbox-bottom - the whole tabbox */

.tabbox-bottom > .tab-border-top-left, 
.tabbox-bottom > .tab-border-top-right {
  background  : url(chrome://global/skin/tab-bot-border.gif) repeat-x top;
  width				: 2px;
}

.tabbox-bottom > .tab-border-top-left-cap {
  background  : url(chrome://global/skin/tab-bot-border-leftcap.gif) no-repeat top;
  width				: 2px;
}

.tabbox-bottom > .tab-border-top-right-cap {
  background  : url(chrome://global/skin/tab-bot-border-rightcap.gif) no-repeat top;
  width				: 2px;
}

	/* bottom tabs */
tabcontrol[align="vertical"] tabpanel + tabbox[align="horizontal"] tab { 
  border-top: none;
  border-bottom: 1px solid #666666;
  border-left: 1px solid white;
  border-right: 1px solid #666666;
  -moz-border-radius: 0px 0px 8px 8px;
  padding: 1px 5px 3px 5px;
  margin: 1px 2px 1px 2px;
}

	/* left tabs */
tabcontrol[align="horizontal"] tabbox[align="vertical"] tab { 
  border-right: none;
  -moz-border-radius: 8px 0px 0px 8px;
  padding-right: 1px;
  margin: 2px 1px 2px 1px;
}

	/* right tabs */
tabcontrol[align="horizontal"] tabpanel + tabbox[align="vertical"]  tab { 
  border-top: 1px solid white;
  border-bottom: 1px solid #666666;
  border-left: none;
  border-right: 1px solid #666666;
  -moz-border-radius: 0px 8px 8px 0px;
  padding: 3px 5px 1px 5px;
  margin: 2px 1px 2px 1px;
}

tabcontrol { 
  border: none; 
}

/* border on bottom only, no padding (used in search) */
tabpanel.light {
  border: none;
  border-bottom: 1px outset #CCCCCC;
  padding: 0px;
}

tabpanel {
  border-top		: 0px;
  background-color	: #C2D0D0;
  border-left		: 1px solid #313948;
  border-right		: 1px solid #313948;
  border-bottom		: 1px solid #313948;
  padding			: 5px;
}

/* This is horrible CSS style, but is necessary to handle this case */
tabpanel title {
  background-color	: #C2D0D0;
}
