/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998-1999
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt (hewitt@netscape.com)
 *   Jason Kersey (kerz@netscape.com)
 *   Pierre Chanial (chanial@noos.fr)
 *   Dean Tessman (dean_tessman@hotmail.com)
 *   Blake Ross (blake@cs.stanford.edu)
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

@import url("chrome://global/skin/");
@import url(chrome://browser/skin/browser_flock.css);
@import url(chrome://browser/skin/tabs.css);

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#menubar-items {
  -moz-box-orient: vertical; /* for flex hack */

}

#menubar-items > menubar {
  -moz-box-flex: 1; /* make menu items expand to fill toolbar height */
}

/* BC: mar29-07 - Windows/Unix Specific Menubar style */
#toolbar-menubar #menubar-items {
  background-color: transparent;
  max-height: 25px;
}
#toolbar-menubar #menubar-items > menubar {
  background-color: transparent;
  margin: 0px;
}
#PersonalToolbar {
  min-height: 26px;
}

/* ..... fix searchbar "add engine" padding issue ..... */

#searchbar .searchbar-popup .open-engine-manager { 
  -moz-padding-start: 4px; 
}

#searchbar[empty="true"] .searchbar-textbox {
  color: GrayText;
}

/* Star UI Panel */
#editBookmarkPanel,
#editMediaStreamPanel {
  -moz-appearance: none;
  background-color: #f3f3f3;
  border: 1px solid #999999;
  -moz-border-bottom-colors: #999999;
  -moz-border-top-colors: #999999;
  -moz-border-right-colors: #999999;
  -moz-border-left-colors: #999999;
}

/* ::::: bookmark buttons ::::: */

toolbarbutton.bookmark-item {
  margin: 0;
  min-width: 0;
  max-width: 13em;
  padding: 2px 5px 0px 5px;
}

toolbarbutton.bookmark-item-microsummarized {
  max-width: 20em;
}

toolbarbutton.bookmark-item:hover:active,
toolbarbutton.bookmark-item[open="true"] {
  padding-top: 3px;
  padding-bottom: 1px;
  -moz-padding-start: 5px;
  -moz-padding-end: 5px;
}

.bookmark-item > .toolbarbutton-icon {
  width: 16px;
  height: 16px;
}

/* Prevent [mode="icons"] from hiding the label */
.bookmark-item > .toolbarbutton-text {
  display: -moz-box !important;
}

.bookmark-item > .toolbarbutton-menu-dropmarker {
  display: none;
}

#wrapper-personal-bookmarks .toolbarpaletteitem-box {
  width: 16px;
  height: 16px;
  background: url("chrome://browser/skin/Bookmarks-folder.png") no-repeat !important;
}

/*
#wrapper-search-container .searchbar-textbox {
  -moz-user-input: disabled;
  -moz-user-focus: normal;
}
*/

.bookmarks-toolbar-customize {
  display: none;
  max-width: 15em !important;
}

toolbarpaletteitem[place="toolbar"] .bookmarks-toolbar-customize {
  display: -moz-box;
}

toolbarpaletteitem[place="toolbar"] .bookmarks-toolbar-overflow-items {
  visibility: hidden;
}

toolbarpaletteitem[place="toolbar"] .bookmarks-toolbar-items {
  visibility: hidden;
}

%ifdef MOZ_PLACES
toolbarpaletteitem[place="toolbar"] .places-toolbar-items {
  display: none;
}
%endif

/* ::::: bookmark menus ::::: */

menu.bookmark-item,
menuitem.bookmark-item {
  min-width: 0;
  max-width: 26em;
}

.bookmark-item > .menu-iconic-left {
  margin-top: 0;
  margin-bottom: 0;
}

.bookmark-item > .menu-iconic-left > .menu-iconic-icon {
  width: 16px;
  height: 16px;
  -moz-padding-start: 0px;
}

/* ..... fix bookmarks padding issue ..... */

#menu_BookmarksPopup menuitem { 
-moz-padding-start: 4px; 
}

#menu_BookmarksPopup menuitem.menuitem-iconic { 
-moz-padding-start: 0px; 
}


/* ..... drag and drop styles ..... */

.bookmark-item[dragover-left="true"] {
  -moz-border-left-colors: #000000;
}
.bookmark-item[dragover-right="true"] {
  -moz-border-right-colors: #000000;
}
.bookmark-item[dragover-top="true"] {
  -moz-border-top-colors: #000000;
}
.bookmark-item[dragover-bottom="true"] {
  -moz-border-bottom-colors: #000000;
}

