

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");



/*************************** TABS ****************************/
#tabmail tab.tabmail-tab,
#content tab.tabbrowser-tab  {
  -moz-binding: url(chrome://seatabx2/content/seatabx2.xml#tab-closers) ;
}
.tabbrowser-tab * {
	pointer-events: none;
}
.tabbrowser-tab toolbarbutton {
	pointer-events: auto;
}
.tabbrowser-tab[selected="true"]:not([ignorefocus="true"]) {
	-moz-user-focus: normal !important;
}

.tabbrowser-tab .tab-close-button {
  opacity: 1.0;
  -moz-user-focus: ignore;
  border: none;
}

/* force mail tab closers to be visible before hiding them below */
#tabmail .tab-close-button {
  display:-moz-box;
}

/*** remove closebuttons based on settings ***/

/* Hide end tab close button */
.tabs-closebutton,

/*Display a close button on the active and hovered tabs */
#tabmail[browsertabsclosebuttons="4"] .tabbrowser-tab:not([selected="true"]):not(:hover) .tab-close-button,
#content[browsertabsclosebuttons="4"] .tabbrowser-tab:not([selected="true"]):not(:hover) .tab-close-button,

/*Display a close button on the active tab only */
#tabmail[browsertabsclosebuttons="0"] .tabbrowser-tab:not([selected="true"]) .tab-close-button,
#content[browsertabsclosebuttons="0"] .tabbrowser-tab:not([selected="true"]) .tab-close-button,

/*Don’t display any close buttons */
#tabmail[browsertabsclosebuttons="2"] .tabbrowser-tab[selected="true"] .tab-close-button,
#tabmail[browsertabsclosebuttons="2"] .tabbrowser-tab:not([selected="true"]) .tab-close-button,
#content[browsertabsclosebuttons="2"] .tabbrowser-tab[selected="true"] .tab-close-button,
#content[browsertabsclosebuttons="2"] .tabbrowser-tab:not([selected="true"]) .tab-close-button,

/* dynamically remove the new tab buttons */
.tabbrowser-tabs:not([overflow="true"]) #new-tab-button,
.tabbrowser-tabs[overflow="true"] .tabs-newtab-button {
  display: none;
}

/* hide close button on first tab in mail */
#tabmail .tabbrowser-tab:first-of-type .tab-close-button,
/* hide close button on single tab, but show when hovered */
#content .tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button {
  opacity: 0;
}



/************** TAB CLOSERS ************/

.tabbrowser-tab .tab-close-button {
  list-style-image: url("close.png");
  -moz-image-region: rect(0px 14px 14px 0px);
  -moz-appearance: none;
  padding: 0px;
  margin: 1px 2px;
  min-height: 14px;
  opacity:1;
}
.tabbrowser-tab .tab-close-button:not(:hover) {
  opacity:0.85;
}
.tabbrowser-tab .tab-close-button:hover {
  filter: url('filters.svg#hover');
}
.tabbrowser-tab .tab-close-button:hover:active {
  filter: url('filters.svg#active');
}
.tabbrowser-tab:not([selected="true"]):not(:hover) .tab-close-button {
  filter: url('filters.svg#disabled');
  opacity:1;
}
