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

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

#ab-bar2 {
  padding: 0 4px;
}

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

.toolbarbutton-1:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  height: 22px;
  padding: 0;
  border: 0;
}

.toolbarbutton-1[type="menu"] {
  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-vertical");
}

toolbox[labelalign="end"] .toolbarbutton-1[type="menu"],
toolbox[labelalign="end"] toolbarpaletteitem .toolbarbutton-1[type="menu"] {
  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu");
}

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

.toolbarbutton-1 > .toolbarbutton-menubutton-button,
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  margin: 0;
}

.toolbarbutton-1 {
  margin: 2px 4px;
}

.toolbarbutton-1[open],
.toolbarbutton-1[open] > .toolbarbutton-menubutton-button {
  text-shadow: none;
}

.toolbarbutton-1:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button {
  -moz-box-orient: vertical;
}

toolbarbutton[type="menu-button"],
toolbox[mode="text"] .toolbarbutton-1,
toolbox[mode="text"] .toolbarbutton-menubutton-button,
toolbox[mode="text"] .toolbarbutton-menubutton-dropmarker,
toolbox[labelalign="end"] .toolbarbutton-1,
toolbox[labelalign="end"] toolbarpaletteitem .toolbarbutton-1,
toolbox[labelalign="end"] .toolbarbutton-1[type="menu-button"]
  > .toolbarbutton-menubutton-button,
toolbox[labelalign="end"] toolbarpaletteitem
  .toolbarbutton-1[type="menu-button"] > .toolbarbutton-menubutton-button {
  -moz-box-orient: horizontal;
}

toolbox[labelalign="end"] .toolbarbutton-1 .toolbarbutton-text {
  -moz-margin-start: 2px;
}

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

.toolbarbutton-1[checked="true"] > .toolbarbutton-text {
  color: #0969b2;
  text-shadow: 1px 1px 0 white;
}

.toolbarbutton-1:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button {
  min-width: 28px;
}

toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button {
  min-width: 0;
}

.toolbarbutton-1 > .toolbarbutton-icon,
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
  width: 18px;
  height: 18px;
  margin: 2px;
}

.toolbarbutton-1[disabled="true"] .toolbarbutton-text,
.toolbarbutton-1[disabled="true"] > .toolbarbutton-icon,
.toolbarbutton-1[type="menu-button"] > .toolbarbutton-menubutton-button[disabled="true"]
  > .toolbarbutton-icon {
  opacity: .4;
}

.toolbarbutton-1 > .toolbarbutton-menu-dropmarker,
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  list-style-image: url(chrome://messenger/skin/icons/toolbarbutton-dropmarker.png) !important;
}

/* Separator between menu and split type buttons */
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker::before {
  content: "";
  display: -moz-box;
  width: 1px;
  height: 18px;
  -moz-margin-start: -6px;
  -moz-margin-end: 5px;
  margin-bottom: 2px;
  background: hsla(0, 0%, 0%, .3) padding-box;
  box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .2);
}

toolbar[mode="icons"] .toolbarbutton-1 >
.toolbarbutton-menubutton-dropmarker::before {
  -moz-margin-start: -8px;
}

@media (-moz-mac-lion-theme) {
  .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon,
  .toolbarbutton-1[type="menu-button"]
    > .toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon,
  .toolbarbutton-1[disabled="true"] > .toolbarbutton-menu-dropmarker,
  .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-dropmarker
    > .dropmarker-icon,
  .toolbarbutton-1:not(:hover):-moz-window-inactive .toolbarbutton-icon,
  .toolbarbutton-1:not(:hover):-moz-window-inactive
    > .toolbarbutton-menu-dropmarker,
  .toolbarbutton-1:not(:hover):-moz-window-inactive
    > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
    opacity: .5;
  }

  .toolbarbutton-1:-moz-window-inactive[disabled="true"] > .toolbarbutton-icon,
  .toolbarbutton-1:-moz-window-inactive[type="menu-button"]
    > .toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon {
    opacity: .25;
  }

  .toolbarbutton-1 > .toolbarbutton-menu-dropmarker,
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    list-style-image: url(chrome://messenger/skin/icons/toolbarbutton-dropmarker-lion.png) !important;
  }
}

