// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

.pf-flamegraph {
  height: 100%;
  overflow-y: hidden;

  .loading-container {
    font-size: larger;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .filter-bar {
    margin: 6px 8px;
    display: flex;
    column-gap: 8px;
    align-items: start;

    .pf-tag-input {
      flex-grow: 1;
    }

    .pf-select {
      flex-shrink: 0;
    }
  }

  .popup-anchor {
    width: 0px;
    height: 0px;
    position: absolute;
  }

  canvas {
    user-select: none;
  }

  .canvas-container {
    height: 100%;
    position: relative;
    overflow-y: auto;
  }

  .pf-virtual-canvas {
    height: 100%;
  }
}

.pf-flamegraph-filter-bar-popup-content {
  white-space: pre-line;
  width: 100%;
  word-wrap: break-word;
}

.pf-flamegraph-tooltip-popup {
  width: max-content;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  padding: 4px;

  .tooltip-text-line {
    display: flex;
    cursor: text;
    padding-top: 4px;
    gap: 4px;
  }

  .tooltip-text {
    cursor: text;
  }

  .tooltip-bold-text {
    font-weight: 600;
    cursor: text;
  }

  .pf-button-bar {
    padding-top: 16px;
  }

  .tooltip-marker-text {
    font-size: 12px;
    font-style: italic;
    color: var(--pf-color-text-muted);
    padding-bottom: 4px; // Extra gap between marker and function name
  }
}
