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

:host {
  overflow: hidden;

  --override-color-perf-monitor-cpu: var(--sys-color-yellow-bright);
  --override-color-perf-monitor-cpu-task-duration: var(--sys-color-neutral-bright);
  --override-color-perf-monitor-cpu-script-duration: var(--sys-color-yellow-bright);
  --override-color-perf-monitor-cpu-layout-duration: var(--sys-color-purple);
  --override-color-perf-monitor-cpu-recalc-style-duration: var(--sys-color-purple-bright);
  --override-color-perf-monitor-jsheap: var(--sys-color-purple-bright);
  --override-color-perf-monitor-jsheap-total-size: var(--ref-palette-purple70);
  --override-color-perf-monitor-jsheap-used-size: var(--sys-color-purple-bright);
  --override-color-perf-monitor-dom-nodes: var(--sys-color-green);
  --override-color-perf-monitor-js-event-listeners: var(--ref-palette-green80);
  --override-color-perf-monitor-documents: var(--sys-color-blue);
  --override-color-perf-monitor-document-frames: var(--sys-color-cyan-bright);
  --override-color-perf-monitor-layout-count: var(--sys-color-pink-bright);
  --override-color-perf-monitor-recalc-style-count: var(--sys-color-pink);
}

:host-context(.theme-with-dark-background) {
  --override-color-perf-monitor-jsheap-total-size: var(--ref-palette-purple50);
  --override-color-perf-monitor-js-event-listeners: var(--ref-palette-green50);
}

.suspended {
  opacity: 40%;
  pointer-events: none;
}

.perfmon-chart-suspend-overlay {
  display: flex;
  font-size: 26px;
  align-items: center;
  justify-content: center;
}

.perfmon-control-pane {
  display: flex;
  flex: initial;
  flex-direction: column;
  padding: 6px 0;
  overflow: hidden auto;
}

.perfmon-chart-container {
  display: flex;
  flex: 1 1;
  border-left: 1px solid var(--sys-color-divider);
  overflow-y: auto;
}

.perfmon-chart-container canvas {
  width: 100%;
}

.perfmon-indicator {
  padding: 3px 9px;
  margin: -1px 0;
  display: flex;
  flex-shrink: 0;
  width: 210px;
}

.perfmon-indicator span {
  flex: 0 0 135px;
}

.perfmon-indicator-value {
  flex: 0 0 55px;
  text-align: right;
  overflow: visible;
  align-self: center;
  margin-left: auto;
}

.perfmon-indicator:not(.active) .perfmon-indicator-value {
  opacity: 0%;
}
