/* Unified toolbar */

#places {
  -moz-binding: url("chrome://global/skin/globalBindings.xml#unifiedWindow");
}

/* Inactive Window */

#places:not([active="true"]) > #placesToolbox > #placesToolbar {
  background-image: url("chrome://global/skin/toolbar/toolbar-background-inactive.png");
  background-color: #cfcfcf;
  border-bottom: 1px solid rgba(0,0,0,0.35);
}

#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-color: #6f81a9;
  background-image: url("chrome://browser/skin/places/selected-gradient.png");
  background-repeat: repeat-x;
  background-position: bottom left;
  border-top: 1px solid #979797;
}

#placesList treechildren::-moz-tree-row(selected,focus) {  
  background-image: url("chrome://browser/skin/places/selected-focused-gradient.png");
  background-color: #8a8a8a !important;
  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 {
  background-color: #999;
  border-bottom: 1px solid #404040;
  background-image: url("chrome://global/skin/toolbar/toolbar-background.gif");
  background-repeat: repeat-x;
  background-position: 3px 0px;
  margin-top: -3px;
  padding: 0 4px;
}

#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[chromedir="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"][chromedir="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[chromedir="rtl"],
#back-button[buttondown="true"][chromedir="rtl"],
#back-button[open="true"][chromedir="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[chromedir="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"][chromedir="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[chromedir="rtl"],
#forward-button[buttondown="true"][chromedir="rtl"],
#forward-button[open="true"][chromedir="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[chromedir="rtl"] > toolbarbutton[type="menu"] {
  background: url("chrome://browser/skin/places/menubutton-end-rtl.png") left center no-repeat;
}
#placesToolbar[chromedir="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[chromedir="rtl"] > toolbarbutton[type="menu"] > .toolbarbutton-icon {
  background: url("chrome://browser/skin/places/menubutton-start-rtl.png") right center no-repeat;
}
#placesToolbar[chromedir="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;
}

/* Search Bar */
#searchbar {
  margin-top: 6px;
  -moz-margin-start: 2px;
  -moz-margin-end: -4px;
}

.textbox-input-closebutton {
  -moz-appearance: none;
  margin: -2px 0;
  -moz-margin-end: -2px;
  min-width: 0;
  background-color: transparent;
  border: none;
  padding: 0 !important;
  list-style-image: url("chrome://global/skin/icons/closetab.png");
  width: 16px;
  height: 16px;
  cursor: default;
}

.textbox-input-closebutton > .button-box {
  margin: 0;
  padding: 0;
  border: none;
}

.textbox-input-closebutton:hover:active {
  list-style-image: url("chrome://global/skin/icons/closetab-active.png");
}

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

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

#searchFilter {
  -moz-appearance: none;
  border: 3px solid;
  -moz-border-top-colors: #676767 #C5C5C5 -moz-Field;
  -moz-border-bottom-colors: #C2C2C2 #A4A4A4 -moz-Field;
  -moz-border-right-colors: #969696 #C5C5C5 -moz-Field;
  -moz-border-left-colors: #969696 #C5C5C5 -moz-Field;
  -moz-border-radius: 12px;
  background: url("chrome://global/skin/icons/search-textbox.png") -moz-Field no-repeat 1px center;
  -moz-background-clip: border !important;
  padding: 0;
  -moz-padding-start: 14px;
}

#searchFilter[focused="true"] {
  outline: 2px solid #4F8EC9;
  -moz-outline-radius: 12px;
  -moz-outline-offset: -2px;
}

#searchFilter > .textbox-input-box {
  padding: 2px;
  border-left: 2px solid transparent;
}

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

#scopeBarTitle {
  color: #6D6D6D;
  border: 1px solid transparent;
  -moz-border-radius: 10px;
  padding-top: 1px;
}

