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

/* Places Organizer Sidebars */

#placesList > treechildren::-moz-tree-row {
  background-color: transparent;
  border-color: transparent;
  padding-bottom: 1px;
  height: 24px;
}

#placesList > treechildren::-moz-tree-cell-text {
  font-size: 12px;
  margin-inline-end: 6px;
}

#placesList > treechildren::-moz-tree-row(selected) {  
  -moz-appearance: -moz-mac-source-list-selection;
}

#placesList > treechildren::-moz-tree-row(selected,focus) {  
  -moz-appearance: -moz-mac-active-source-list-selection;
}

#placesList > treechildren::-moz-tree-row(History),
#placesList > treechildren::-moz-tree-row(history)  {
  background-color: blue;
}

#placesList > treechildren::-moz-tree-cell(separator) {
  cursor: default;
}

#placesList > treechildren::-moz-tree-separator {
  border-top: 1px solid #505d6d;
  margin: 0 10px;
}

#placesList > treechildren::-moz-tree-cell-text(selected) {  
  color: #fff;
  font-weight: bold;
}

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

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

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

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

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

#placesList > treechildren:-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) {
  #placesList > treechildren::-moz-tree-cell-text(selected) {
    color: -moz-dialogtext;
    font-weight: 500;
  }

  #placesList > treechildren::-moz-tree-cell-text(selected, focus) {
    color: #fff;
  }

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

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

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

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

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

  #placesList > treechildren:-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");
  }
}

#placesToolbar {
  padding: 0 4px 3px;
}

#placesView {
  border-top: none !important;
}

#placesView > splitter {
  border-inline-start: none !important;
  border-inline-end: 1px solid #b4b4b4;
  min-width: 1px;
  width: 3px;
  margin-inline-start: -3px;
  position: relative;
  background-image: none !important;
}

#placesToolbar > toolbarbutton {
  list-style-image: url("chrome://browser/skin/places/toolbar.png");
  margin: 4px 4px 5px;
  padding: 0;
  height: 22px;
  -moz-appearance: toolbarbutton;
}

#placesToolbar > toolbarbutton > .toolbarbutton-icon {
  margin: 1px 4px;
}

#placesToolbar > toolbarbutton:not(#clearDownloadsButton) > .toolbarbutton-text {
  display: none;
}

#placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-menu-dropmarker {
  list-style-image: url(chrome://browser/skin/toolbarbutton-dropmarker.png);
  padding: 0;
  margin-top: 1px;
  margin-inline-end: 2px;
}

@media (min-resolution: 2dppx) {
  #placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-menu-dropmarker {
    list-style-image: url(chrome://browser/skin/toolbarbutton-dropmarker@2x.png);
  }

  #placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-menu-dropmarker > .dropmarker-icon {
    width: 7px;
  }
}

#placesToolbar > toolbarbutton[disabled="true"] > .toolbarbutton-icon,
#placesToolbar > toolbarbutton:not(:hover):-moz-window-inactive > .toolbarbutton-icon,
#placesToolbar > toolbarbutton[type="menu"][disabled="true"] > .toolbarbutton-menu-dropmarker,
#placesToolbar > toolbarbutton:not(:hover):-moz-window-inactive[type="menu"] > .toolbarbutton-menu-dropmarker {
  opacity: .5;
}

#placesToolbar > toolbarbutton:-moz-window-inactive[disabled="true"] > .toolbarbutton-icon,
#placesToolbar > toolbarbutton:-moz-window-inactive[type="menu"][disabled="true"] > .toolbarbutton-menu-dropmarker {
  opacity: .25;
}

#placesToolbar > toolbarbutton > menupopup {
  margin-top: 1px;
}

/* back and forward button */
#back-button:-moz-locale-dir(ltr),
#forward-button:-moz-locale-dir(rtl) {
  -moz-image-region: rect(0px, 16px, 16px, 0px);
  margin-right: 0;
}

#forward-button:-moz-locale-dir(ltr),
#back-button:-moz-locale-dir(rtl) {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
  margin-left: 0;
}

#back-button > .toolbarbutton-icon {
  margin-inline-start: 3px !important;
  margin-inline-end: 2px !important;
}

#forward-button > .toolbarbutton-icon {
  margin-inline-start: 2px !important;
  margin-inline-end: 3px !important;
}

/* organize button */
#organizeButton {
  -moz-image-region: rect(0px, 48px, 16px, 32px);
}

/* view button */
#viewMenu {
  -moz-image-region: rect(0px, 64px, 16px, 48px);
}

/* maintenance button */
#maintenanceButton {
  -moz-image-region: rect(0px, 80px, 16px, 64px);
}

/* Root View */
#placesView {
  border-top: 1px solid ThreeDDarkShadow;
  -moz-user-focus: ignore;
}

/* Place List, Place Content */
#placesList {
  -moz-appearance: -moz-mac-source-list;
  box-shadow: inset -2px 0 0 hsla(0,0%,100%,.2);
  width: 160px;
}

@media (-moz-mac-yosemite-theme) {
  #placesList {
    box-shadow: none;
  }
}

/* Info box */
#detailsDeck {
  border-top: 1px solid #919191;
  background-color: #f0f0f0;
  padding: 10px;
}

#placeContent {
  -moz-appearance: none;
  border: 0px;
}

#placeContent > treechildren::-moz-tree-row {
  border-top: none !important;
  padding-top: 1px;
}

#placeContent > treechildren::-moz-tree-row(odd) {
  background-color: #edf3fe;
}

#placeContent > treechildren::-moz-tree-row(selected),
#placeContent > treechildren::-moz-tree-row(odd, selected) {
  background-color: -moz-mac-secondaryhighlight;
}

#placeContent > treechildren::-moz-tree-row(selected, focus), 
#placeContent > treechildren::-moz-tree-row(odd, selected, focus) {
  background-color: Highlight;
  color: HighlightText !important;
}

#placeContent > treechildren::-moz-tree-cell,
#placeContent > treechildren::-moz-tree-column {
  border-right: 1px solid #d7dad7;
}

#placeContent > treechildren::-moz-tree-cell(separator) {
  border-color: transparent;
}

/**** expanders ****/

.expander-up,
.expander-down {
  margin: 0 4px 1px 8px;
  padding: 0;
}

.expander-up {
  -moz-appearance: -moz-mac-disclosure-button-open;
}

.expander-down {
  -moz-appearance: -moz-mac-disclosure-button-closed;
}

/**
 * info pane
 */

#infoBoxExpander {
  margin: 2px;
}

#infoBoxExpanderLabel {
  display: none;
}

#itemsCountText,
#selectItemDescription {
  color: GrayText;
}

.editBMPanel_rowLabel {
  text-align: end;
}

/**
 * Downloads pane
 */

#clearDownloadsButton {
  list-style-image: none !important;
}

#clearDownloadsButton > .toolbarbutton-icon {
  display: none;
}
