/* 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);
}

/* bookmark panel submenus */

#BMB_bookmarksPopup menupopup[placespopup=true] {
  -moz-appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  padding-top: 4px;
  padding-inline-start: 3px;
}

#BMB_bookmarksPopup menupopup[placespopup=true] > hbox {
  /* emulating chrome://browser/content/places/menu.xml#places-popup-arrow but without the arrow */
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
  background: var(--arrowpanel-background);
  color: var(--arrowpanel-color);
  border: 1px solid var(--arrowpanel-border-color);
  border-radius: 3.5px;
  margin-top: -4px;
}

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

/* bookmark panel separator */
#BMB_bookmarksPopup menuseparator {
  padding-top: 0;
  padding-bottom: 0;
}

/* Disabled empty item looks too small otherwise, because it has no icon. */
menuitem.subviewbutton[disabled]:not(.menuitem-iconic),
/* Same for checkbox menu items, whose icons lose size due to -moz-appearance: none: */
menuitem[type="checkbox"].subviewbutton {
  /* This is 16px for an icon + 3px for its margins + 1px for its padding +
   * 2px for its border, see above */
  min-height: 22px;
}

menu.subviewbutton > .menu-right {
  -moz-appearance: none;
  list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg);
  -moz-context-properties: fill;
  fill: MenuText;
  /* Reset the rect we inherit from the button: */
  -moz-image-region: auto;
}

menu[disabled="true"].subviewbutton > .menu-right {
  fill: GrayText;
}

@media (-moz-windows-default-theme: 0) {
  menu[_moz-menuactive].subviewbutton > .menu-right {
    fill: HighlightText;
  }
}

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

/* Win8 and beyond. */
@media not all and (-moz-os-version: windows-win7) {
  #BMB_bookmarksPopup menupopup[placespopup=true] > hbox,
  #edit-controls@inAnyPanel@,
  #zoom-controls@inAnyPanel@,
  #edit-controls@inAnyPanel@ > toolbarbutton,
  #zoom-controls@inAnyPanel@ > toolbarbutton {
    border-radius: 0;
  }
}

