/* Inactive Window */

#places:not([active="true"]) > #placesToolbox > #placesToolbar > toolbarbutton,
#places:not([active="true"]) > #placesToolbox > #placesToolbar > #searchFilter {
  opacity: 0.7;
}

#places:not([active="true"]) > #placesView > #placesList {
  background-color: #e8e8e8;
}


/* Places Organizer Sidebars */

#placesList {
  -moz-appearance: none;
  border: none;
  margin: 0;
}

#placesList treechildren::-moz-tree-row {
  background-color: transparent;
  border-color: transparent;
}

#placesList treechildren::-moz-tree-row(selected) {  
  background: -moz-linear-gradient(top, #B5B5B5, #8A8A8A) repeat-x;
  border-top: 1px solid #979797;
}

#placesList treechildren::-moz-tree-row(selected,focus) {  
  background: -moz-linear-gradient(top, #A2B1D0, #6E81A9) repeat-x;
  border-top: 1px solid #91a0c0;
}

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

#placesList treechildren::-moz-tree-cell(leaf) ,
#placesList treechildren::-moz-tree-image(leaf) {
  cursor: pointer;
}

#placesList treechildren::-moz-tree-cell-text(leaf, hover) {
  cursor: pointer;
  text-decoration: underline;
}

#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) {  
  font-weight: bold !important;
  color: #ffffff !important;
}

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

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

#placesView > splitter {
  -moz-border-start: none !important;
  -moz-border-end: 1px solid #404040;
  min-width: 1px;
  width: 1px;
  background-image: none !important;       
}

.toolbarbutton-1 {
  list-style-image: url("chrome://browser/skin/places/back-forward.png");
}

/* back button */

#back-button {
  -moz-image-region: rect(0px, 34px, 23px, 0px);
  -moz-margin-end: 0;
  -moz-padding-end: 0;
  border-left: none;
  border-right: none;
}

#back-button:-moz-locale-dir(rtl) {
  -moz-image-region: rect(0px, 67px, 23px, 34px);
}

#back-button[disabled="true"] {
 -moz-image-region: rect(23px, 34px, 46px, 0px) !important;
}

#back-button[disabled="true"]:-moz-locale-dir(rtl) {
 -moz-image-region: rect(23px, 67px, 46px, 34px) !important;
}

#back-button:hover:active,
#back-button[buttondown="true"],
#back-button[open="true"] {
  -moz-image-region: rect(46px, 34px, 69px, 0px);
}

#back-button:hover:active:-moz-locale-dir(rtl),
#back-button[buttondown="true"]:-moz-locale-dir(rtl),
#back-button[open="true"]:-moz-locale-dir(rtl) {
  -moz-image-region: rect(46px, 67px, 69px, 34px);
}

#back-button > .toolbarbutton-text,
#forward-button > .toolbarbutton-text {
  display: none;
}

/* forward button */

#forward-button {
  -moz-image-region: rect(0px, 67px, 23px, 34px);
  -moz-margin-start: 0;
  -moz-margin-end: 8px;
  -moz-padding-start: 0;
  border-left: none;
  border-right: none;
}

#forward-button:-moz-locale-dir(rtl) {
  -moz-image-region: rect(0px, 34px, 23px, 0px);
}

#forward-button[disabled="true"] {
  -moz-image-region: rect(23px, 67px, 46px, 34px) !important;
}

#forward-button[disabled="true"]:-moz-locale-dir(rtl) {
  -moz-image-region: rect(23px, 34px, 46px, 0px) !important;
}

#forward-button:hover:active,
#forward-button[buttondown="true"],
#forward-button[open="true"] {
  -moz-image-region: rect(46px, 67px, 69px, 34px);
}

#forward-button:hover:active:-moz-locale-dir(rtl),
#forward-button[buttondown="true"]:-moz-locale-dir(rtl),
#forward-button[open="true"]:-moz-locale-dir(rtl) {
  -moz-image-region: rect(46px, 34px, 69px, 0px);
}

#placesToolbar > toolbarbutton[type="menu"] {
  -moz-margin-start: 5px;
  -moz-padding-end: 10px;
  background: url("chrome://browser/skin/places/menubutton-end.png") right center no-repeat;
}
#placesToolbar > toolbarbutton[type="menu"][open="true"] {
  background: url("chrome://browser/skin/places/menubutton-end-pressed.png") right center no-repeat;
}

#placesToolbar:-moz-locale-dir(rtl) > toolbarbutton[type="menu"] {
  background: url("chrome://browser/skin/places/menubutton-end-rtl.png") left center no-repeat;
}
#placesToolbar:-moz-locale-dir(rtl) > toolbarbutton[type="menu"][open="true"] {
  background: url("chrome://browser/skin/places/menubutton-end-pressed-rtl.png") left center no-repeat;
}

