/* 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://messenger/skin/shared/addressbook.css");

#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 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:-moz-lwtheme {
  color: inherit;
  text-shadow: inherit;
}

.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 {
  /* !important for overriding toolbarbutton.css */
  -moz-margin-start: 2px !important;
}

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

#button-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newlist");
}

#button-editcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#editcard");
}

#button-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newmessage");
}

#button-newim {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newim");
}

#button-abdelete {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#abdelete");
}

#ab-bar2[brighttext] #button-newcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newcard-inverted");
}

#ab-bar2[brighttext] #button-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newlist-inverted");
}

#ab-bar2[brighttext] #button-editcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#editcard-inverted");
}

#ab-bar2[brighttext] #button-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newmessage-inverted");
}

#ab-bar2[brighttext] #button-newim {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#newim-inverted");
}

#ab-bar2[brighttext] #button-abdelete {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.svg#abdelete-inverted");
}

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

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

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

#dirTree {
  -moz-appearance: -moz-mac-vibrancy-light;
  -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;
}

@media (-moz-mac-yosemite-theme) {
  #folderTree treechildren::-moz-tree-cell-text {
    font-family: 'Helvetica Neue';
  }

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

  #dirTree treechildren::-moz-tree-row(selected),
  #dirTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected),
  #dirTree treechildren:-moz-window-inactive::-moz-tree-row(selected) {
    background: rgba(0, 0, 0, .1);
  }
}

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

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

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

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

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

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

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

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

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

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

#blankResultsPaneMessageBox {
  -moz-border-start: 1px solid #bebebe;
}

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

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

spacer {
  display: none;
}

#cvHomeMapIt,
#cvWorkMapIt {
  margin-bottom: 0px;
  min-height: 19px; /* aqua size for small buttons */
}

#titlebar:not(:-moz-lwtheme),
#addressbookWindow[sizemode="fullscreen"] > #titlebar {
  display: none;
}

#titlebar-buttonbox-container {
  margin-top: 3px;
  -moz-margin-start: 7px;
}

#titlebar-spacer {
  display: -moz-box;
}
