/* Popup menus and context menus */

@import "popups-contents.css";
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

/* Style menus */
menupopup {
	-moz-appearance: none !important;
	background: var(--gnome-menu-background) !important;
	border: 1px solid var(--gnome-menu-border-color) !important;
	border-radius: 9px;
	padding: 6px 0 !important;
	color: var(--gnome-button-color) !important;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important;
	transition: none !important;
	animation: none !important;
}

.menupopup-arrowscrollbox {
	border: 0 !important;
	background: var(--gnome-menu-background) !important;
}

menupopup menupopup {
	margin: -5px 0 0 -4px;
}

#BMB_bookmarksPopup {
	appearance: none !important;
	background: none !important;
	-moz-appearance: none !important;
	--panel-background: none !important;
	--panel-border-color: none !important;
	--panel-padding: 0 !important;
}

#PlacesToolbar menupopup {
	background: none !important;
	padding: 3px 6px 8px !important;
	margin: 0 0 0 -6px !important;
	border: none !important;
	box-shadow: none !important;
}

#PlacesToolbar menuitem:not(:hover), #PlacesToolbar menupopup menu:not(:hover) {
	-moz-appearance: none !important;
	background: none !important;
}

menuitem, menupopup menu {
	-moz-appearance: none !important;
	padding: 4px 8px !important;
	transition-duration: 0 !important;
}

menuitem[type="checkbox"] image, menuitem[type="radio"] image {
	visibility: visible !important;
	transition: none !important;
	animation: none !important;
}

menuitem:hover, menupopup menu:hover,
menubar > menu:hover {
	color: var(--gnome-button-color) !important;
	background: var(--gnome-button-hover-background) !important;
	transition-duration: 0 !important;
}

menuitem[disabled="true"], menupopup menu[disabled="true"] {
	color: var(--gnome-button-disabled-color) !important;
}

menuitem[disabled="true"]:hover, menupopup menu[disabled="true"]:hover {
	background: transparent !important;
	color: var(--gnome-button-disabled-color) !important;
}

/* Adjust popovers position */
panel[type=arrow] {
	margin-top: 0 !important;
}

/* Style popovers */
.panel-arrowcontent .panel-arrowcontent,
.panel-header, .PanelUI-subView,
.panel-subview-body, #widget-overflow-mainView, #protections-popup-footer,
panelview {
	border: none !important;
	background: var(--gnome-popover-background) !important;
}

.panel-arrowcontent {
	border-radius: 9px;
}

.panel-arrow {
	fill: var(--gnome-popover-background) !important;
	stroke: var(--gnome-popover-border-color) !important;
/*	display: -moz-inline-box !important;*/
}

.PanelUI-subView toolbarseparator:not([orient="vertical"]) {
	margin: 10px 2px !important;
}

.panel-header {
	padding: 0 0 10px 0 !important;
}
.panel-footer {
	background-color: transparent !important;
	display: flex;
	justify-content: flex-end;
	padding-top: 0px !important;
}
.panel-footer toolbarseparator {
	display: none !important;
}

.panel-subview-body {
	padding: 0 !important;
}
.panel-subview-footer {
	margin-top: 10px !important;
}

/* Style popovers menu buttons */
.subviewbutton,
.toolbarbutton-1, .protections-popup-category,
.identity-popup-content-blocking-category {
	border-radius: 5px !important;
	color: var(--gnome-button-color) !important;
	font: menu !important;
}
.subviewbutton,
.protections-popup-category,
.identity-popup-content-blocking-category {
	padding: 5px !important;
}

.subviewbutton[disabled], .toolbarbutton-1[disabled],
.protections-popup-category[disabled],
.identity-popup-content-blocking-category[disabled] {
	opacity: 0.5 !important;
}

.subviewbutton[shortcut]:after {
	opacity: 0.5 !important;
}

.subviewbutton:not([disabled]):hover, .toolbarbutton-1:not([disabled]):hover, .protections-popup-category:not([disabled]):hover,
.identity-popup-content-blocking-category:not([disabled]):hover {
	background-color: var(--gnome-popover-button-hover-background) !important;
}

.subviewbutton-back {
	width: 100%;
	-moz-box-align: start !important;
	-moz-box-pack: start !important;
	padding: 10px !important;
}
.subviewbutton-back + h1 {
	font-weight: normal !important;
	left: 0 !important;
	padding: 5px !important;
	pointer-events: none;
	position: absolute !important;
	top: 0 !important;
	width: 100%;
}

/* Style popover separators */
toolbarseparator, menuseparator {
	border-color: var(--gnome-popover-separator-color) !important;
}
toolbarseparator:not([orient="vertical"]) {
	margin: 8px 0 !important;
}
toolbarseparator[orient="vertical"] {
	margin: 0 3px !important;
}

/* Auto complete popups */
panel[type="autocomplete-richlistbox"] {
	background: var(--gnome-menu-background) !important;
	border: 1px solid var(--gnome-menu-border-color) !important;
	padding: 4px 0 !important;
	color: var(--gnome-toolbar-color) !important;
}
.autocomplete-richlistbox {
	margin: 0 !important;
}

.autocomplete-richlistitem:not([type="loginsFooter"]) {
	color: var(--gnome-toolbar-color) !important;
	font: menu !important;
	margin: 0 !important;
}
.autocomplete-richlistitem:not([type="loginsFooter"]) .ac-site-icon {
	fill: var(--gnome-toolbar-color) !important;
	opacity: 0.5;
}
.autocomplete-richlistitem:not([type="loginsFooter"]):hover {
	color: #fff !important;
	background-color: Highlight !important;
}
.autocomplete-richlistitem:not([type="loginsFooter"]):hover .ac-site-icon {
	fill: #fff !important;
}
