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

/* #css_wrapper_metadata_start
 * #type=style-lit
 * #import=//resources/cr_elements/cr_shared_style_lit.css.js
 * #scheme=relative
 * #include=cr-shared-style-lit
 * #css_wrapper_metadata_end */

:host {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  --sidebar-width: 250px;
  /* Controls the size of the search bar contained within cr-toolbar */
  --cr-toolbar-field-width: 680px;
  --cr-toolbar-search-field-input-text-color: var(--color-sys-on-surface-subtle);
  --cr-toolbar-search-field-prompt-color: var(--color-sys-on-surface-subtle);
}

:host-context(html:not([webui-refresh-2026])) {
  --cr-toolbar-search-field-background: var(--color-sys-surface4);
}

#content {
  display: flex;
  flex: 1;
  overflow: auto;
  position: relative;
  scrollbar-gutter: stable;
}

#left {
  flex: 0 0 var(--sidebar-width);
  height: 100%;
  position: sticky;
  top: 0;
}

#sidebar {
  max-height: 100%;
  width: 100%;
  overscroll-behavior: contain;
  padding-top: 8px;
}

cr-page-selector {
  flex: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;

  /* The width is calculated using the width of 3 skill cards plus padding. */
  max-width: calc(3 * var(--skills-card-width) + 2 * var(--skills-card-gap) +
    2 * var(--page-padding));
  /* Align the left edge of the page selector with the left edge of
   * the search bar contained within cr-toolbar. If the window is too narrow
   * the searchbar disappears, max(16px,...) ensures the content is not being
   * pushed off screen. */
  margin-inline-start: max(16px, calc(50vw -
    var(--cr-toolbar-field-width) / 2 - var(--sidebar-width) -
    var(--page-padding)));
  margin-inline-end: 20px;
  padding-top: 16px;
}

.name {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
}