/* ::::: bookmark items ::::: */
%ifdef XP_WIN
/* Windows */
.bookmark-item  {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.bookmark-item[container] {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[container][open] {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

.bookmark-item[container][livemark] { 
  list-style-image: url("chrome://browser/skin/livemark-folder.png");
  -moz-image-region: auto;
}

.bookmark-item[container][livemark] .bookmark-item {
  list-style-image: url("chrome://browser/skin/livemark-item.png");
  -moz-image-region: auto;
}

.bookmark-item[container][query] {
  list-style-image: url("chrome://browser/skin/places/query.png");
  -moz-image-region: auto;
}

.bookmark-item[query][tagContainer] {
  list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
  -moz-image-region: auto;
}

.bookmark-item[query][dayContainer] {
  list-style-image: url("chrome://browser/skin/places/calendar.png");
  -moz-image-region: auto;
}

.bookmark-item[query][hostContainer] {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[query][hostContainer][open] {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}
%else
/* Linux */
.bookmark-item:not([container])  {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px)
}

.bookmark-item[container] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

.bookmark-item[container][livemark] { 
  list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png");
}

.bookmark-item[container][livemark] .bookmark-item {
  list-style-image: url("chrome://browser/skin/places/livemark-item.png");
}

.bookmark-item[container][query] {
  list-style-image: url("chrome://browser/skin/places/query.png");
}

.bookmark-item[query][tagContainer] {
  list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
}

.bookmark-item[query][dayContainer] {
  list-style-image: url("chrome://browser/skin/places/calendar.png");
}

.bookmark-item[query][hostContainer] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

.bookmark-item[query][hostContainer][open] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}
%endif

/* ::::: primary toolbar buttons ::::: */

.toolbarbutton-1 {
  -moz-box-orient: vertical;
  min-width: 0px;
  list-style-image: url("chrome://browser/skin/Toolbar.png");
}

.toolbarbutton-1 .toolbarbutton-icon {
  -moz-margin-end: 0px;
}

toolbar[mode="full"] .toolbarbutton-1,
toolbar[mode="full"] .toolbarbutton-menubutton-button {
  min-width: 57px;
}

toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
toolbar[mode="icons"] .toolbarbutton-menubutton-button .toolbarbutton-text {
  display: none;
}

.toolbarbutton-1, .toolbarbutton-menubutton-button {
  padding: 5px;
}

.toolbarbutton-1:hover:active:not([disabled]),
.toolbarbutton-1[open="true"], 
.toolbarbutton-menubutton-button:hover:active:not([disabled]),
.toolbarbutton-menubutton-button[open="true"] {
  padding-top: 5px;
  padding-bottom: 5px;
  -moz-padding-start: 6px;
  -moz-padding-end: 4px;
}

.toolbarbutton-1[checked="true"] {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  -moz-padding-start: 6px !important;
  -moz-padding-end: 4px !important;
}

.toolbarbutton-1[type="menu-button"] {
  padding: 0px !important;
}

.toolbarbutton-menubutton-stack,
.toolbarbutton-menubutton-button,
.toolbarbutton-menubutton-stack:hover,
.toolbarbutton-menubutton-button:hover,
.toolbarbutton-menubutton-stack:hover:active,
.toolbarbutton-menubutton-button:hover:active {
  margin: 0 !important;
  display: -moz-box;
}

/* ::::: 24px primary toolbar buttons ::::: */

/* these styles can be found in browser_flock.css */

/* ::::: 16px primary toolbar buttons ::::: */



/* ::::: fullscreen window controls ::::: */

#window-controls {
  -moz-box-align: center;
  padding-top: 0px;
  padding-bottom: 0px;
  -moz-padding-start: 4px;
  -moz-padding-end: 2px;
  border-left: 2px solid;
  -moz-border-left-colors: ThreeDHighlight ThreeDShadow;
}

#minimize-button {
  list-style-image: url("chrome://global/skin/icons/Minimize.gif");
}
#restore-button {
  list-style-image: url("chrome://global/skin/icons/Restore.gif");
}
#close-button {
  list-style-image: url("chrome://global/skin/icons/Close.gif");
}

/* ::::: nav-bar-inner ::::: */

#urlbar {
  margin: 2px 3px;
}

/* ::::: page proxy icon ::::: */

#page-proxy-deck,
#page-proxy-favicon,
#page-proxy-button {
  width: 16px;
  height: 16px;
}

#page-proxy-deck {
  cursor: -moz-grab;
  margin: 2px 3px;
}

