import { css } from '//resources/lit/v3_0/lit.rollup.js';
import { getCss as getCrIconsLit } from '//resources/cr_elements/cr_icons_lit.css.js';
let instance = null;
export function getCss() {
    return instance || (instance = [...[getCrIconsLit()], css `
:host {
  display: flex;
  flex: 1;
  width: 100%;
}

#inputInnerContainer {
  align-items: flex-start;
  display: flex;
  min-height: var(--cr-searchbox-input-height, 48px);
  position: relative;
  width: 100%;
}

:host([multi-line-enabled]) textarea {
  background-color: var(--color-cr-searchbox-input-textarea, transparent);
  box-sizing: border-box;
  field-sizing: content;
  line-height: 24px;
  max-height: 190px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: calc((var(--cr-searchbox-height) - 24px) / 2);
  resize: none;
  scrollbar-width: none;
  white-space: pre-wrap;
}

:host([multi-line-enabled]) #input::-webkit-scrollbar {
  display: none;
}

:is(input, textarea) {
  background-color: var(--color-cr-searchbox-input-textarea, transparent);
  border: none;
  color: var(--color-searchbox-foreground);
  font-family: inherit;
  font-size: inherit;
  height: 100%;
  outline: none;
  padding-top: 20px;
  position: relative;
  width: 100%;
}

input::-webkit-search-decoration,
input::-webkit-search-results-button,
input::-webkit-search-results-decoration {
  display: none;
}

/* Visually hide the cancel button but do not set display to none or
 * visibility to hidden as this causes issues with NVDA not reading out the
 * full value of the searchbox input as the user selects suggestion matches.
 * See crbug.com/1312442 for more context. */
input::-webkit-search-cancel-button {
  appearance: none;
  margin: 0;
}

:is(input, textarea)::placeholder {
  color: var(--color-searchbox-placeholder);
  opacity: var(--placeholder-opacity);
  white-space: nowrap;
}

:is(input, textarea):focus::placeholder {
  /* Visually hide the placeholder on focus. The placeholder will still be
   * read by screen readers. Using color: transparent or other ways of
   * visually hiding the placeholder does not work well with 'Find in page...'
   * as the placeholder text can get highlighted. */
  visibility: hidden;
}

cr-searchbox-icon {
  height: 100%;
  padding-inline-end: 4px;
  padding-inline-start: var(--cr-searchbox-icon-left-position);
  position: relative;
  top: var(--cr-searchbox-icon-top-position);
  pointer-events: none;
}

@media (forced-colors: active) {
  cr-searchbox-icon {
    border-radius: 4px;
  }
}

:is(input, textarea),
cr-searchbox-icon {
  z-index: 100;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
}

`]);
}
