/*
############### Better Browser Frame On Windows ###############
     ##########       Made  by PTMblogger       ##########
          #####     http://ptmblogger.co.cc/    #####
*/

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/* ############### Setup zone ############### */

/* Remove this line if you have problems with tabbar being too high /
#main-window .tabbrowser-tabs .tabs-alltabs-button:not(:-moz-system-metric(windows-default-theme)) {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}
/ Remove this line too if you have problems with tabbar being too high */

/* ############### End of setup zone ############### */

/* Style the browser frame */
	#main-window #content tabpanels {
		-moz-appearance: tabpanels !important;
		margin-top: -2px !important;
	}

	#main-window #content browser {
		-moz-appearance: listbox !important;
	}

/* Style the browser tabbar */
	#main-window #content .tabbrowser-tabs {
		background: -moz-dialog !important;
	}

	#main-window .tabbrowser-tabs .tabbrowser-arrowscrollbox {
		margin-left: -2px !important;
	}

	#main-window #content .tabbrowser-tabs .tabs-bottom {
		display: none !important;
	}

  /* Style the browser tabbar buttons */
	#main-window .tabbrowser-tabs .tabs-alltabs-button,
	#main-window .tabbrowser-tabs .scrollbutton-up,
	#main-window .tabbrowser-tabs .scrollbutton-down {
		-moz-appearance: toolbarbutton !important;
		margin: 0px !important;
		margin-top: 1px !important;
		margin-bottom: 2px !important;
	}

	#main-window .tabbrowser-tabs .tabs-alltabs-button:hover image {
		margin-top: -1px !important;
	}

    /* Fix Scrollbuttons */
		#main-window .tabbrowser-tabs .scrollbutton-up {
			margin-left: 2px !important;
		}

		#main-window .tabbrowser-tabs .scrollbutton-up[disabled="true"] {
			-moz-image-region: rect(0px, 33px, 14px, 22px) !important;
		}

		#main-window .tabbrowser-tabs .scrollbutton-down[disabled="true"] {
			-moz-image-region: rect(0px, 33px, 14px, 22px) !important;
		}

/* Style the tabs */
	#main-window #content .tabbrowser-tabs tab {
		color: -moz-DialogText !important;
		-moz-appearance: tab !important;
		margin: 0 !important;  /* Cleanup of the messy code firefox uses that screws up everything */
		padding: 0 !important; /* Cleanup of the messy code firefox uses that screws up everything */
		margin-top: 2px !important;
	}

	/* Fixes non-selected tabs */
	#main-window #content .tabbrowser-tabs tab:not([selected="true"]) {
		margin-bottom: 2px !important;
	}

	/* Removes gap between tabs */
		#main-window:-moz-system-metric(windows-default-theme) .tabbrowser-tabs tab[selected="true"] {
			margin-left: -1px !important;
		}

/* ##### Makes the browser frame look normal when no tabs exist ##### */
#main-window #content .tabbrowser-strip[collapsed="true"] + tabpanels {
	-moz-appearance: none !important;
	margin-top: 0 !important;
}

#main-window #content .tabbrowser-strip[collapsed="true"] + tabpanels browser {
	-moz-appearance: none !important;
}