/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

%include ../../shared/customizableui/panelUI.inc.css

.panel-subviews {
  background-color: var(--arrowpanel-background);
}

#BMB_bookmarksPopup > menuitem[type="checkbox"] {
  -moz-appearance: none !important; /* important, to override toolkit rule */
}

#BMB_bookmarksPopup menupopup {
  -moz-appearance: none;
  background: var(--arrowpanel-background);
  color: var(--arrowpanel-color);
  border: 1px solid var(--arrowpanel-border-color);
  margin-top: -6px;
  padding-top: 1px;
}

/* Add some space at the top because there are no headers: */
#BMB_bookmarksPopup menupopup > hbox > .popup-internal-box > .arrowscrollbox-scrollbox > .scrollbox-innerbox  {
  padding-top: 4px;
}

.subviewbutton > .toolbarbutton-text {
  padding-top: 3px;
  padding-bottom: 3px;
}

.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button {
  -moz-appearance: none;
  border: 0;
  margin-inline-start: 3px;
}

.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  margin-inline-start: 0;
}

.subviewbutton > .toolbarbutton-text {
  padding-inline-start: 16px;
}

.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item) > .toolbarbutton-text {
  padding-inline-start: 0;
}

/* subviewbutton entries for social sidebars have images that come from external
/* sources, and are not guaranteed to be the size we want, so force the size on
/* those icons. */
toolbarbutton.social-provider-menuitem > .toolbarbutton-icon {
  width: 16px;
  height: 16px;
}

.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
  visibility: hidden;
}

menuitem.subviewbutton {
  -moz-appearance: none !important;
}

menu.subviewbutton > .menu-right {
  -moz-appearance: none;
  list-style-image: url(chrome://browser/skin/places/bookmarks-menu-arrow.png);
  -moz-image-region: rect(0, 16px, 16px, 0);
  width: 16px;
  height: 16px;
}

menu[disabled="true"].subviewbutton > .menu-right {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) {
  transform: scaleX(-1);
}

.subviewbutton > .toolbarbutton-icon {
  margin-inline-end: 5px !important;
}

.subviewbutton > .menu-right,
.subviewbutton > .menu-iconic-left {
  padding-top: 1px;
  /* These need !important to override menu.css */
  margin-top: 1px !important;
  margin-bottom: 2px !important;
}

.subviewradio > .radio-label-box {
  -moz-appearance: none;
}