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

.contentSearchSuggestionTable {
  background-color: hsla(0,0%,100%,.99);
  border: 1px solid hsla(0, 0%, 0%, .2);
  border-top: none;
  box-shadow: 0 5px 10px hsla(0, 0%, 0%, .1);
  position: absolute;
  left: 0;
  z-index: 1001;
  -moz-user-select: none;
  cursor: default;
}

.contentSearchSuggestionTable:-moz-dir(rtl) {
  left: auto;
  right: 0;
}

.contentSearchSuggestionsList {
  border-bottom: 1px solid hsl(0, 0%, 92%);
  width: 100%;
  height: 100%;
}

.contentSearchSuggestionTable,
.contentSearchSuggestionsList {
  border-spacing: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  text-align: start;
}

.contentSearchHeaderRow,
.contentSearchSuggestionRow {
  margin: 0;
  max-width: inherit;
  padding: 0;
}

.contentSearchHeaderRow > td > img,
.contentSearchSuggestionRow > td > .historyIcon {
  margin-inline-end: 8px;
  margin-bottom: -3px;
}

.contentSearchSuggestionTable .historyIcon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-image: url("chrome://browser/skin/search-history-icon.svg#search-history-icon");
}

.contentSearchSuggestionRow.selected > td > .historyIcon {
  background-image: url("chrome://browser/skin/search-history-icon.svg#search-history-icon-active");
}

.contentSearchHeader > img {
  height: 16px;
  width: 16px;
  margin: 0;
  padding: 0;
}

.contentSearchSuggestionRow.remote > td > .historyIcon {
  visibility: hidden;
}

.contentSearchSuggestionRow.selected {
  background-color: Highlight;
  color: HighlightText;
}

.contentSearchHeader,
.contentSearchSuggestionEntry {
  margin: 0;
  max-width: inherit;
  overflow: hidden;
  padding: 4px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 75%;
}

.contentSearchHeader {
  background-color: hsl(0, 0%, 97%);
  color: #666;
  border-bottom: 1px solid hsl(0, 0%, 92%);
}

.contentSearchSuggestionsContainer {
  margin: 0;
  padding: 0;
  border-spacing: 0;
  width: 100%;
}

.contentSearchSearchWithHeaderSearchText {
  white-space: pre;
  font-weight: bold;
}

.contentSearchOneOffItem {
  -moz-appearance: none;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gofECQNNVW2/AAAABBJREFUGFdjOHPmzH8GehEA/KpKg9YTf4AAAAAASUVORK5CYII=');
  background-repeat: no-repeat;
  background-position: right center;
}

.contentSearchOneOffItem:-moz-dir(rtl) {
  background-position: left center;
}

.contentSearchOneOffItem > img {
  width: 16px;
  height: 16px;
  margin-bottom: -2px;
}

.contentSearchOneOffItem:not(.last-row) {
  border-bottom: 1px solid hsl(0, 0%, 92%);
}

.contentSearchOneOffItem.end-of-row {
  background-image: none;
}

.contentSearchOneOffItem.selected {
  background-color: Highlight;
  background-image: none;
}

.contentSearchOneOffsTable {
  width: 100%;
}

.contentSearchSettingsButton {
  margin: 0;
  padding: 0;
  height: 32px;
  border: none;
  border-top: 1px solid hsla(0, 0%, 0%, .08);
  text-align: center;
  width: 100%;
}

.contentSearchSettingsButton.selected {
  background-color: hsl(0, 0%, 90%);
}

.contentSearchSettingsButton:active {
  background-color: hsl(0, 0%, 85%);
}

@media (prefers-color-scheme: dark) {
  .contentSearchSuggestionTable,
  .contentSearchSuggestionsList,
  .contentSearchHeader,
  .contentSearchSuggestionEntry,
  .contentSearchSettingsButton {
    color-scheme: dark;
  }

  .contentSearchSuggestionTable {
    background-color: #2b3037;
    border-color: #4b535d;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45);
    color: #f1f4f7;
  }

  .contentSearchSuggestionsList {
    border-bottom-color: #4b535d;
  }

  .contentSearchSuggestionTable .historyIcon {
    filter: invert(100%) brightness(1.05);
  }

  .contentSearchHeader {
    background-color: #252a31;
    color: #b9c6d4;
    border-bottom-color: #4b535d;
  }

  .contentSearchSuggestionRow.selected,
  .contentSearchOneOffItem.selected {
    background-color: #1b84d6;
    color: #ffffff;
  }

  .contentSearchOneOffItem:not(.last-row) {
    border-bottom-color: #3d434b;
  }

  .contentSearchSettingsButton {
    border-top-color: #4b535d;
    background-color: #252a31;
    color: #d6dde5;
  }

  .contentSearchSettingsButton.selected {
    background-color: #343a43;
  }

  .contentSearchSettingsButton:active {
    background-color: #3e454f;
  }
}