.toolbarbutton-1 > .toolbarbutton-menu-dropmarker {
  -moz-margin-end: 1px;
}

.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  width: 16px;
  padding: 2px 4px !important;
}

toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  width: auto;
}

toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
  margin-top: 1px;
}

#ab-toolbox > toolbar {
  /* force iconsize="small" on these toolbars */
  counter-reset: smallicons;
}

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

#button-newcard:not([disabled="true"]):active {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(18px 18px 36px 0px);
}

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

#button-newlist:not([disabled="true"]):active {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(18px 36px 36px 18px);
}

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

#button-editcard:not([disabled="true"]):active {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(18px 54px 36px 36px);
}

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

#button-newmessage:not([disabled="true"]):active {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(18px 72px 36px 54px);
}

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

#button-newim:not([disabled="true"]):active {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(18px 90px 36px 72px);
}

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

#button-abdelete:not([disabled="true"]):active {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(18px 108px 36px 90px);
}

#abContent {
  color: -moz-DialogText;
  text-shadow: none;
  background-color: -moz-Dialog;
}

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

#abDirTreeHeader {
  -moz-appearance: treeheadercell;
  height: 16px;
}

#dirTree {
  border-right: 1px solid #bebebe;
}

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

#dirTree treechildren::-moz-tree-row(selected) {
  background: url("chrome://messenger/skin/icons/sidebar-item.png") 0 0 repeat-x #90A0C0;
}

#dirTree treechildren::-moz-tree-row(selected, focus) {
  background-position: 0 -18px;
}

#dirTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected) {
  background-position: 0 -36px;
}

#dirTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected, focus) {
  background-position: 0 -54px;
}

#dirTree treechildren:-moz-window-inactive::-moz-tree-row(selected) {
  background-position: 0 -72px;
}

#dirTree treechildren::-moz-tree-cell-text(selected, focus), #dirTree treechildren::-moz-tree-cell-text(selected) {
  color: #FFFFFF;
}

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");
}

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

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

splitter {
  background-color: transparent;
  width: 7px;
  min-width: 7px;
  min-height: 7px;
}

/*

#threadpane-splitter {
  height: 7px !important;
  min-height: 7px;
}

*/

#dirTree-splitter,
#results-splitter {
  height: 7px !important;
  min-height: 7px;
}

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

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

#abResultsTree {
  border-left: 1px solid #bebebe;
  border-bottom: 1px solid #bebebe;
}

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

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

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

#CardViewOuterBox {
  margin: 0px;
  padding: 0px;
}

#CardViewBox {
  -moz-user-focus: ignore;
  overflow: auto;
  min-width: 150px;
  margin: 0px;
  padding: 0px;
  border-top: 1px solid #8E8E8E;
  border-left: 1px solid #BEBEBE;
}

#CardViewInnerBox {
  background-color: #FFFFFF;
}

#CardViewInnerBox > hbox {
  background-color: #FFFFFF;
}

#CardTitle {
  margin: 6px;
  padding: 4px;
  -moz-box-pack: center;
  font-size: 150%;
  font-weight: bold;

}

.cardViewGroup {
  margin: 0px;
  padding: 6px;
  min-width: 50px;
}

.CardViewHeading {
  padding: 3px 5px;
  font: icon;
  font-weight: bold;
  min-width: 30px;
  color: #505050;
}

#cvPhoto {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/contact-generic.png");
}

#cvbPhone, #cvbWork {
    border-left: 1px solid #D1D1D1;
}

spacer {
     display: none;
}


#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;
  min-height: 19px; /* aqua size for small buttons */
}

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

html|p {
  border: none !important;
}