#placesToolbar > toolbarbutton[type="menu"] > menupopup {
  -moz-margin-start: 2px;
  margin-top: -4px;
}

#placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-icon {
  background: url("chrome://browser/skin/places/menubutton-start.png") left center no-repeat;
  padding: 3px 0px 4px 0px;
  -moz-padding-start: 10px;
  -moz-padding-end: 4px;
  height: 23px;
}
#placesToolbar > toolbarbutton[type="menu"][open="true"] > .toolbarbutton-icon {
  background: url("chrome://browser/skin/places/menubutton-start-pressed.png") left center no-repeat;
}

#placesToolbar:-moz-locale-dir(rtl) > toolbarbutton[type="menu"] > .toolbarbutton-icon {
  background: url("chrome://browser/skin/places/menubutton-start-rtl.png") right center no-repeat;
}
#placesToolbar:-moz-locale-dir(rtl) > toolbarbutton[type="menu"][open="true"] > .toolbarbutton-icon {
  background: url("chrome://browser/skin/places/menubutton-start-pressed-rtl.png") right center no-repeat;
}

#placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-text {
  display:  none;
}

#placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-menu-dropmarker {
  list-style-image: url("chrome://browser/skin/places/folderDropArrow.png");
  padding: 0;
}

/* organize button */
#organizeButton {
  list-style-image: url("chrome://browser/skin/places/toolbar-button-organize.png");
}

/* view button */
#viewMenu {
  list-style-image: url("chrome://browser/skin/places/toolbar-button-view.png");
}

/* maintenance button */
#maintenanceButton {
  list-style-image: url("chrome://browser/skin/places/toolbar-button-backup.png");
}

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

/* Place List, Place Content */
.placesTree {
  margin: 0px;
}

#placesList {
  -moz-appearance: none;
  background-color: #d2d8e2;
  width: 160px;
  margin: 0px;
  border: 0px;
}

#infoPaneBox {
  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;
}

.small {
  min-width: 0px;
  padding: 0px 4px 0px 4px;
  margin: 0px;  
  border: 0px;
}

.small .button-text,
.small .button-box {
  padding: 0px;
  border: 0px;
}

.filterList {
  -moz-appearance: none;
  background-color: transparent;
  border: 0px;
  margin: 2px;
  padding: 0px;
  min-width: 0px;
  width: 16px;
  height: 16px;
  list-style-image: url("chrome://browser/skin/Search-bar.png");
  -moz-user-focus: ignore;
  cursor: default;
}

.filterList .button-box {
  border: 0px;
  padding: 0px;
}

.filterList .button-menu-dropmarker {
  margin: 9px -3px -4px 8px;
}

/* Scope Bar */

#advancedSearch > hbox, 
#advancedSearchRows > row {
  background-color: #E8E8E8;
  border-top: 1px solid #F8F8F8;
  border-bottom: 1px solid #BABABA;
}

#advancedSearchRows > row,
#searchActions {
  -moz-padding-start: 2px;
  -moz-padding-end: 8px;
}

#organizerScopeBar {
  padding: 3px;
  -moz-appearance: none;
  background: -moz-linear-gradient(top, #E8E8E8, #D0D0D0) repeat-x;
  border-bottom: 1px solid #B1B1B1;
}

#scopeBarTitle {
  font: icon;
  color: #6D6D6D;
  font-weight: bold;
  text-shadow: 0 1px rgba(255, 255, 255, .4);
  margin: 0 6px 1px;
}

#organizerScopeBar > toolbarbutton {
  border: 0;
  font: icon;
  font-weight: bold;
  color: #2D2D2D;
  -moz-border-radius: 100%;
  padding: 0 10px 1px;
  margin: 1px;
  font-weight: bold;
}

#organizerScopeBar > toolbarbutton > .toolbarbutton-text {
   margin: 0 !important;
}

#organizerScopeBar > toolbarbutton:hover,
#organizerScopeBar > toolbarbutton[checked="true"] {
  color: #FFF !important; /* !imp because of [checked="true"] (see toolbarbutton.css) */
  text-shadow: 0 1px rgba(0, 0, 0, .4);
  background-color: rgba(0, 0, 0, .32);
}

#organizerScopeBar > toolbarbutton:active:hover,
#organizerScopeBar > toolbarbutton[checked="true"] {
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4), 0 1px rgba(255, 255,
255, 0.4);
}

#organizerScopeBar > toolbarbutton:active:hover {
  background-color: rgba(0, 0, 0, .5);
}

#organizerScopeBarExpander {
  margin: 0;
  padding: 0;
  -moz-padding-end: 2px;
}

#organizerScopeBar  > .expander-up {
  list-style-image: url("chrome://browser/skin/places/plus.png") !important;
}

