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

/* Icons light/dark fix coloring hack filters */
:root {
	--gnome-icons-hack-filter: brightness(0) saturate(100%) invert(37%) sepia(8%) saturate(683%) hue-rotate(183deg) brightness(95%) contrast(84%);
	--gnome-window-icons-hack-filter: brightness(0) saturate(100%) invert(37%) sepia(8%) saturate(683%) hue-rotate(183deg) brightness(95%) contrast(84%);
	@media (prefers-color-scheme: dark) {
		--gnome-icons-hack-filter: brightness(0) saturate(100%) invert(94%) sepia(11%) saturate(362%) hue-rotate(184deg) brightness(95%) contrast(87%);
		--gnome-window-icons-hack-filter: brightness(0) saturate(100%) invert(94%) sepia(11%) saturate(362%) hue-rotate(184deg) brightness(95%) contrast(87%);
	}
}

/* Use system theme icons instead of Adwaita icons included by theme */
:root {
	--gnome-icon-application-x-addon-symbolic: url("moz-icon://stock/application-x-addon-symbolic?size=dialog") !important;
	--gnome-icon-applications-engineering-symbolic: url("moz-icon://stock/applications-engineering-symbolic?size=dialog") !important;
	--gnome-icon-edit-copy-symbolic: url("moz-icon://stock/edit-copy-symbolic?size=dialog") !important;
	--gnome-icon-edit-cut-symbolic: url("moz-icon://stock/edit-cut-symbolic?size=dialog") !important;
	--gnome-icon-edit-find-symbolic: url("moz-icon://stock/edit-find-symbolic?size=dialog") !important;
	--gnome-icon-edit-paste-symbolic: url("moz-icon://stock/edit-paste-symbolic?size=dialog") !important;
	--gnome-icon-folder-download-symbolic: url("moz-icon://stock/folder-download-symbolic?size=dialog") !important;
	--gnome-icon-go-next-symbolic: url("moz-icon://stock/go-next-symbolic?size=dialog") !important;
	--gnome-icon-go-previous-symbolic: url("moz-icon://stock/go-previous-symbolic?size=dialog") !important;
	--gnome-icon-mail-unread-symbolic: url("moz-icon://stock/mail-unread-symbolic?size=dialog") !important;
	--gnome-icon-open-menu-symbolic: url("moz-icon://stock/open-menu-symbolic?size=dialog") !important;
	--gnome-icon-pan-down-symbolic: url("moz-icon://stock/pan-down-symbolic?size=dialog") !important;
	--gnome-icon-pan-down-symbolic: url("moz-icon://stock/pan-down-symbolic?size=dialog") !important;
	--gnome-icon-preferences-system-symbolic: url("moz-icon://stock/preferences-system-symbolic?size=dialog") !important;
	--gnome-icon-preferences-system-time-symbolic: url("moz-icon://stock/preferences-system-time-symbolic?size=dialog") !important;
	--gnome-icon-printer-symbolic: url("moz-icon://stock/printer-symbolic?size=dialog") !important;
	--gnome-icon-process-stop-symbolic: url("moz-icon://stock/process-stop-symbolic?size=dialog") !important;
	--gnome-icon-starred-symbolic: url("moz-icon://stock/starred-symbolic?size=dialog") !important;
	--gnome-icon-tab-new-symbolic: url("moz-icon://stock/tab-new-symbolic?size=dialog") !important;
	--gnome-icon-user-home-symbolic: url("moz-icon://stock/user-home-symbolic?size=dialog") !important;
	--gnome-icon-view-fullscreen-symbolic: url("moz-icon://stock/view-fullscreen-symbolic?size=dialog") !important;
	--gnome-icon-view-refresh-symbolic: url("moz-icon://stock/view-refresh-symbolic?size=dialog") !important;
	--gnome-icon-view-restore-symbolic: url("moz-icon://stock/view-restore-symbolic?size=dialog") !important;
	--gnome-icon-window-close-symbolic: url("moz-icon://stock/window-close-symbolic?size=dialog") !important;
	--gnome-icon-window-maximize-symbolic: url("moz-icon://stock/window-maximize-symbolic?size=dialog") !important;
	--gnome-icon-window-minimize-symbolic: url("moz-icon://stock/window-minimize-symbolic?size=dialog") !important;
	--gnome-icon-window-new-symbolic: url("moz-icon://stock/window-new-symbolic?size=dialog") !important;
	--gnome-icon-window-restore-symbolic: url("moz-icon://stock/window-restore-symbolic?size=dialog") !important;
	--gnome-icon-zoom-in-symbolic: url("moz-icon://stock/zoom-in-symbolic?size=dialog") !important;
	--gnome-icon-zoom-out-symbolic: url("moz-icon://stock/zoom-out-symbolic?size=dialog") !important;
}

/* Apply icon color filter */
:root[customtitlebar] .titlebar-buttonbox .titlebar-close .toolbarbutton-icon,
.close-icon,
#nav-bar #back-button .toolbarbutton-icon,
#nav-bar #forward-button .toolbarbutton-icon,
#PanelUI-menu-button .toolbarbutton-icon,
#new-tab-button .toolbarbutton-icon,
#tabs-newtab-button  .toolbarbutton-icon,
#TabsToolbar #new-tab-button .toolbarbutton-icon,
#home-button .toolbarbutton-icon,
#preferences-button .toolbarbutton-icon,
#fullscreen-button .toolbarbutton-icon,
#zoom-out-button .toolbarbutton-icon,
#zoom-in-button .toolbarbutton-icon,
#developer-button .toolbarbutton-icon,
#email-link-button .toolbarbutton-icon,
#print-button .toolbarbutton-icon,
#add-ons-button .toolbarbutton-icon,
#find-button .toolbarbutton-icon,
#new-window-button .toolbarbutton-icon,
#bookmarks-menu-button .toolbarbutton-icon,
#history-panelmenu .toolbarbutton-icon,
#alltabs-button .toolbarbutton-icon,
#cut-button .toolbarbutton-icon,
#copy-button .toolbarbutton-icon,
#paste-button .toolbarbutton-icon,
#reload-button .toolbarbutton-icon,
#context-reload .toolbarbutton-icon,
#stop-button .toolbarbutton-icon,
#context-stop .toolbarbutton-icon,
#downloads-indicator-icon,
#downloads-indicator-icon .toolbarbutton-icon,
#nav-bar-overflow-button .toolbarbutton-icon,
#context-back .menu-iconic-icon,
#context-forward .menu-iconic-icon,
#appMenu-zoom-controls .toolbarbutton-icon,
#unified-extensions-button .toolbarbutton-icon,
#identity-icon {
	filter: var(--gnome-window-icons-hack-filter) !important;
}

/* Fix icon size */
toolbar .toolbarbutton-1 > .toolbarbutton-icon,
#downloads-indicator-icon {
	width: 16px !important;
	height: 16px !important;
	padding: 0 !important;
}
:root[customtitlebar] #titlebar .titlebar-button .toolbarbutton-icon,
:root[customtitlebar][inFullscreen] #window-controls toolbarbutton .toolbarbutton-icon {
	width: 16px;
}
