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

.watch-expression-delete-button {
  position: absolute;
  top: 5px;
  right: 6px;
  cursor: pointer;
  opacity: 0%;
  min-width: 20px;
}

.watch-expression-header:hover .watch-expression-delete-button {
  opacity: 50%;
}

.watch-expression-header:hover .watch-expression-delete-button:hover {
  opacity: 100%;
}

.watch-expressions {
  overflow-x: hidden;
  min-height: 26px;
}

.watch-expression-title {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 20px;
}

.watch-expression-title:hover {
  padding-right: 26px;
}

.watch-expression-object-header .watch-expression-title {
  margin-left: 1px;
}

.watch-expression {
  position: relative;
  flex: auto;
  min-height: 20px;
}

.watch-expressions .name {
  color: rgb(136 19 145); /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
  flex: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.watch-expression-error {
  color: #f00; /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

:host-context(.-theme-with-dark-background) .watch-expression-error {
  color: hsl(0deg 100% 65%);
}

.watch-expressions-separator {
  flex: none;
}

.watch-expressions .value {
  white-space: nowrap;
  display: inline;
}

.watch-expression .text-prompt {
  text-overflow: clip;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 4px;
  min-height: 18px;
  line-height: 18px;
  user-select: text;
}

.watch-expression-text-prompt-proxy {
  margin: 2px 12px 2px -4px;
  padding-bottom: 3px;
}

.watch-expression-header {
  flex: auto;
  margin-left: -16px;
  padding-left: 15px;
}

li.watch-expression-tree-item {
  padding-left: 4px;
}

li.watch-expression-tree-item:hover {
  background-color: #f0f0f0; /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.watch-expression-header:focus-visible {
  background: var(--focus-bg-color);
}

li.watch-expression-editing::before {
  background-color: transparent;
}

@media (forced-colors: active) {
  .watch-expression-header:hover .watch-expression-delete-button,
  .watch-expressions .dimmed {
    opacity: 100%;
  }

  li.watch-expression-tree-item * {
    forced-color-adjust: none;
    color: ButtonText;
  }

  li.watch-expression-tree-item:hover {
    forced-color-adjust: none;
    background-color: Highlight;
  }

  li.watch-expression-tree-item:hover * {
    color: HighlightText;
  }
}
