/* ***** 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 Communicator client code, released
 * March 31, 1998.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998-2001
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt (hewitt@netscape.com)
 *
 * 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 ***** */

/* ===== addressbook.css ================================================
  == Styles for the main Address Book window.
  ======================================================================= */

@import url("chrome://messenger/skin/");
@import url("chrome://global/skin/toolbar.css");

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

#addressbookWindow:-moz-lwtheme {
  background-repeat: no-repeat;
  background-position: top right;
}

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

.toolbarbutton-1 {
  -moz-box-orient: vertical;
  min-width: 0px;
}

toolbox[labelalign="end"] .toolbarbutton-1 {
  -moz-box-orient: horizontal;
}

toolbox[labelalign="end"] > toolbar[mode="full"] .toolbarbutton-1 .toolbarbutton-text {
  -moz-padding-start: 2px;
}

toolbox[labelalign="end"] > toolbar[mode="full"] deck .toolbarbutton-text {
  text-align: start;
}

#button-newcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(0px 24px 24px 0px);
}

#button-newcard:hover {
  -moz-image-region: rect(24px 24px 48px 0px);
} 

#button-newcard:hover:active {
  -moz-image-region: rect(24px 24px 48px 0px);
}

#button-newcard[disabled="true"] {
  -moz-image-region: rect(48px 24px 72px 0px) !important;
} 

#button-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(0px 48px 24px 24px);
}

#button-newlist:hover {
  -moz-image-region: rect(24px 48px 48px 24px);
} 

#button-newlist[disabled="true"] {
  -moz-image-region: rect(48px 48px 72px 24px) !important;
} 

#button-editcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(0px 72px 24px 48px);
}

#button-editcard:hover {
  -moz-image-region: rect(24px 72px 48px 48px);
}

#button-editcard[disabled="true"] {
  -moz-image-region: rect(48px 72px 72px 48px) !important;
}

#button-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(0px 96px 24px 72px);
}

#button-newmessage:hover {
  -moz-image-region: rect(24px 96px 48px 72px);
} 

#button-newmessage[disabled] {
  -moz-image-region: rect(48px 96px 72px 72px) !important;
}

#button-newim {
 list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
 -moz-image-region: rect(0px 120px 24px 96px);
}
 
#button-newim:hover {
  -moz-image-region: rect(24px 120px 48px 96px);
} 
 
#button-newim[disabled] {
  -moz-image-region: rect(48px 120px 72px 96px) !important;
} 

#button-abdelete {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(0px 144px 24px 120px);
}

#button-abdelete:hover {
  -moz-image-region: rect(24px 144px 48px 120px);
} 

#button-abdelete[disabled] {
  -moz-image-region: rect(48px 144px 72px 120px) !important;
}

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

toolbar[iconsize="small"] #button-newcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

toolbar[iconsize="small"] #button-newcard:hover {
  -moz-image-region: rect(16px 16px 32px 0px);
} 

toolbar[iconsize="small"] #button-newcard[disabled] {
  -moz-image-region: rect(32px 16px 48px 0px) !important;
} 

toolbar[iconsize="small"] #button-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 32px 16px 16px);
}

toolbar[iconsize="small"] #button-newlist:hover {
  -moz-image-region: rect(16px 32px 32px 16px);
} 

toolbar[iconsize="small"] #button-newlist[disabled] {
   -moz-image-region: rect(32px 32px 48px 16px) !important;
} 

toolbar[iconsize="small"] #button-editcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 48px 16px 32px);
}

toolbar[iconsize="small"] #button-editcard:hover {
  -moz-image-region: rect(16px 48px 32px 32px);
} 

toolbar[iconsize="small"] #button-editcard[disabled="true"] {
  -moz-image-region: rect(32px 48px 48px 32px) !important;
} 

toolbar[iconsize="small"] #button-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 64px 16px 48px);
}

toolbar[iconsize="small"] #button-newmessage:hover {
  -moz-image-region: rect(16px 64px 32px 48px);
} 

toolbar[iconsize="small"] #button-newmessage[disabled] {
  -moz-image-region: rect(32px 64px 48px 48px) !important;
} 

toolbar[iconsize="small"] #button-newim {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 80px 16px 64px);
}

toolbar[iconsize="small"] #button-newim:hover {
  -moz-image-region: rect(16px 80px 32px 64px);
} 