#page-proxy-favicon {
  list-style-image: none;
}

#page-proxy-favicon:not([src]) {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px)
}

#page-proxy-button {
  list-style-image: url("chrome://global/skin/icons/folder-item.png") !important;
  -moz-image-region: rect(0px, 16px, 16px, 0px);}

#page-proxy-button[pageproxystate="invalid"] {
  cursor: default;
  -moz-image-region: rect(32px, 16px, 48px, 0px) !important;
}


statusbarpanel#statusbar-display {
  -moz-padding-start: 0;
}

/* ::::: autocomplete ::::: */

.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
  color: #555566;
}

.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment), 
.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) 
{
  color: GrayText;
  font-size: smaller;
}

.autocomplete-treebody::-moz-tree-cell(suggesthint) {
  border-top: 1px solid GrayText;
}
	
/* ::::: go button ::::: */

#go-container {
  -moz-box-orient: vertical; /* for go button flex hack */
}

#go-button {
  -moz-box-flex: 1; /* expand to fill toolbar height */
  list-style-image: url("chrome://browser/skin/Go.png");
  -moz-image-region: rect(0px 20px 20px 0px);
  padding-top: 2px;
  padding-bottom: 2px;
  -moz-padding-start: 3px;
  -moz-padding-end: 5px;
}

#go-button[chromedir="rtl"] {
  list-style-image: url("chrome://browser/skin/Go-rtl.png");
}

#go-button:hover {
  -moz-image-region: rect(0px 40px 20px 20px);
}

#go-button:hover:active {
  padding: 3px 4px 1px 4px;
}

#go-button[disabled="true"] {
  -moz-image-region: rect(0px 60px 20px 40px);
}

#go-button > .toolbarbutton-icon {
  margin: 0;
}

#go-button > .toolbarbutton-text {
  display: -moz-box !important;
  margin: 0 2px 1px 2px !important;
}

#sidebar {
  background-color: Window;
}

/* ::::: content area ::::: */

#status-bar {
  border-top: none;
}

#security-button {
  list-style-image: none;
  min-width: 20px;
  -moz-box-direction: reverse;
  display: none;
}

#security-button[level="high"] {
  list-style-image: url("chrome://browser/skin/Secure.png");
  display: -moz-box;
}

#security-button[level="low"] {
  list-style-image: url("chrome://browser/skin/Secure.png");
  display: -moz-box;
}

#security-button[level="broken"] {
  list-style-image: url("chrome://browser/skin/Security-broken.png");
  display: -moz-box;
}

/* XXXsw prevent margins of a value-less label from shifting the image */
#security-button > label:not([value]) {
  display: none;
}

#page-report-button {
  list-style-image: none;
  width: 20px;
  display: none;
}

#page-report-button[blocked] {
  list-style-image: url("chrome://browser/skin/Info.png");
  display: -moz-box;
}

/* ::::: throbber ::::: */

#navigator-throbber {
  -moz-appearance: none;
  -moz-user-focus: ignore;
  margin: 0 !important;
  border: none !important;
  padding: 0px !important;
  min-width: 0;
  background-color: transparent;
  list-style-image: url("chrome://browser/skin/Throbber-small.png");
}

#navigator-throbber[busy="true"] {
  list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif");
  opacity: 0.5;
}

toolbar[iconsize="small"] #navigator-throbber,
toolbar[mode="text"] #navigator-throbber {
  list-style-image: url("chrome://browser/skin/Throbber-small.png");
}
toolbar[iconsize="small"] #navigator-throbber[busy="true"],
toolbar[mode="text"] #navigator-throbber[busy="true"] {
  list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif");
  opacity: 0.5;
}

.tabs-closebutton > .toolbarbutton-icon {
  -moz-margin-end: 0px !important;
  -moz-padding-end: 2px !important;
  -moz-padding-start: 2px !important;
}

.tabs-closebutton {
  -moz-appearance: none;
  padding: 4px 2px;
  border: none !important;
}

#sidebar-box .tabs-closebutton {
  margin-bottom: 0px !important;
  padding: 0px 2px 0px 2px !important;
}

#FindToolbar > .tabs-closebutton {
	border: 1px solid transparent;
  padding: 3px 2px 4px 2px !important;
}

toolbarbutton.chevron {
  list-style-image: url("chrome://global/skin/toolbar/chevron.gif") !important;
}

toolbarbutton.chevron[chromedir="rtl"] {
  list-style-image: url("chrome://global/skin/toolbar/chevron-rtl.gif") !important;
}

