/* 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/. */

/* Sidebars */

#bookmarksPanel,
#history-panel {
  -moz-appearance: none;
  background-color: transparent;
}

.sidebar-placesTree,
.sidebar-placesTreechildren::-moz-tree-row {
  padding-bottom: 1px;
  margin: 0;
  height: 24px;
  /* Default font size is 11px on mac, so this is 12px */
  font-size: 1.0909rem;
}

.sidebar-placesTree {
  -moz-appearance: -moz-mac-source-list;
  -moz-font-smoothing-background-color: -moz-mac-source-list;
}

.sidebar-placesTreechildren::-moz-tree-separator {
  border-top: 1px solid #505d6d;
  margin: 0 10px;
}

.sidebar-placesTreechildren::-moz-tree-row {
  background-color: transparent;
}

.sidebar-placesTreechildren::-moz-tree-row(selected) {
  -moz-appearance: -moz-mac-source-list-selection;
  -moz-font-smoothing-background-color: -moz-mac-source-list-selection;
}

.sidebar-placesTreechildren::-moz-tree-row(selected,focus) {
  -moz-appearance: -moz-mac-active-source-list-selection;
  -moz-font-smoothing-background-color: -moz-mac-active-source-list-selection;
}

.sidebar-placesTreechildren::-moz-tree-cell-text {
  margin-inline-end: 6px;
}

.sidebar-placesTreechildren::-moz-tree-cell-text(selected) {
  color: #fff;
  font-weight: bold;
}

#sidebar-search-label {
  display: none;
}

.sidebar-placesTreechildren::-moz-tree-twisty {
  -moz-appearance: none;
  padding: 0 2px;
  list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed");
}

.sidebar-placesTreechildren::-moz-tree-twisty(closed, selected) {
  list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted");
}

.sidebar-placesTreechildren::-moz-tree-twisty(open) {
  list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded");
}

.sidebar-placesTreechildren::-moz-tree-twisty(open, selected) {
  list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded-inverted");
}

.sidebar-placesTreechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed) {
  list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-rtl");
}

.sidebar-placesTreechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected) {
  list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted-rtl");
}

@media (-moz-mac-yosemite-theme) {
  .sidebar-placesTreechildren::-moz-tree-cell-text(selected) {
    color: -moz-dialogtext;
    font-weight: 500;
  }

  .sidebar-placesTreechildren::-moz-tree-cell-text(selected, focus) {
    color: #fff;
  }

  .sidebar-placesTreechildren::-moz-tree-twisty(closed, selected) {
    list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed");
  }

  .sidebar-placesTreechildren::-moz-tree-twisty(closed, selected, focus) {
    list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted");
  }

  .sidebar-placesTreechildren::-moz-tree-twisty(open, selected) {
    list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded");
  }

  .sidebar-placesTreechildren::-moz-tree-twisty(open, selected, focus) {
    list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded-inverted");
  }

  .sidebar-placesTreechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected) {
    list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-rtl");
  }

  .sidebar-placesTreechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected, focus) {
    list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted-rtl")
  }
}

#viewButton {
  -moz-appearance: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin: 4px 0;
  margin-inline-end: 4px;
  /* Default font size is 11px on mac, so this is 12px */
  font-size: 1.0909rem;
}

#viewButton:focus {
  box-shadow: var(--focus-ring-box-shadow);
}

#viewButton:hover {
  background: hsla(240, 5%, 5%, 0.1);
}

#viewButton[open] {
  background: hsla(240, 5%, 5%, 0.15);
}

#viewButton > .button-box > .button-menu-dropmarker {
  display: -moz-box;
  list-style-image: url("chrome://global/skin/icons/arrow-dropdown-12.svg");
  width: 12px;
  height: 12px;
}

/* Trees */

%include ../../shared/places/tree-icons.inc.css

treechildren:-moz-tree-image(selected,focus) {
  fill: HighlightText;
}
