@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/* Expand the New Tab button. */
#main-window .tabbrowser-tabs .tabs-newtab-button {
	-moz-box-flex: 1;
	-moz-box-pack: start !important;
}

/* Blend the button into the toolbar when not hovered (so it doesn’t look weird). */
#main-window .tabbrowser-tabs .tabs-newtab-button:not(:hover) {
	-moz-appearance: toolbarbutton !important;
	margin-top:    -1.5px !important;
	margin-bottom: -1.5px !important;
}

/* Blend the button into the titlebar when hovered (on Windows). */
#main-window[tabsintitlebar] .tabbrowser-tabs .tabs-newtab-button:hover {
	background-image: -moz-linear-gradient(transparent, rgba(255, 255, 255, 0.5)), -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.25) 30%), -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.25) 30%) !important;
	background-position: 1px -1px, 0px -1px, 100% -1px !important;
	background-size: -moz-calc(-2px + 100%) 100%, 1px 100%, 1px 100% !important;
}

/* Fix icon spacing. */
#main-window[stylish-platform^="Linux"] .tabbrowser-tabs .tabs-newtab-button:not(:hover) > image {
	-moz-margin-start: 2px !important;
	-moz-margin-end:   1px !important;
}
#main-window:not([stylish-platform^="Linux"]) .tabbrowser-tabs .tabs-newtab-button > image {
	padding: 3px 6px 0px !important;
}
#main-window:not([stylish-platform^="Linux"]) .tabbrowser-tabs .tabs-newtab-button:hover > image {
	margin: -4px -3px -1px !important;
}