/* 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/");

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

#ab-bar2:-moz-lwtheme {
  padding-top: 22px;
}

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

.toolbarbutton-1:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  height: 22px;
  padding: 0 4px;
  border: 1px transparent solid;
  border-radius: 3px;
  transition-property: background, border-color;
  transition-duration: 250ms;
}

.toolbarbutton-1:not([type="menu-button"]):hover:not([disabled]),
.toolbarbutton-1:hover:not([disabled]) > .toolbarbutton-menubutton-button,
.toolbarbutton-1[open="true"]:not([disabled]) > .toolbarbutton-menubutton-button,
.toolbarbutton-menubutton-button:active + .toolbarbutton-menubutton-dropmarker,
.toolbarbutton-1:hover:not([disabled]) > .toolbarbutton-menubutton-dropmarker {
  border-color: hsla(0, 0%, 0%, .2);
  background: hsla(0, 0%, 100%, .1) linear-gradient(hsla(0, 0%, 100%, .3),
              hsla(0, 0%, 100%,.1)) padding-box;
  box-shadow: 0 1px 0 hsla(0, 0%, 100%, .5), 0 1px 0 hsla(0, 0%, 100%, .5) inset;
}

.toolbarbutton-1[checked="true"],
.toolbarbutton-1:active:not([disabled]):not([type="menu-button"]),
.button-appmenu[open="true"],
.toolbarbutton-1:not([disabled]) > .toolbarbutton-menubutton-button:active,
.toolbarbutton-1[open="true"] >
.toolbarbutton-menubutton-dropmarker:not([disabled="true"]) {
  background-color: transparent !important;
  background: hsla(0, 0%, 0%, .02) linear-gradient(hsla(0, 0%, 0%, .12),
              hsla(0, 0%, 0%, 0)) border-box;
  border-color: hsla(0, 0%, 0%, .3);
  box-shadow: 0 1px 0 hsla(0, 0%, 100%, .5),
              0 1px 0 hsla(0, 0%, 0%, .05) inset,
              0 1px 1px hsla(0, 0%, 0%, .2) inset;
  transition-duration: 10ms;
}

.toolbarbutton-1 > .toolbarbutton-menubutton-button {
  -moz-border-end: none;
}

.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  -moz-border-end: none;
}

.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 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: 4px 2px;
  margin-bottom: 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;
}

.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:not(:hover):not(:active):not([open]):not([checked]) >
.toolbarbutton-menubutton-dropmarker::before,
.toolbarbutton-1[disabled="true"] >
.toolbarbutton-menubutton-dropmarker::before {
  content: "";
  display: -moz-box;
  width: 1px;
  height: 18px;
  -moz-margin-start: -5px;
  -moz-margin-end: 4px;
  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;
  }
}

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

  .toolbarbutton-menu-dropmarker > .dropmarker-icon,
  .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
    width: 7px;
    height: 5px;
  }
}

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

@media (min-resolution: 2dppx) {
  #button-newcard {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar@2x.png");
    -moz-image-region: rect(0px 36px 36px 0px);
  }

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

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

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

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

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

  #button-newmessage {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar@2x.png");
    -moz-image-region: rect(0px 144px 36px 108px);
  }

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

  #button-newim {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar@2x.png");
    -moz-image-region: rect(0px 180px 36px 144px);
  }

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

  #button-abdelete {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar@2x.png");
    -moz-image-region: rect(0px 216px 36px 180px);
  }

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

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

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

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

#dirTree {
  -moz-border-end: 1px solid #bdbdbd;
  background-color: #E2E7ED
}

#dirTree treechildren::-moz-tree-row {
  padding-bottom: 1px;
  background-color: transparent;
}

#dirTree treechildren::-moz-tree-row(selected) {
  background: linear-gradient(#bbc5d7 6%, #c3cbe0 6%, #bdc6dd 7%,
                              #9ca9c6 95%, #939fba 100%);
}

#dirTree treechildren::-moz-tree-row(selected, focus) {
  background: linear-gradient(#5ea3df 6%, #73b8ea 6%, #6cafe5 7%,
                              #3984d2 95%, #3577c2 100%);
}

#dirTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected, focus) {
  background: -moz-linear-gradient(#7b8b9e 6%, #93a3b4 6%, #8fa0b1 7%,
                                   #587088 95%, #536b84 100%);
}

#dirTree treechildren::-moz-tree-cell-text(selected),
#dirTree treechildren::-moz-tree-cell-text(selected, focus) {
  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");
}

@media (min-resolution: 2dppx) {
  treechildren::-moz-tree-image(DirCol) {
    width: 16px;
    height: 16px;
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook@2x.png");
    -moz-image-region: rect(0px 32px 32px 0px);
  }

  treechildren::-moz-tree-image(DirCol, IsMailList-true) {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook@2x.png");
    -moz-image-region: rect(0px 64px 32px 32px);
  }

  treechildren::-moz-tree-image(DirCol, IsRemote-true) {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook@2x.png");
    -moz-image-region: rect(0px 96px 32px 64px);
  }

  treechildren::-moz-tree-image(DirCol, IsRemote-true, IsSecure-true) {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook@2x.png");
    -moz-image-region: rect(0px 128px 32px 96px);
  }
}

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

@media (min-resolution: 2dppx) {
  treechildren::-moz-tree-image(GeneratedName) {
    width: 16px;
    height: 16px;
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook@2x.png");
    -moz-image-region: rect(0px 160px 32px 128px);
  }

  treechildren::-moz-tree-image(GeneratedName, MailList) {
    list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook@2x.png");
    -moz-image-region: rect(0px 64px 32px 32px);
  }
}

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