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

%include shared.inc
%include ../../shared/findBar.inc.css

findbar {
  background: @scopeBarBackground@;
  border-top: @scopeBarSeparatorBorder@;
}

.findbar-container {
  padding-inline-start: 2px;
}

label.findbar-find-fast {
  color: @scopeBarTitleColor@;
  margin: 0;
  margin-inline-start: 12px;
}

label.findbar-find-fast:-moz-lwtheme {
  color: inherit;
}

.findbar-closebutton {
  margin-inline-start: 4px;
  margin-inline-end: 0;
  padding-inline-start: 0;
  padding-inline-end: 8px;
  border: none;
  /* make sure the closebutton is displayed as the first element in the bar: */
  -moz-box-ordinal-group: 0;
}

.findbar-find-next:not(:-moz-lwtheme),
.findbar-find-previous:not(:-moz-lwtheme),
.findbar-button {
  border-style: @roundButtonBorderStyle@;
  border-color: @roundButtonBorderColor@;
  color: @roundButtonColor@;
  background: @roundButtonBackground@;
}

.findbar-button {
  -moz-appearance: none;
  border-width: @roundButtonBorderWidth@;
  margin-inline-end: 5px;
  padding: 2px 9px;
  border-radius: 10000px;
}

.findbar-find-next:-moz-lwtheme,
.findbar-find-previous:-moz-lwtheme {
  border-color: var(--lwt-toolbar-field-border-color, @roundButtonBorderColor@);
}

.findbar-find-next:not(:-moz-lwtheme):not([disabled]):hover:active,
.findbar-find-previous:not(:-moz-lwtheme):not([disabled]):hover:active,
.findbar-button:not([disabled]):hover:active,
.findbar-button:not([disabled])[checked="true"] {
  background: @roundButtonPressedBackground@;
  box-shadow: @roundButtonPressedShadow@;
}

@media (-moz-mac-yosemite-theme: 0) {
  .findbar-textbox,
  .findbar-find-next {
    border-radius: 10000px;
  }
}

.findbar-textbox {
  border: @roundButtonBorderWidth@ @roundButtonBorderStyle@ var(--lwt-toolbar-field-border-color, @roundButtonBorderColor@);
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  fill-opacity: 0.8;
  background-image: url("chrome://global/skin/icons/search-textbox.svg");
  background-repeat: no-repeat;
  background-position: 5px center;
  margin: 0;
  padding-inline-start: 19px;
}

.findbar-textbox[focused="true"] {
  box-shadow: 0 0 0 1px var(--toolbar-field-focus-border-color) inset,
              0 0 0 1px var(--toolbar-field-focus-border-color);
}

.findbar-textbox:-moz-locale-dir(rtl) {
  background-position-x: right 5px;
}
