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

/* Variables that start with --gnome- are added by me and are assigned
 * to elements somewhere in this code. The rest of the variables are
 * built-in in Firefox, so you need to add an !important if you wanna
 * override them. */

@media (prefers-color-scheme: dark) {
  :root {
	/* Browser area before a page starts loading */
	--gnome-browser-before-load-background: #333333;
	--theme-primary-color: #0078D4;

	/* Toolbars */
	--gnome-toolbar-background: #383838;
	--gnome-tabstoolbar-background: #1B1B1B;
	--gnome-findbar-background: #333333;
	--gnome-toolbar-color: #ffffff;
	--gnome-toolbar-border-color: #242424;
	--gnome-inactive-toolbar-background: #353535;
	--gnome-inactive-toolbar-border-color: #282828;
	--gnome-inactive-tabstoolbar-background: #2E2E2E;

	/* Sidebar */
	--gnome-sidebar-background: #3b3b3b;
	--gnome-inactive-sidebar-background: #3f3f3f;

	/* Popups */
	--gnome-menu-background: #4A4A4A;
	--gnome-menu-border-color: #666666;
	--gnome-popover-background: #4A4A4A;
	--gnome-popover-border-color: #666666;
	--gnome-popover-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	--gnome-popover-button-hover-background: rgba(255, 255, 255, 0.1);
	--gnome-popover-button-active-background: rgba(255, 255, 255, 0.15);
	--gnome-popover-separator-color: rgba(0, 0, 0, 0.1);

	/* Header bar */
	--gnome-headerbar-background: #383838;
	--gnome-headerbar-border-color: #242424;
	--gnome-headerbar-box-shadow: inset 0 1px rgba(255, 255, 255, 0.15);
	--gnome-inactive-headerbar-background: #313131;
	--gnome-inactive-headerbar-border-color: #282828;
	--gnome-inactive-headerbar-box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);

	/* Buttons */
	--gnome-button-background: rgba(255, 255, 255, 0.06);
	--gnome-button-border-color: rgba(255, 255, 255, 0.12);
	--gnome-button-border-accent-color: transparent;
	--gnome-headerbar-button-border-color: transparent;
	--gnome-headerbar-button-border-accent-color: transparent;
	--gnome-button-color: rgba(255, 255, 255, 0.75);
	--gnome-button-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
	--gnome-button-hover-color: rgba(255, 255, 255, 0.1);
	--gnome-button-active-color: rgba(255, 255, 255, 0.2);
	--gnome-button-hover-background: rgba(255, 255, 255, 0.15);
	--gnome-button-active-background: rgba(255, 255, 255, 0.25);
	--gnome-button-active-border-color: transparent;
	--gnome-button-active-border-accent-color: transparent;
	--gnome-button-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
	--gnome-button-disabled-background: rgba(255, 255, 255, 0.06);
	--gnome-button-disabled-border-color: transparent;
	--gnome-button-disabled-box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
	--gnome-inactive-button-background: transparent;
	--gnome-inactive-button-border-color: transparent;
	--gnome-inactive-button-box-shadow: inset 0 1px rgba(255, 255, 255, 0.0);
	--gnome-button-suggested-action-background: linear-gradient(to top, #155099 2px, #15539e);
	--gnome-button-suggested-action-border-color: #0f3b71;
	--gnome-button-suggested-action-border-accent-color: #092444;;
	--gnome-button-suggested-action-box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
	--gnome-button-suggested-action-hover-background: linear-gradient(to top, #155099, #1655a2 1px);
	--gnome-button-suggested-action-active-background: #103e75;
	--gnome-button-suggested-action-active-border-color: #0f3b71;
	--gnome-button-suggested-action-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
	--gnome-button-destructive-action-background: linear-gradient(to top, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1));
	--gnome-button-destructive-action-border-color: #851015;
	--gnome-button-destructive-action-border-accent-color: #570b0e;
	--gnome-button-destructive-action-box-shadow: inset 0 1px rgba(255, 255, 255, 0.02), 0 1px 2px rgba(0, 0, 0, 0.07);
	--gnome-button-destructive-action-hover-background: linear-gradient(to top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15));
	--gnome-button-destructive-action-active-background: rgba(255, 255, 255, 0.25);
	--gnome-button-destructive-action-active-border-color: #851015;
	--gnome-button-destructive-action-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0);

	/* URL bar */
	--gnome-urlbar-background: #282828;
	--gnome-urlbar-border-color: #555555;
	--gnome-urlbar-hover-border-color: #888888;
	--gnome-urlbar-box-shadow: inset 0 0 0 1px rgba(21, 83, 158, 0);
	--gnome-urlbar-color: #ffffff;
	--gnome-inactive-urlbar-background: linear-gradient(#303030, #303030);
	--gnome-inactive-urlbar-border-color: #282828;
	--gnome-inactive-urlbar-box-shadow: none;
	--gnome-inactive-urlbar-color: #d6d6d6;
	--gnome-focused-urlbar-background: #282828;
	--gnome-focused-urlbar-border-color: #8AB4F8;
	--gnome-private-urlbar-background: #8AB4F8;

	/* Tabs */
	--gnome-tabbar-tab-background: transparent;
	--gnome-tabbar-tab-color: rgba(255, 255, 255, 0.55);
	--gnome-tabbar-tab-hover-background: rgba(56, 56, 56, 0.5);
	--gnome-tabbar-tab-hover-border-bottom-color: #bbbbbb;
	--gnome-tabbar-tab-hover-color: rgba(255, 255, 255, 0.75);
	--gnome-tabbar-tab-active-background: #383838;
	--gnome-tabbar-tab-active-border-bottom-color: #bbbbbb;
	--gnome-tabbar-tab-active-color: rgba(255, 255, 255, 0.85);
	--gnome-tabbar-tab-active-hover-background: #383838;
	--gnome-inactive-tabbar-tab-color: rgba(255, 255, 255, 0.45);
	--gnome-inactive-tabbar-tab-active-background: #313131;
	--gnome-inactive-tabbar-tab-active-border-bottom-color: var(--gnome-tabbar-tab-active-border-bottom-color);
	--gnome-inactive-tabbar-tab-active-color: rgba(255, 255, 255, 0.55);

	/* TitleButtons */
	--gnome-titlebutton-min-hover-background: rgba(255, 255, 255, 0.15);
	--gnome-titlebutton-max-hover-background: rgba(255, 255, 255, 0.15);
	--gnome-titlebutton-close-hover-background: rgba(229, 115, 115, 1);
	--gnome-titlebutton-min-active-background: rgba(255, 255, 255, 0.25);
	--gnome-titlebutton-max-active-background: rgba(255, 255, 255, 0.25);
	--gnome-titlebutton-close-active-background: rgba(229, 57, 53, 1);

	/* Switch */
	--gnome-switch-background: rgba(255, 255, 255, 0.65);
	--gnome-switch-border-color: rgba(255, 255, 255, 0.65);
	--gnome-switch-slider-background: #ffffff;
	--gnome-switch-slider-active-background: #ffffff;
	--gnome-switch-slider-border-color: transparent;
	--gnome-switch-slider-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
	--gnome-switch-slider-hover-box-shadow: 0 0 0 12px rgba(0, 0, 0, 0.10);
	--gnome-switch-slider-active-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
	--gnome-switch-slider-active-hover-box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.10);
	--gnome-switch-active-background: #0078D4;
	--gnome-switch-active-border-color: transparent;
	--gnome-switch-active-slider-border-color: transparent;

	/* Dirty hacks for replaced symbolic icons, they load from
	 * /usr/share/icons/<theme>/ and on some systems they need to be
	 * inverted, on others they don't, adjusts the filters below to your
	 * needs (you may also adjust icon brightness here). */
	--gnome-convert-icon-to-symbolic-hack-filter: invert(100%) sepia(100%) grayscale(100%) brightness(200%) brightness(85%);
	--gnome-icons-hack-filter: invert(100%) sepia(100%) grayscale(100%) brightness(200%) brightness(200%); /* without invert: none */
	--gnome-window-icons-hack-filter: invert(90%); /* without invert: none */
  }
}
