/* Copyright 2024 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=chrome://resources/cr_elements/mwb_shared_style_lit.css.js
 * #scheme=relative
 * #include=mwb-shared-style-lit
 * #css_wrapper_metadata_end */

cr-icon-button {
  --cr-icon-button-fill-color: var(--color-tab-search-secondary-foreground);
  --cr-icon-button-icon-size: 16px;
  --cr-icon-button-margin-end: 0;
  --cr-icon-button-margin-start: 0;
  --cr-icon-button-size: 20px;
}

tab-search-item {
  --tab-search-item-icon-margin: 16px;
  --tab-search-favicon-background: var(--color-tab-search-background);
  align-items: center;
  display: flex;
  flex-direction: row;
}

#declutterPage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

#header {
  display: flex;
  gap: 6px;
}

#scrollable {
  --external-margin: 20px;
  --scrollbar-width: 4px;
  --scroll-border: solid 1px var(--color-tab-search-divider);
  --non-scroll-border: solid 1px transparent;
  border-bottom: var(--non-scroll-border);
  border-top: var(--non-scroll-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Render the scroll bar and scroll borders at the edge of the dialog */
  margin: 0 calc(-1 * var(--external-margin));
  overflow-y: auto;
  padding: 0 calc(var(--external-margin) - var(--scrollbar-width))
           0 var(--external-margin);
  scrollbar-gutter: stable;
}

#scrollable.can-scroll.is-scrolled {
  border-top: var(--scroll-border);
}

#scrollable.can-scroll:not(.scrolled-to-bottom) {
  border-bottom: var(--scroll-border);
}

.action-button {
  align-self: flex-end;
}

:host([dedupe-enabled]) .card {
  background-color: var(--color-tab-search-card-background);
  border-radius: 8px;
}

.empty-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.empty-subheading {
  color: var(--cr-secondary-text-color);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.empty-title {
  color: var(--cr-secondary-text-color);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

:host([dedupe-enabled]) .header-text {
  padding: 12px 16px 0 16px;
  gap: 0;
}

.mwb-list-item:focus {
  background-color: var(--mwb-list-item-selected-background-color);
}

.mwb-list-item {
  --mwb-list-item-horizontal-margin: 16px;
  background-color: transparent;
}

:host([dedupe-enabled]) .mwb-list-item {
  --mwb-item-height: 32px;
}

.subheading {
  color: var(--cr-secondary-text-color);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.tab-list {
  background-color: var(--color-tab-search-card-background);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
}

.title {
  color: var(--cr-primary-text-color);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
