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


@import url("chrome://messenger/content/quickFilterBar.css");

/* :::: Filter Tab Bar Button :::: */

#qfb-show-filter-bar {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar-small.png");
  -moz-image-region: rect(0px 336px 16px 320px);
}

toolbar[iconsize="large"] #qfb-show-filter-bar {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.png");
  -moz-image-region: rect(0px 504px 24px 480px);
}

#qfb-show-filter-bar[disabled="true"] {
  -moz-image-region: rect(32px 336px 48px 320px);
}

toolbar[iconsize="large"] #qfb-show-filter-bar[disabled="true"] {
  -moz-image-region: rect(48px 504px 72px 480px);
}

#qfb-show-filter-bar > .toolbarbutton-icon {
  padding: 0 3px;
}

/* ::::: QFB button on main toolbar ::::: */

#mail-toolbox #qfb-show-filter-bar {
  margin: 0;
  padding-top: 5px;
  padding-bottom: 6px;
  -moz-padding-start: 4px;
  -moz-padding-end: 5px;
}

#mail-toolbox #qfb-show-filter-bar[open="true"],
#mail-toolbox #qfb-show-filter-bar:hover:active {
  padding-top: 6px;
  padding-bottom: 5px;
  -moz-padding-start: 5px;
  -moz-padding-end: 4px;
}

#mail-toolbox #qfb-show-filter-bar[checked="true"] {
  padding-top: 6px !important;
  padding-bottom: 5px !important;
  -moz-padding-start: 5px !important;
  -moz-padding-end: 4px !important;
}

#mail-toolbox #qfb-show-filter-bar[style="visibility: hidden;"] {
  color: GrayText;
  text-shadow: none;
}

toolbox[labelalign="end"] #qfb-show-filter-bar {
  -moz-box-orient: horizontal;
}

/* :::: Filter Bar :::: */

#quick-filter-bar-main-bar {
  border-top: 1px solid ThreeDHighlight;
  border-bottom: 1px solid ThreeDShadow;
}

#quick-filter-bar-main-bar:-moz-system-metric(windows-default-theme) {
  background-color: ThreeDFace;
  border-top: 1px solid #fff;
  border-bottom: 2px solid;
  -moz-border-bottom-colors: #9196a2 #fff;
}

#quick-filter-bar-expando:-moz-system-metric(windows-default-theme) {
  background-color: ThreeDFace;
}

#quick-filter-bar-tab-bar,
#quick-filter-bar-filter-text-bar {
  border-top: 1px solid ThreeDHighlight;
  border-bottom: 1px solid ThreeDShadow;
}

#quick-filter-bar-tab-bar:-moz-system-metric(windows-default-theme),
#quick-filter-bar-filter-text-bar:-moz-system-metric(windows-default-theme) {
  border-top: 1px solid #fff;
  border-bottom: 2px solid;
  -moz-border-bottom-colors: #9196a2 #fff;
}

#quick-filter-bar[filterActive="searching"] {
  
}
#threadTree[filterActive="searching"] {
  background-color: #ffffcc;
}

#quick-filter-bar[filterActive="matches"] {
  
}
#threadTree[filterActive="matches"] {
  background-color: #f2f9fc;
}

#quick-filter-bar[filterActive="nomatches"] {
  
}
#threadTree[filterActive="nomatches"] {
  background: -moz-repeating-linear-gradient(top left -45deg, #fff0f4, #fff0f4 5px, white 5px, white 10px);
}

/* :::: Filter Buttons :::: */

#quick-filter-bar-main-bar toolbarbutton {
  -moz-margin-start: 1px;
  -moz-margin-end: 1px;
}

/* keep that hideous outline focus ring from showing on the checked buttons */
#quick-filter-bar-main-bar toolbarbutton:focus {
  outline: none;
}

#qfb-filter-label:-moz-system-metric(windows-default-theme) {
  color: GrayText;
}

#qfb-sticky {
  list-style-image: url("chrome://messenger/skin/icons/xp-pin-grey.png");
}

#qfb-sticky[checked] {
  list-style-image: url("chrome://messenger/skin/icons/xp-pin-red.png");
}

#qfb-unread {
  list-style-image: url("chrome://messenger/skin/icons/readmail.png");
}

#qfb-unread[checked] {
  list-style-image: url("chrome://messenger/skin/icons/unreadmail.png");
}

#qfb-starred {
  list-style-image: url("chrome://messenger/skin/icons/flag-empty.png");
}

#qfb-starred[checked] {
  list-style-image: url("chrome://messenger/skin/icons/flag.png");
}

.qfb-starred-nostar {
  list-style-image: url("chrome://messenger/skin/starContact.png");
  -moz-image-region:rect(0px 32px 16px 16px);
}

#qfb-inaddrbook {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/abcard.png");
}

#qfb-tags {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar-small.png");
  -moz-image-region: rect(0px 256px 16px 240px);
}

#qfb-tags[disabled] {
  -moz-image-region: rect(48px, 384px, 72px, 360px) !important;
}

#qfb-attachment {
  list-style-image: url("chrome://messenger/skin/icons/attachment-col.png");
}

#quick-filter-bar[filterActive="matches"] #qfb-results-label {
  color: green;
}

#quick-filter-bar[filterActive="nomatches"] #qfb-results-label {
  color: #f66;
}

#quick-filter-bar-expando toolbarbutton,
#quick-filter-bar-expando toolbarbutton[checked] {
  -moz-padding-end: 6px !important;
  padding-top: 1px;
  padding-bottom: 1px;
  -moz-margin-start: 1px;
  -moz-margin-end: 1px;
}
