/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

.list-item {
  display: flex;
  align-items: center;
  padding-block: 10px;
  padding-inline: 12px 18px;
  border-inline-start: 4px solid transparent;
  user-select: none;
}

.list-item:not(.selected):hover {
  background-color: var(--button-background-color-hover);
  color: var(--button-text-color-hover);
}

.list-item:not(.selected):hover:active {
  background-color: var(--button-background-color-active);
  color: var(--button-text-color-active);
}

.list-item.keyboard-selected {
  border-inline-start-color: var(--border-color);
  background-color: var(--button-background-color-hover);
}

.list-item.selected {
  border-inline-start-color: var(--border-color-selected);
  background-color: var(--background-color-canvas);
}

.list-item.selected .title {
  font-weight: var(--heading-font-weight);
}

.labels {
  flex-grow: 1;
  overflow: hidden;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title,
.subtitle {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.icon {
  height: 16px;
  width: 16px;
  margin-inline-end: 12px;
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  fill-opacity: 0.8;
}

.subtitle {
  font-size: 0.85em;
  color: var(--text-color-deemphasized);
}

.alert-icon {
  min-width: 16px;
  width: 16px;
  margin-inline-start: 12px;
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  fill-opacity: 0.75;

  :host([notificationIcon="breached"]) & {
    fill: var(--red-60);
    fill-opacity: 1;
  }
}