#organizerScopeBar  > .expander-up:hover:active {
  list-style-image: url("chrome://browser/skin/places/plus-active.png") !important;
}

#organizerScopeBar  > .expander-down {
  list-style-image: url("chrome://browser/skin/places/minus.png") !important;
}

#organizerScopeBar  > .expander-down:hover:active {
  list-style-image: url("chrome://browser/skin/places/minus-active.png") !important;
}

#saveSearch {
  margin: 0 4px;
  padding: 0 10px;
  -moz-appearance: none;
  border: 1px solid rgba(0, 0, 0, .4);
  -moz-border-radius: 100%;
  text-shadow: 0 1px rgba(255, 255, 255, .4);
  background: -moz-linear-gradient(top, #FFF, #CACACA) repeat-x;
  -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}

#saveSearch > .button-box > .button-text {
  margin: 0 !important;
}

#saveSearch:focus {
  -moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
                   0 0 4px 1px -moz-mac-focusring,
                   0 0 2px 1px -moz-mac-focusring,
                   0 1px rgba(255, 255, 255, .4);
}

#saveSearch:active:hover {
  background: #CCC;
  -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, .2),
                   0 1px rgba(255, 255, 255, .4);
}

#saveSearch:active:hover:focus {
  -moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
                   0 0 4px 1px -moz-mac-focusring,
                   0 0 2px 1px -moz-mac-focusring,
                   inset 0 1px 4px rgba(0, 0, 0, .2),
                   0 1px rgba(255, 255, 255, .4);
}

%ifdef PLACES_QUERY_BUILDER
/* Calendar */
.history-calendar {
  margin: 0px 0px 7px 6px;
}

.calendar-box {
  -moz-appearance: listbox;
  border:1px solid black;
  background-color:white;
}
.calendar-header {
  background-color:#EEE;
}
.calendar-month-jump {
  cursor:pointer;
  padding-left:6px;
  padding-right:6px;
}
.calendar-month-jump:hover {
  background-color:#DDD;
}
.calendar-grid {
  padding-left:8px;
  padding-right:8px;
  padding-bottom:4px;
}
.calendar-grid label { /* everything in the calendar grid */
  padding:4px;
  margin:0px;
  text-align:center;
  font-size:80%;
}
.calendar-month-title {
  text-align:center;
}
.calendar-day-header {
  border-bottom:1px solid #888;
}
.calendar-day { /* just days (excluding the day headers) */
  cursor:w-resize;
  color:white;
  background-color:white;
}
.calendar-day:hover {
  background-color:#DDD;
}
.calendar-day[selected="true"] {
  cursor:w-resize;
  background-color:#8C8;
}
.calendar-day[selected="true"]:hover {
  background-color:#6A6;
}
.calendar-day[month="this"] {
  color:black;
}
.calendar-day[month="other"] {
  color:#888;
}

.advancedSearchPlus,
.advancedSearchMinus {
  width: 18px;
  height: 18px;
  -moz-appearance: none;
  -moz-margin-start: 2px;
}

.advancedSearchPlus .button-text,
.advancedSearchMinus  .button-text {
    display: none;
} 

.advancedSearchPlus {
  background: url("chrome://browser/skin/places/plus.png") no-repeat left center;
} 

.advancedSearchPlus:active {
   background: url("chrome://browser/skin/places/plus-active.png") no-repeat left center;
} 

.advancedSearchMinus {
  background: url("chrome://browser/skin/places/minus.png") no-repeat left center;
}

.advancedSearchMinus:active {
  background: url("chrome://browser/skin/places/minus-active.png") no-repeat left center;
}

%endif

/**** expanders ****/

.expander-up,
.expander-down {
  -moz-appearance: none;
  margin-left: 8px;
  padding: 0;
  min-width: 0;
}

.expander-up {
  list-style-image: url("chrome://browser/skin/places/expander-open.png") !important;
}

.expander-down {
  list-style-image: url("chrome://browser/skin/places/expander-closed.png") !important;
}

.expander-down:hover:active {
  list-style-image: url("chrome://browser/skin/places/expander-closed-active.png") !important;
}

.expander-up:hover:active {
  list-style-image: url("chrome://browser/skin/places/expander-open-active.png") !important;
}

/**
 * info pane
 */

/* More/Less button */

#infoBoxExpander {
  list-style-image: url("chrome://browser/skin/places/twisty-open.gif");
  -moz-appearance: none;
  margin: 0;
  padding: 0;
  max-width: 0;
}

#infoBoxExpanderLabel {
  display: none;
}

#infoBox[minimal="true"] #infoBoxExpander {
  list-style-image: url("chrome://browser/skin/places/twisty-closed.gif");
}

#itemsCountText,
#selectItemDescription {
  color: GrayText;
}

.editBMPanel_rowLabel {
  text-align: right !important;
}
