/* 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.png");
  -moz-image-region: rect(0px 378px 18px 360px);
}

#qfb-show-filter-bar:not([disabled="true"]):active {
  -moz-image-region: rect(18px 378px 36px 360px);
}

#qfb-show-filter-bar[checked="true"] {
  -moz-image-region: rect(36px 378px 54px 360px);
}

@media (min-resolution: 2dppx) {
  #qfb-show-filter-bar {
    list-style-image: url("chrome://messenger/skin/icons/mail-toolbar@2x.png");
    -moz-image-region: rect(0px 756px 36px 720px);
  }

  #qfb-show-filter-bar:not([disabled="true"]):active {
    -moz-image-region: rect(36px 756px 72px 720px);
  }

  #qfb-show-filter-bar[checked="true"] {
    -moz-image-region: rect(72px 756px 108px 720px);
  }
}

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

#quick-filter-bar {
  height: 25px;
}

#quick-filter-bar-main-bar {
  background: linear-gradient(#f3f3f3, #ebebeb);
  border-bottom: 1px solid #bebebe;
}

#quick-filter-bar-expando {
  border-top: 1px solid #f9faf9;
  background: #eaeaea;
}

#quick-filter-bar-main-bar:-moz-window-inactive,
#quick-filter-bar-expando:-moz-window-inactive {
  background-color: -moz-mac-chrome-inactive;
  background-image: none;
}

#quick-filter-bar[filterActive="matches"] {
}

#threadTree[filterActive="matches"] {
  background: repeating-linear-gradient(to bottom, #ecf3fe 0, #ecf3fe 18px, white 18px, white 36px);
}

#quick-filter-bar[filterActive="nomatches"] {
  background: linear-gradient(#ffcccc, #fd929d);
}

#threadTree[filterActive="nomatches"] {
  background: repeating-linear-gradient(to bottom, #fff0f4, #fff0f4 18px, white 18px, white 36px);
}

#qfb-filter-label {
  color: #888;
  font-weight: bold;
}

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

#quick-filter-bar toolbarbutton {
  color: #444;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  height: 16px;
  font-weight: bold;
  padding: 0 4px;
  margin: 1px 3px;
  border-radius: 8px;
  border: 0;
}

#quick-filter-bar toolbarbutton[checked="true"] {
  background-image: linear-gradient(#999999, #858585);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  color: #efefef !important;
  text-shadow: 0 1px rgba(0, 0, 0, .4);
}

#quick-filter-bar-main-bar toolbarbutton > .toolbarbutton-icon {
  padding: 0;
  margin: 0;
  width: 14px;
  height: 14px;
}

#quick-filter-bar toolbarbutton > .toolbarbutton-text {
  padding: 0;
  margin: 0 2px;
}

#qfb-sticky {
  width: 16px;
  -moz-margin-start: 6px !important;
  list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar.png");
  -moz-image-region: rect(0px 14px 14px 0px);
}

#qfb-sticky:active {
  border-radius: 2px;
  -moz-image-region: rect(14px 14px 28px 0px);
}

#qfb-sticky[checked] {
  border-radius: 2px;
  -moz-image-region: rect(28px 14px 42px 0px);
}

/* we use both IDs so we are more precise than the other # toolbarbutton rules */
#quick-filter-bar #qfb-sticky > .toolbarbutton-text {
  margin: 0;
}

#qfb-unread {
  list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar.png");
  -moz-image-region: rect(0px 28px 14px 14px);
}

#qfb-unread:active {
  -moz-image-region: rect(14px 28px 28px 14px);
}

#qfb-unread[checked] {
  -moz-image-region: rect(28px 28px 42px 14px);
}

#qfb-starred {
  list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar.png");
  -moz-image-region: rect(0px 42px 14px 28px);
}

#qfb-starred:active {
  -moz-image-region: rect(14px 42px 28px 28px);
}

#qfb-starred[checked] {
  -moz-image-region: rect(28px 42px 42px 28px);
}

#qfb-inaddrbook {
  list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar.png");
  -moz-image-region: rect(0px 56px 14px 42px);
}

#qfb-inaddrbook:active {
  -moz-image-region: rect(14px 56px 28px 42px);
}

#qfb-inaddrbook[checked] {
  -moz-image-region: rect(28px 56px 42px 42px);
}

#qfb-tags {
  list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar.png");
  -moz-image-region: rect(0px 70px 14px 56px);
}

#qfb-tags:active {
  -moz-image-region: rect(14px 70px 28px 56px);
}

#qfb-tags[checked] {
  -moz-image-region: rect(28px 70px 42px 56px);
}

#qfb-attachment {
  list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar.png");
  -moz-image-region: rect(0px 84px 14px 70px);
}

#qfb-attachment:active {
  -moz-image-region: rect(14px 84px 28px 70px);
}

#qfb-attachment[checked] {
  -moz-image-region: rect(28px 84px 42px 70px);
}

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

  #qfb-sticky:active {
    border-radius: 2px;
    -moz-image-region: rect(28px 28px 56px 0px);
  }

  #qfb-sticky[checked] {
    border-radius: 2px;
    -moz-image-region: rect(56px 28px 84px 0px);
  }

  #qfb-unread {
    list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar@2x.png");
    -moz-image-region: rect(0px 56px 28px 28px);
  }

  #qfb-unread:active {
    -moz-image-region: rect(28px 56px 56px 28px);
  }

  #qfb-unread[checked] {
    -moz-image-region: rect(56px 56px 84px 28px);
  }

  #qfb-starred {
    list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar@2x.png");
    -moz-image-region: rect(0px 84px 28px 56px);
  }

  #qfb-starred:active {
    -moz-image-region: rect(28px 84px 56px 56px);
  }

  #qfb-starred[checked] {
    -moz-image-region: rect(56px 84px 84px 56px);
  }

  #qfb-inaddrbook {
    list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar@2x.png");
    -moz-image-region: rect(0px 112px 28px 84px);
  }

  #qfb-inaddrbook:active {
    -moz-image-region: rect(28px 112px 56px 84px);
  }

  #qfb-inaddrbook[checked] {
    -moz-image-region: rect(56px 112px 84px 84px);
  }

  #qfb-tags {
    list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar@2x.png");
    -moz-image-region: rect(0px 140px 28px 112px);
  }

  #qfb-tags:active {
    -moz-image-region: rect(28px 140px 56px 112px);
  }

  #qfb-tags[checked] {
    -moz-image-region: rect(56px 140px 84px 112px);
  }

  #qfb-attachment {
    list-style-image: url("chrome://messenger/skin/icons/QFB-toolbar@2x.png");
    -moz-image-region: rect(0px 168px 28px 140px);
  }

  #qfb-attachment:active {
    -moz-image-region: rect(28px 168px 56px 140px);
  }

  #qfb-attachment[checked] {
    -moz-image-region: rect(56px 168px 84px 140px);
  }
}

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

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

#qfb-qs-textbox {
  margin-top: 3px;
  margin-bottom: 3px;
}

#qfb-qs-label {
  color: #6b6b6b;
}