#organizerScopeBar {
  background: url("chrome://global/skin/icons/find-bar-background.png") repeat-x top center #D0D0D0;
  color: #474747;
  font-size: 105%;
  font-weight: bold;
  border-bottom: 1px solid #B1B1B1;
  padding: 2px 0;
}

#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 > toolbarbutton {
  border: 1px solid transparent;
  -moz-border-radius: 10px;
  padding: 0;
  margin: 0 1px;
}

#organizerScopeBar .toolbarbutton-text {
   margin: 0 !important;
   padding: 0 5px !important;
}

#organizerScopeBar> toolbarbutton:not([disabled="true"]):hover {
  color: #fff;
  background: url("chrome://global/skin/20pct_transparent_pixel.png") repeat;
}

#organizerScopeBar > toolbarbutton[checked="true"]  {
  background: url("chrome://global/skin/icons/white-gray-gradient-active.gif") repeat-x -1px 50%;
  border-color:   #656565;
  color: #fff !important;
}

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

menulist {
  -moz-appearance: none;
  margin: 0px 3px 0px 5px !important;
  padding: 2px 0px 2px 0px;
  background: url("chrome://global/skin/icons/round-button-leftcap.png") no-repeat center left;
}

menulist:active,
menulist[open="true"]  {
 background: url("chrome://global/skin/icons/round-button-active-leftcap.png") no-repeat center left !important;
}
  
.menulist-label-box {
  -moz-appearance: none;
  margin: 0px 0px 0px 8px !important;
  padding: 2px 0 2px 0px;
  background: url("chrome://global/skin/icons/round-button-dropmarker.png") no-repeat center right;
  border: none;
}
menulist:active > .menulist-label-box,
menulist[open="true"] > .menulist-label-box {
  background: url("chrome://global/skin/icons/round-button-active-dropmarker.png") no-repeat center right !important;
}

.menulist-label {
  -moz-appearance: none;
  margin: 0px 14px 0px 0px !important;
  padding: 2px 0px 2px 0px;
  background: url("chrome://global/skin/icons/round-button-middle.png") repeat-x center left;
  border: none;
}
menulist:active > .menulist-label-box .menulist-label,
menulist[open="true"] > .menulist-label-box  .menulist-label {
  background: url("chrome://global/skin/icons/round-button-active-middle.png") repeat-x center left !important;
}

#editBMPanel_namePicker {
  background: none !important;
  margin: 0px !important;
  padding:  0px !important;
}
#editBMPanel_namePicker[droppable="false"] > .menulist-editable-box {
  -moz-appearance: textfield;
  cursor: text;
  margin: 4px 4px;
  border: 3px solid;
  -moz-border-top-colors: transparent #888888 #000000;
  -moz-border-right-colors: transparent #FFFFFF #000000;
  -moz-border-bottom-colors: transparent #FFFFFF #000000;
  -moz-border-left-colors: transparent #888888 #000000;
  -moz-border-radius-topright: 2px;
  -moz-border-radius-bottomleft: 2px;
  padding: 0;
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#saveSearch {
  -moz-appearance: none;
  margin: 0;
  padding: 4px 0 3px 0;
  -moz-padding-start: 7px;
  background: url("chrome://global/skin/icons/round-button-leftcap.png") no-repeat center left;
  border: none;
}

#saveSearch:active {
  background: url("chrome://global/skin/icons/round-button-active-leftcap.png") no-repeat center left;
}

#saveSearch .button-text {
  margin: 0 !important;
  padding: 2px 8px 2px 1px !important;
  background: url("chrome://global/skin/icons/round-button-right.png") no-repeat center right;
  font-size: 12px;
}

#saveSearch:active .button-text {
  background: url("chrome://global/skin/icons/round-button-active-right.png") no-repeat center right;
}

%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;
}

.no-margin-button {
  min-width:0em;
}

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

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

#itemsCountText,
#selectItemDescription {
  color: GrayText;
}

#editBookmarkPanelGrid > rows > row > label {
  text-align: right !important;
}
