/*
 * Copyright 2011 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

:host {
  display: flex;
  flex: auto;
}

.suggest-box {
  flex: auto;
  background-color: var(--sys-color-cdt-base-container);
  pointer-events: auto;
  margin-left: -3px;
  box-shadow: var(--drop-shadow);
  overflow-x: hidden;
}

.suggest-box-content-item {
  padding: 1px 0 1px 1px;
  margin: 0;
  border: 1px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggest-box-content-item.secondary {
  background-color: var(--sys-color-neutral-container);
  justify-content: normal;
}

.suggestion-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-title span {
  white-space: pre;
}

.suggestion-subtitle {
  flex: auto;
  text-align: right;
  color: var(--sys-color-token-subtle);
  margin-right: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-box-content-item devtools-icon {
  color: var(--sys-color-on-surface-subtle);
  margin-right: 1px;
}

.suggest-box-content-item .query {
  font-weight: bold;
}

.suggest-box-content-item .spacer {
  display: inline-block;
  width: 20px;
}

.suggest-box-content-item.selected {
  background-color: var(--sys-color-tonal-container);
}

.suggest-box-content-item.selected .suggestion-subtitle,
.suggest-box-content-item.selected > span {
  color: var(--sys-color-on-tonal-container);
}

.suggest-box-content-item:hover:not(.selected) {
  background-color: var(--sys-color-state-hover-on-subtle);
}

@media (forced-colors: active) {
  .suggest-box-content-item.selected {
    forced-color-adjust: none;
    background-color: Highlight;
  }

  .suggest-box-content-item.selected > span {
    color: HighlightText;
  }
}
