/*****  file location: Firefox-User-Profile-Folder/chrome/userChrome.css  *****/
/*****  enable loading in about:config with toolkit.legacyUserProfileCustomizations.stylesheets = true  *****/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

/*****  Neat theme-aware context menus by AveYo - check it out with AlpenGlow or FoxyGlow  *****/
:root { --fixup1: -moz-DialogText; --fixup2: -moz-Dialog; }
@media not all and (prefers-color-scheme: light) {
 :root { --fixup1: -moz-DialogText; --fixup2: -moz-Dialog; }
}
@media (-moz-windows-default-theme: 1) and (prefers-color-scheme: dark) {
 :root { --fixup1: -moz-menuhovertext; --fixup2: -moz-menuhover; }
}

#context-sep-navigation { display:none !important; }
#context-navigation {  -moz-appearance: none !important; background-color: transparent !important; }
menu,menuitem,.subviewbutton { -moz-appearance: none !important; }

/* scrollbox:not([orient="horizontal"]) */
menupopup:not(.PanelUI-subView) {
  -moz-appearance: none !important;
  background-color: var(--lwt-sidebar-background-color, var(--autocomplete-popup-background, var(--fixup2))) !important;
  color: var(--lwt-sidebar-text-color, var(--autocomplete-popup-color, var(--fixup1))) !important;
  padding: 0 !important;
}

:-moz-any(#context-navigation > *, menu, menuitem):is([_moz-menuactive]),
.subviewbutton:is(:focus-visible,:hover),
treechildren::-moz-tree-row(hover), treechildren::-moz-tree-cell-text(hover) {
  -moz-appearance: none !important;
  background-color: var(--lwt-sidebar-highlight-background-color, var(--toolbar-field-focus-border-color, -moz-menuhover)) !important;
  color: var(--lwt-sidebar-text-color, var(--autocomplete-popup-highlight-color, -moz-Dialog)) !important;
}

:-moz-any(#context-navigation > *, menu, menuitem):is([_moz-menuactive][disabled]),
.subviewbutton:is(:focus-visible,:hover):is([disabled]) {
  background-color: unset !important;
  color: #ccc !important;
}
