/* Replace icons */

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

/* Menu checkbox */
menuitem[type="checkbox"] {
	list-style-image: url("../icons/checkbox-symbolic.svg") !important;
}
menuitem[type="checkbox"][checked="true"] {
	list-style-image: url("../icons/checkbox-checked-symbolic.svg") !important;
}
menuitem[type="checkbox"][disabled="true"] .menu-iconic-icon {
	opacity: 0.5;
}

/* Menu radio */
menuitem[type="radio"] {
	list-style-image: url("../icons/radio-symbolic.svg") !important;
}
menuitem[type="radio"][checked="true"] {
	list-style-image: url("../icons/radio-checked-symbolic.svg") !important;
}
menuitem[type="radio"][disabled="true"] .menu-iconic-icon {
	opacity: 0.5;
}

/* Window buttons */
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-close .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-close .toolbarbutton-icon {
	list-style-image: url("../icons/window-close-symbolic.svg") !important;
}
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-max .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-max .toolbarbutton-icon {
	list-style-image: url("../icons/window-maximize-symbolic.svg") !important;
}
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-min .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-min .toolbarbutton-icon {
	list-style-image: url("../icons/window-minimize-symbolic.svg") !important;
}
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-restore .toolbarbutton-icon,
:root[tabsintitlebar][sizemode="maximized"] #titlebar .titlebar-max .toolbarbutton-icon,
:root[tabsintitlebar][sizemode="maximized"] #titlebar #titlebar-max .toolbarbutton-icon {
	list-style-image: url("../icons/window-unmaximize-symbolic.svg") !important;
}
:root[tabsintitlebar][inFullscreen] #window-controls #restore-button .toolbarbutton-icon {
	list-style-image: url("../icons/view-restore-symbolic.svg") !important;
}

/* Invert icons color in dark variant */
@media (prefers-color-scheme: dark) {
	:root[tabsintitlebar][inFullscreen] #window-controls #restore-button .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-close .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-close .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-max .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-max .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-min .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-min .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon,
:root[tabsintitlebar] #titlebar #titlebar-restore .toolbarbutton-icon,
:root[tabsintitlebar][sizemode="maximized"] #titlebar .titlebar-max .toolbarbutton-icon,
:root[tabsintitlebar][sizemode="maximized"] #titlebar #titlebar-max .toolbarbutton-icon,
	menuitem[type="checkbox"]:not([disabled="true"]):not([hover="true"]):not([checked="true"]) .menu-iconic-icon,
	menuitem[type="radio"]:not([disabled="true"]):not([hover="true"]):not([checked="true"]) .menu-iconic-icon {
		filter: invert(100%) brightness(200%);
		opacity: 0.75;
	}
}
