uwc-input:is([type="text"], [type="search"]) {
  display: flex;
  border: 1px solid gray;
  border-radius: 2px;
  padding: 2px 3px;
  height: min-content;
  width: 172px;
  position: relative;
  font-family: Arial;
  font-size: 13.3333px;
  cursor: text;
  overflow: hidden;

  &[disabled] {
    pointer-events: none;
    background: var(--disabled-background);
  }

  & > [part="root"] {
    overflow: hidden;

    &[hidden] {
      display: initial;
      width: fit-content;
    }

    uwc-input:has(> [part="values"].empty) &:has([contenteditable]:empty) {
      flex-basis: 100%;
    }

    [contenteditable] {
      width: 100%;
      outline: none;
      height: 1lh;
      white-space: nowrap;

      [hidden] & {
        opacity: 0;
        width: 0;
      }
    }

    [part="placeholder"] {
      position: absolute;
      top: 0;
      left: 0;
      pointer-events: none;
      visibility: hidden;
      color: gray;

      uwc-input:has(> [part="values"].empty) [contenteditable]:empty + & {
        visibility: visible;
      }
    }
  }

  & > dialog[popover] {
    cursor: default;
    [aria-selected="true"] {
      background: blue;
      color: white;
    }

    [aria-current="true"] {
      background: highlight;
      color: highlightText;
    }
  }
}
