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

@scope to (devtools-widget > *) {
  * {
    box-sizing: border-box;
    font-size: 12px;
  }

  .header {
    background-color: var(--sys-color-surface2);
    border-bottom: 1px solid var(--sys-color-divider);
    line-height: 1.6;
    overflow: hidden;
    padding: 0 5px;
    white-space: nowrap;
  }

  .header::marker {
    color: var(--sys-color-on-surface-subtle);
    font-size: 11px;
    line-height: 1;
  }

  .header:focus {
    background-color: var(--sys-color-tonal-container);
  }

  .content-section {
    padding: 16px;
    border-bottom: 1px solid var(--sys-color-divider);
    overflow-x: hidden;
  }

  .content-section-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    margin: 0;
    padding: 0;
  }

  .checkbox-settings {
    margin-top: var(--sys-size-5);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sys-size-4);

    > div {
      display: flex;
    }
  }

  devtools-checkbox {
    /* Allows label text to get ellipsed */
    flex-shrink: unset;
    margin: 0 6px 0 0;
    padding: 0;
  }

  .select-settings {
    margin-top: 16px;
    width: fit-content;
  }

  .select-label {
    display: flex;
    flex-direction: column;
  }

  .select-label span {
    margin-bottom: 4px;
  }

  .elements {
    margin-top: 12px;
    color: var(--sys-color-token-tag);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 8px;
  }

  .element {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .show-element {
    flex: none;
  }

  select {
    min-width: 0;
    max-width: 150px;
  }

  .color-picker {
    opacity: 0%;
  }

  .color-picker-label {
    border: 1px solid var(--sys-color-neutral-outline);
    cursor: default;
    display: inline-block;
    flex: none;
    height: 10px;
    width: 10px;
    position: relative;

    &:focus-within {
      outline: 2px solid var(--sys-color-state-focus-ring);
      outline-offset: 2px;
      border-radius: 2px;
    }
  }
  /* We set dimensions for the invisible input to support quick highlight a11y feature
  that uses the dimensions to draw an outline around the element. */
  .color-picker-label input[type="color"] {
    width: 100%;
    height: 100%;
    position: absolute;
  }

  .color-picker-label:hover,
  .color-picker-label:focus {
    border: 1px solid var(--sys-color-outline);
    transform: scale(1.2);
  }

  .node-text-container {
    line-height: 16px;
    padding: 0 0.5ex;
    border-radius: 5px;
  }

}