toolbar[iconsize="small"] #button-newim[disabled] {
  -moz-image-region: rect(32px 80px 48px 64px) !important;
} 

toolbar[iconsize="small"] #button-abdelete {
   list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 96px 16px 80px);
}

toolbar[iconsize="small"] #button-abdelete:hover {
  -moz-image-region: rect(16px 96px 32px 80px);
} 

toolbar[iconsize="small"] #button-abdelete[disabled] {
  -moz-image-region: rect(32px 96px 48px 80px) !important;
}

#abContent {
  text-shadow: none;
  background-color: -moz-Dialog;
  border-top: 1px solid ThreeDShadow;
}

/* ::::: directory pane adjustments ::::: */

#abDirTreeHeader {
}

#abDirTreeHeader-title {
  -moz-padding-start: 4px;
}

/* ::::: directory pane icons ::::: */

treechildren::-moz-tree-image(DirCol) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addrbook.png");
}

treechildren::-moz-tree-image(DirCol, IsMailList-true) {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/ablist.png");
}

treechildren::-moz-tree-image(DirCol, IsRemote-true) {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/remote-addrbook.png");
}

treechildren::-moz-tree-image(DirCol, IsRemote-true, IsSecure-true) {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/secure-remote-addrbook.png");
}

/* Don't use the listbox appearance as that gives us a blue-grey top border
   that collides with the primary toolbar border */
#dirTree {
  -moz-appearance:  none;
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#dirTree [sortDirection="ascending"],
#dirTree [sortDirection="descending"] {
  list-style-image: none;
}

/* ::::: splitters ::::: */

#results-splitter {
  -moz-margin-start: -1px;
}

#dirTree-splitter:-moz-locale-dir(rtl) {
  /* Don't draw the splitter's border here... */
  border-left: 0;
}

#abResultsTree:-moz-locale-dir(rtl),
#CardViewOuterBox:-moz-locale-dir(rtl){
  /* ... draw it here instead! (This removes the white highlight just below the
     folder pane splitter so everything looks pretty.) */
  margin-right: -2px !important;
  border-right: 2px solid;
  -moz-border-right-colors: ThreeDHighlight ThreeDShadow;
}

#abResultsTree:-moz-locale-dir(rtl) {
  /* Make sure we have a white dot in the top-left corner where the splitters
     meet. */
  margin-bottom: -2px;
  padding-bottom: 2px;
}

/* ::::: results pane ::::: */

#abResultsTree {
  -moz-appearance:  none;
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#GeneratedName {
  -moz-padding-start: 30px;
}

treechildren::-moz-tree-image(GeneratedName) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/abcard.png");
}

treechildren::-moz-tree-image(GeneratedName, MailList) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/ablist.png");
}

treechildren::-moz-tree-cell-text(GeneratedName) {
  -moz-padding-start: 0 !important;
}

/* ::::: card view pane ::::: */

#CardViewBox {
  -moz-user-focus: ignore;
  overflow: auto;
  min-width: 150px;
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#CardViewInnerBox {
  margin-top: 2px;
  margin-bottom: 2px;
  padding: 0 8px;
}

#CardTitle {
  font-size: 150%;
  font-weight: bold;
  border-bottom: 2px solid -moz-FieldText;
  min-width: 120px;
  margin: 0px;
}
 
.cardViewGroup {
  margin-top: 8px;
  padding-bottom: 5px;
  min-width: 50px;
}

.CardViewHeading {
  padding: 1px;
  -moz-padding-start: 5px;
  background-color: Highlight;
  color: HighlightText;
  font-weight: bold;
  min-width: 30px;
}

#cvBuddyIcon {
  -moz-padding-start: 20px;
  padding-top: 2px;
}

.CardViewText,
.CardViewLink {
  -moz-padding-start: 20px;
  -moz-padding-end: 2px;
  min-width: 30px;
  margin: 0px;
}

.CardViewLink {
  color: -moz-nativehyperlinktext;
  cursor: pointer;
}

#cvHomeMapIt, #cvWorkMapIt {
  margin-bottom: 0px;
}

html|a {
  -moz-padding-start: 0px;
  -moz-padding-end: 2px;
  border: none !important;
  text-decoration: underline;
}

html|p {
  border: none !important;
}
