.line {
  display: flex;
  position: relative;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: var(--line-gap, 0.5em);
  transition-duration: var(--__transition-duration);
  transition-property: background-position, background-size, color;
  transition-timing-function: ease-in-out;
  background: linear-gradient(35deg, var(--_hover-color) 60%, transparent 80%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-origin: border-box;
  padding-left: 0.25em;
  width: 100%;
  max-width: 100%;
  min-height: 1.5em;
  max-height: 1.5em;
  overflow: visible;

  &:hover:not(.preview) {
    background-size: 100% 100%;
    background-position-x: left;
  }

  &:focus-within:not(.preview) {
    background-size: 120% 100%;
    background-position-x: left;
  }
}

.line.preview {
  margin-left: 0;
  padding-left: 0;
}

.line.preview.nokey {
  gap: 0;
}

.indicator-and-key {
  all: unset;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.25em;
  width: 100%;

  &:focus {
    outline: 0.5px solid var(--_button-color);
    outline-offset: -1px;
  }

  &:hover {
    background-color: transparent;
  }
}

:global .line:has(.highlight) {
  .bullet {
    .dash {
      border-radius: 4px;
      background-color: color-mix(
        in srgb,
        var(--_bullet-color),
        var(--_text-search-highlight-color) 50%
      );
      width: 4px;
      height: 4px;
    }
  }

  .collapse {
    color: color-mix(in srgb, var(--_bullet-color), var(--_text-search-highlight-color) 50%);
  }
}

:global .line.match {
  .bullet {
    .dash {
      border-radius: 0px;
      border-radius: 1px;
      background-color: var(--_text-search-highlight-color);
      width: 4px;
      height: 4px;
    }
  }

  .collapse {
    color: var(--_text-search-highlight-color);
  }
}
