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







@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

findbar {
  background: linear-gradient(#E8E8E8, #D0D0D0) repeat-x;
  border-top: 1px solid #888;
  min-width: 1px;
  padding: 4px 2px;
  transition-property: margin-bottom, opacity, visibility;
  transition-duration: 150ms, 150ms, 0s;
  transition-timing-function: ease-in-out, ease-in-out, linear;
}

findbar[hidden] {
  /* Override display:none to make the transition work. */
  display: -moz-box;
  visibility: collapse;
  margin-bottom: -1em;
  opacity: 0;
  transition-delay: 0s, 0s, 150ms;
}

findbar:-moz-lwtheme {
  -moz-appearance: none;
  background: none;
  border-style: none;
}

label.findbar-find-fast {
  margin: 1px 3px 0 !important;
  color: #6D6D6D;
  font-weight: bold;
  text-shadow: 0 1px rgba(255, 255, 255, .4);
}

label.findbar-find-fast:-moz-lwtheme,
.findbar-find-status:-moz-lwtheme {
  color: inherit;
  text-shadow: inherit;
}

.findbar-closebutton {
  padding: 0;
  margin: 0 4px;
  list-style-image: url("chrome://global/skin/icons/close.png");
  border: none;
  -moz-image-region: rect(0, 16px, 16px, 0);
}

.findbar-closebutton:hover {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

.findbar-closebutton:hover:active {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

@media (min-resolution: 2dppx) {
  .findbar-closebutton {
    list-style-image: url("chrome://global/skin/icons/close@2x.png");
    -moz-image-region: rect(0, 32px, 32px, 0);
  }

  .findbar-closebutton:hover {
    -moz-image-region: rect(0, 64px, 32px, 32px);
  }

  .findbar-closebutton:hover:active {
    -moz-image-region: rect(0, 96px, 32px, 64px);
  }

  .findbar-closebutton > .toolbarbutton-icon {
    width: 16px;
  }
}

.findbar-find-next,
.findbar-find-previous,
.findbar-highlight {
  margin: 0 4px;
  padding: 1px 3px;
  -moz-appearance: none;
  border-radius: 10000px;
  border: 1px solid rgba(0,0,0,.35);
  background: linear-gradient(#f6f6f6, #e9e9e9);
  box-shadow: 0 1px rgba(255,255,255,.5), inset 0 1px 1px rgba(255,255,255,.5);
  color: buttontext;
}

.findbar-container > toolbarbutton:-moz-focusring {
  position: relative;
  box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 1.5px 1px -moz-mac-focusring, 0 1px rgba(255,255,255,.5), inset 0 1px 1px rgba(255,255,255,.5);
}

.findbar-container > toolbarbutton > .toolbarbutton-text {
  margin: 0 6px !important;
}

.findbar-container > toolbarbutton[disabled] {
  color: GrayText !important;
}

.findbar-find-next:not([disabled]):hover:active,
.findbar-find-previous:not([disabled]):hover:active,
.findbar-highlight:not([disabled]):hover:active {
  text-shadow: 0 1px rgba(255, 255, 255, .4);
  background: #dadada;
  box-shadow: 0 1px rgba(255,255,255,.4), inset 0 1px 3px rgba(0,0,0,.2);
}

.findbar-container > toolbarbutton:hover:active:-moz-focusring {
  text-shadow: 0 1px rgba(255, 255, 255, .4);
  background: #dadada;
  box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 1.5px 1px -moz-mac-focusring, 0 1px rgba(255,255,255,.4), inset 0 1px 3px rgba(0,0,0,.2);
}

.findbar-closebutton > .toolbarbutton-text {
  display: none;  
}

/* Match case checkbox */

.findbar-container > checkbox {
  list-style-image: url("chrome://global/skin/icons/checkbox.png");
  -moz-image-region: rect(0px 16px 16px 0px);
  -moz-appearance: none;
  margin: 0 2px;
  -moz-margin-start: 7px;
}

.findbar-container > checkbox:hover:active {
  -moz-image-region: rect(0px 32px 16px 16px);
}
.findbar-container > checkbox[checked] {
  -moz-image-region: rect(0px 48px 16px 32px);
}
.findbar-container > checkbox[checked]:hover:active {
  -moz-image-region: rect(0px 64px 16px 48px);
}

@media (min-resolution: 2dppx) {
  .findbar-container > checkbox {
    list-style-image: url("chrome://global/skin/icons/checkbox@2x.png");
    -moz-image-region: rect(0px 32px 32px 0px);
  }

  .findbar-container > checkbox:hover:active {
    -moz-image-region: rect(0px 64px 32px 32px);
  }
  .findbar-container > checkbox[checked] {
    -moz-image-region: rect(0px 96px 32px 64px);
  }
  .findbar-container > checkbox[checked]:hover:active {
    -moz-image-region: rect(0px 128px 32px 96px);
  }
}



.findbar-container > checkbox > .checkbox-check {
  display: none;
}

.findbar-container > checkbox > .checkbox-label-box > .checkbox-label {
  margin: 0 !important;
  padding: 2px 0 0;
}

.findbar-container > checkbox > .checkbox-label-box > .checkbox-icon {
  -moz-padding-start: 1px;
  padding-bottom: 1px;
}
@media (min-resolution: 2dppx) {
  .findbar-container > checkbox > .checkbox-label-box > .checkbox-icon {
    width: 17px;
    height: 17px;
  }
}

.findbar-container > checkbox:-moz-focusring > .checkbox-label-box > .checkbox-icon {
  border-radius: 4px;
  box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 1.5px 1px -moz-mac-focusring;
}

/* Search field */

.findbar-textbox {
  -moz-appearance: none;
  border-radius: 10000px;
  border: none;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .7) inset,
              0 0 0 1px rgba(0, 0, 0, .17) inset;
  background: url("chrome://global/skin/icons/search-textbox.png") -moz-Field no-repeat 5px center;
  margin: 0 4px -1px;
  padding: 3px 8px 2px;
  -moz-padding-start: 19px;
}

.findbar-textbox:not([focused="true"]):-moz-lwtheme {
  opacity: 0.9;
}

.findbar-textbox[focused="true"] {
  box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 1.5px 1px -moz-mac-focusring,
              0 1px 1.5px rgba(0, 0, 0, .8) inset;
}

.findbar-textbox[flash="true"] {
  background-color: #F7E379;
}

.findbar-textbox[status="notfound"] {
  background-color: #FD919B;
  color: #FFF;
}

/* find-next button */

.findbar-find-next {
  -moz-border-end: none;
  -moz-margin-end: 0 !important;
}

.findbar-find-next:-moz-locale-dir(ltr),
.findbar-find-previous:-moz-locale-dir(rtl) {
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
}

/* find-previous button */

.findbar-find-previous {
  -moz-margin-start: 0 !important;
}

.findbar-find-previous:-moz-locale-dir(ltr),
.findbar-find-next:-moz-locale-dir(rtl) {
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

/* highlight button */

.findbar-highlight {
  -moz-margin-start: 8px;
}

.findbar-highlight > .toolbarbutton-icon {
  width: 13px;
  height: 8px;
  margin: 0 4px;
  -moz-margin-end: 0;
  border: 1px solid #818181;
  border-radius: 4px;
  background-color: #F4F4F3;
}


.findbar-highlight[checked="true"] > .toolbarbutton-icon {
  background-color: #FFFF00;
  border-color: #818100;
}

.find-status-icon {
  display: none;
}

.find-status-icon[status="pending"] {
  display: block;
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
}

.findbar-find-status {
  color: #436599;
  font-weight: bold;
  text-shadow: 0 1px rgba(255, 255, 255, .4);
  margin: 1px 1px 0 !important;
  -moz-margin-start: 12px !important;
}
