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

.search-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.search-panel .search-panel-content {
  width: 100%;
  height: 100%;
  overflow: auto;
  outline: 0 !important;
}

.search-panel .treeTable {
  width: 100%;
  color: var(--theme-body-color);
  outline: 0 !important;
}

/* Custom tree styles for the Search results panel*/
.search-panel .treeTable .treeLabelCell::after {
  content: "";
}

/* Color for resource label */
.search-panel .resourceCell {
  color: var(--theme-text-color-alt);
}

.search-panel .treeTable tbody {
  outline: 0 !important;
}

.search-panel .treeTable .resultLabel {
  font-weight: bold;
}

.search-panel .treeTable .treeLabelCell {
  text-overflow: ellipsis;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

/* Case Sensitive button */
#devtools-network-search-caseSensitive::before {
  background-image: url("chrome://devtools/skin/images/case-match.svg");
}

button.case-sensitive-btn {
  padding: 2px;
  margin: 0 3px;
  border: none;
  background: none;
  width: 20px;
  height: 20px;
  border-radius: 2px;
}

/* Color for query matches */
.search-panel .resultCell .query-match {
  background-color: var(--theme-search-results-background);
  color: var(--theme-search-results-color);
  border-bottom: 1px solid var(--theme-search-results-border-color);
}

.search-modifiers {
  display: flex;
  align-items: center;
}

.search-modifiers * {
  user-select: none;
}

.pipe-divider {
  flex: none;
  align-self: stretch;
  width: 1px;
  vertical-align: middle;
  margin: 4px;
  background-color: var(--theme-splitter-color);
}

.search-type-name {
  margin: 0 4px;
  border: none;
  background: transparent;
  color: var(--theme-comment);
}

.search-modifiers button {
  margin: 0 3px;
  border: none;
  background: none;
  width: 25px;
  height: 20px;
  border-radius: 2px;
}

.search-panel .devtools-toolbar {
  max-height: 26px;
}

.search-panel .status-bar-label {
  min-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  min-width: 150px;
}

.search-panel .img.loader {
  background-image: url(chrome://devtools/content/debugger/images/loader.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 16px;
  height: 16px;
  margin-inline-start: 10px;
  animation: search-loader-rotate 0.5s linear infinite;
  -moz-context-properties: fill;
  fill: var(--theme-selection-background);
  display: inline-block;
  top: 4px;
  position: relative;
}

@keyframes search-loader-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