toolbarbutton.chevron > .toolbarbutton-text {
  display: none; /* hide chevron label */
}

toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
  display: none;
}

toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
  display: -moz-box; /* display chevron icon in text mode */
}

toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon {
  display: -moz-box;
}

toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text {
   display: none;
}

#sidebar-throbber[loading="true"] {
  list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif");
  opacity: 0.5;
  -moz-margin-end: 4px;
}

#urlbar[level="high"] > .autocomplete-textbox-container,
#urlbar[level="low"] > .autocomplete-textbox-container {
  background-color: #F5F6BE; /* #F7F898; */
  color: #000000;
}

#urlbar[level="high"] #lock-icon {
  list-style-image: url("chrome://browser/skin/Secure.png");
}
#urlbar[level="low"] #lock-icon {
  list-style-image: url("chrome://browser/skin/Secure.png");
}
#urlbar[level="broken"] #lock-icon {
  list-style-image: url("chrome://browser/skin/Security-broken.png");
}

%ifdef MOZ_WIDGET_GTK2
#urlbar > .autocomplete-textbox-container {
  -moz-binding: url(chrome://browser/skin/browser.xml#autocomplete-security-wrapper);
}

#autocomplete-security-wrapper {
  -moz-box-align: center;
}

#urlbar[level="high"] #autocomplete-security-wrapper,
#urlbar[level="low"] #autocomplete-security-wrapper,
#urlbar[level="broken"] #autocomplete-security-wrapper {
  background-color: transparent; /* #F7F898; */
  color: #000000;
}
%endif

#feed-button, #feed-button > .button-box,
#feed-button:hover:active > .button-box {
  padding: 0px;
  margin: 0px;
  border: 0px; 
  background-color: transparent;
}

#feed-button .button-menu-dropmarker,
#feed-button .button-text {
  display: none;
}

#feed-button {
  -moz-binding: url("chrome://global/content/bindings/button.xml#menu");
  -moz-appearance: none; 
  min-width: 0px; 
  margin-right: 1px !important;
}

#feed-button[feeds] {
  list-style-image: url("chrome://browser/skin/page-livemarks.png");
}
#feed-button[chromedir="rtl"][feeds] {
  list-style-image: url("chrome://browser/skin/page-livemarks-rtl.png");
}

/* ::::: About Popup Blocking dialog ::::: */
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
  visibility: collapse;
}

#checkForUpdates[loading="true"] {
  list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif");
}


%ifdef MOZ_PLACES
#places-bookmark {
  list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png");
}

#places-subscribe {
  list-style-image: url("chrome://browser/skin/page-livemarks.png");
  opacity: 1.0;
}

#places-subscribe[disabled="true"] {
  opacity: 0.3;
}

#bookmarksBarShowPlaces {
  list-style-image: url("chrome://browser/skin/places/placesIcon.png");
}


/* Personal toolbar */
.toolbar-drop-indicator {
  height: 16px;
  width: 5px;
  margin-bottom: -8px;
  position: relative;
  background: url("chrome://browser/skin/places/toolbarDropMarker.png") 50% 50% no-repeat;
}

.toolbar-drop-indicator-bar {
  display: none;
  height: 16px;
  margin-bottom: -16px;
  margin-left: 4px;
  position: relative;
}

.toolbar-drop-indicator-bar[dragging="true"] {
  display: -moz-box;
}

toolbarbutton.bookmark-item[dragover="true"][open="true"] {
  -moz-appearance: none;
  background: Highlight !important;
  color: HighlightText !important;
  list-style-image: url("chrome://browser/skin/places/folderDragOver.png") !important;
  -moz-image-region: rect(0px, 16px, 16px, 0px) !important;
}

.bookmark-item[dragover-into="true"] {
  background: Highlight !important;
  color: HighlightText !important;
}

.bookmark-item[dragover-top="true"] {
  -moz-border-top-colors: #000000;
}

.bookmark-item[dragover-bottom="true"] {
  -moz-border-bottom-colors: #000000;
}
%endif

/* :::::: Bookmarks toolbar styling :::::: */
#PersonalToolbar > #personal-bookmarks toolbarbutton {
  -moz-appearance: none;
  color: #333333;
  border: none;
}
#PersonalToolbar > #personal-bookmarks toolbarbutton label {
}
#PersonalToolbar > #personal-bookmarks toolbarbutton:hover {
  -moz-appearance: none;
  color: #2E61D9;
  border: none;
}
