@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/* Tabbar modifications. */

#TabsToolbar {
  -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox")!important;
}

#main-window[tabsontop="true"][sizemode="normal"][chromemargin]:not([inFullscreen]) #TabsToolbar {
  background: transparent !important;
  border: 2px solid transparent !important;
  border-bottom: none !important;
}

@media all and (-moz-windows-theme:aero) {

#main-window[tabsontop="true"][sizemode="normal"][chromemargin]:not([inFullscreen]) #TabsToolbar {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-bottom: none !important;
}

}

#main-window[tabsontop="true"][chromemargin]:not([inFullscreen]) .tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) {
  background-image: -moz-linear-gradient(rgba(186,221,251,.75) , rgba(127,179,255,.5) 25%, rgba(255,255,255,0) 100%) !important;
}

#main-window[tabsontop="true"][chromemargin]:not([inFullscreen]) .tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover {
  background-image: -moz-linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,100%,.3) 75%, hsla(0,0%,100%,0) 100%),
                    -moz-linear-gradient(rgba(186,221,251,.75) , rgba(127,179,255,.5) 25%, rgba(255,255,255,0) 100%) !important;
}

/*-------------------------------------------------------------------------------*/

/* Titlebar modifications. */

#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]) #titlebar {
  min-height: 29px !important;
}

#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]):-moz-lwtheme #titlebar { 
  background-image: -moz-linear-gradient(white, rgba(255,255,255,0)10px) !important;
  -moz-appearance:none !important;
}

#main-window[tabsontop="true"]:not([inFullscreen]) #titlebar-buttonbox {
  z-index: 1;
}

/*-------------------------------------------------------------------------------*/

/* Windows theme fitting */

@media all and (-moz-windows-theme:luna-blue),(-moz-windows-theme:luna-silver),(-moz-windows-theme:luna-olive) {

#main-window[sizemode="normal"]:not([inFullscreen]) #navigator-toolbox[tabsontop="true"] #toolbar-menubar[autohide="true"] ~ #TabsToolbar {
  margin-top: -28px !important;
  margin-left: 5.2em !important;
  margin-right: 8em !important;
}

#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]) #titlebar { 
  height: 35px !important; /*30px for no space above the tabbar.*/
}

}

@media all and (-moz-windows-theme:zune), (-moz-windows-theme:royale) {

#main-window[sizemode="normal"]:not([inFullscreen]) #navigator-toolbox[tabsontop="true"] #toolbar-menubar[autohide="true"] ~ #TabsToolbar {
  margin-top: -28px !important;
  margin-left: 5em !important;
  margin-right: 8em !important;
}

#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]) #titlebar { 
  height: 30px !important; /*30px for no space above the tabbar.*/
}

}

@media all and (-moz-windows-classic) {

#main-window[sizemode="normal"]:not([inFullscreen]) #navigator-toolbox[tabsontop="true"] #toolbar-menubar[autohide="true"] ~ #TabsToolbar {
  margin-top: -35px !important;
  margin-left: 0em !important;
  margin-right: 6.3em !important;
}

#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]) #titlebar { 
  height: 36px !important; /*30px for no space above the tabbar.*/
}

}

@media all and (-moz-windows-theme:aero) {

#main-window[sizemode="normal"]:not([inFullscreen]) #navigator-toolbox[tabsontop="true"] #toolbar-menubar[autohide="true"] ~ #TabsToolbar {
  margin-top: -34px !important;
  margin-left: 0em !important;
  margin-right: 10em !important;
}

#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]) #titlebar { 
  height: 36px !important; /*32px for no space above the tabbar.*/
}



#main-window[tabsontop="true"][sizemode="normal"]:not([inFullscreen]):-moz-lwtheme #titlebar {
  -moz-appearance: -moz-window-titlebar !important;
}

}

/*-------------------------------------------------------------------------------*/

/* Everything else */

/* Styling the menubar */

#main-window[sizemode="normal"]:not([inFullscreen]) #navigator-toolbox[tabsontop="true"] #toolbar-menubar[autohide="true"] {
  background: -moz-linear-gradient(hsla(0,0%,100%,.5), hsla(0,0%,100%,.5)100%) !important;
}

/* Fix tab styling for the dark background */

#main-window[tabsontop="true"][chromemargin]:not([inFullscreen]) .tabbrowser-tab:not([selected="true"]) {  
  text-shadow: white 0 0 1px !important;
}

/* ----- Optional - Uncomment the code or codes to use ----- */

/* ======== FF4 App Menu Button Tweaks if the FF4 App Menu button is used in the Tab Bar in Titlebar. ======== */

/*
  #appmenu-button dropmarker,
  #appmenu-button .button-text{
  display: none !important;
  }

  #appmenu-button {
  margin: 0px 0px 0px 0px !important;
  padding: 1px !important;
  border: none !important;
  background: none !important;
  }
*/

/* ======== Force Remove All Tabs Button From Tab Bar ======== */

/*
  #alltabs-button{
  display: none !important;
  }
*/