import { css } from '//resources/lit/v3_0/lit.rollup.js';
import '../cr_shared_vars.css.js';
let instance = null;
export function getCss() {
    return instance || (instance = [...[], css `
:host {
  --cr-input-background-color: var(--color-textfield-filled-background,
      var(--cr-fallback-color-surface-variant));
  --cr-input-border-bottom: 1px solid
      var(--color-textfield-filled-underline,
          var(--cr-fallback-color-outline));
  --cr-input-border-radius: 8px 8px 0 0;
  --cr-input-color: var(--cr-primary-text-color);
  --cr-input-error-color: var(--color-textfield-filled-error,
      var(--cr-fallback-color-error));
  --cr-input-focus-color: var(--color-textfield-filled-underline-focused,
      var(--cr-fallback-color-primary));
  --cr-input-hover-background-color: var(--cr-hover-background-color);
  --cr-input-label-color: var(--color-textfield-foreground-label,
      var(--cr-fallback-color-on-surface-subtle));
  --cr-input-padding-bottom: 10px;
  --cr-input-padding-end: 10px;
  --cr-input-padding-start: 10px;
  --cr-input-padding-top: 10px;
  --cr-input-placeholder-color:
      var(--color-textfield-foreground-placeholder,
          var(--cr-fallback-on-surface-subtle));
  display: block;
  isolation: isolate;
  /* Avoid showing outline when focus() programmatically called multiple
     times in a row. */
  outline: none;
}

:host([readonly]) {
  --cr-input-border-radius: 8px 8px;
}

#label {
  color: var(--cr-input-label-color);
  font-size: 11px;
  line-height: 16px;
}

:host([focused_]:not([readonly]):not([invalid])) #label {
  color: var(--cr-input-focus-label-color, var(--cr-input-label-color));
}

/* Input styling below. */
#input-container {
  border-radius: var(--cr-input-border-radius, 4px);
  overflow: hidden;
  position: relative;
  width: var(--cr-input-width, 100%);
}

:host([focused_]) #input-container {
  outline: var(--cr-input-focus-outline, none);
}

#inner-input-container {
  background-color: var(--cr-input-background-color);
  box-sizing: border-box;
  padding: 0;
}

#inner-input-content ::slotted(*) {
  --cr-icon-button-fill-color: var(--color-textfield-foreground-icon,
      var(--cr-fallback-color-on-surface-subtle));
  --cr-icon-button-icon-size: 16px;
  --cr-icon-button-size: 24px;
  --cr-icon-button-margin-start: 0;
  --cr-icon-color: var(--color-textfield-foreground-icon,
      var(--cr-fallback-color-on-surface-subtle));
}

#inner-input-content ::slotted([slot='inline-prefix']) {
  --cr-icon-button-margin-start: -8px;
}

#inner-input-content ::slotted([slot='inline-suffix']) {
  --cr-icon-button-margin-end: -4px;
}

:host([invalid]) #inner-input-content ::slotted(*) {
  --cr-icon-color: var(--cr-input-error-color);
  --cr-icon-button-fill-color: var(--cr-input-error-color);
}

#hover-layer {
  background-color: var(--cr-input-hover-background-color);
  display: none;
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

:host(:not([readonly]):not([disabled]))
    #input-container:hover #hover-layer {
  display: block;
}

#input {
  -webkit-appearance: none;
  /* Transparent, #inner-input-container will apply background. */
  background-color: transparent;
  border: none;
  box-sizing: border-box;
  caret-color: var(--cr-input-focus-color);
  color: var(--cr-input-color);
  font-family: inherit;
  font-size: var(--cr-input-font-size, 12px);
  font-weight: inherit;
  line-height: 16px;
  min-height: var(--cr-input-min-height, auto);
  outline: none;
  padding: 0;
  text-align: inherit;
  text-overflow: ellipsis;
  width: 100%;
}

#inner-input-content {
  padding-bottom: var(--cr-input-padding-bottom);
  padding-inline-end: var(--cr-input-padding-end);
  padding-inline-start: var(--cr-input-padding-start);
  padding-top: var(--cr-input-padding-top);
}

/* Underline styling below. */
#underline {
  border-bottom: 2px solid var(--cr-input-focus-color);
  border-radius: var(--cr-input-underline-border-radius, 0);
  bottom: 0;
  box-sizing: border-box;
  display: var(--cr-input-underline-display);
  height: var(--cr-input-underline-height, 0);
  left: 0;
  margin: auto;
  opacity: 0;
  position: absolute;
  right: 0;
  transition: opacity 120ms ease-out, width 0s linear 180ms;
  width: 0;
}

:host([invalid]) #underline,
:host([force-underline]) #underline,
:host([focused_]) #underline {
  opacity: 1;
  transition: opacity 120ms ease-in, width 180ms ease-out;
  width: 100%;
}

#underline-base {
  display: none;
}

:host([readonly]) #underline {
  display: none;
}

:host(:not([readonly])) #underline-base {
  border-bottom: var(--cr-input-border-bottom);
  bottom: 0;
  display: block;
  left: 0;
  position: absolute;
  right: 0;
}

:host([disabled]) {
  color: var(--color-textfield-foreground-disabled,
      var(--cr-fallback-color-disabled-foreground));
  --cr-input-border-bottom: 1px solid currentColor;
  --cr-input-placeholder-color: currentColor;
  --cr-input-color: currentColor;
  --cr-input-background-color: var(--color-textfield-background-disabled,
      var(--cr-fallback-color-disabled-background));
}

:host([disabled]) #inner-input-content ::slotted(*) {
  --cr-icon-color: currentColor;
  --cr-icon-button-fill-color: currentColor;
}

:host(.stroked) {
  --cr-input-background-color: transparent;
  --cr-input-border: 1px solid var(--color-side-panel-textfield-border,
      var(--cr-fallback-color-neutral-outline));
  --cr-input-border-bottom: none;
  --cr-input-border-radius: 8px;
  --cr-input-padding-bottom: 9px;
  --cr-input-padding-end: 9px;
  --cr-input-padding-start: 9px;
  --cr-input-padding-top: 9px;
  --cr-input-underline-display: none;
  --cr-input-min-height: 36px;
  line-height: 16px;
}

:host(.stroked[focused_]) {
  --cr-input-border: 2px solid var(--cr-focus-outline-color);
  --cr-input-padding-bottom: 8px;
  --cr-input-padding-end: 8px;
  --cr-input-padding-start: 8px;
  --cr-input-padding-top: 8px;
}

:host(.stroked[invalid]) {
  --cr-input-border: 1px solid var(--cr-input-error-color);
}

:host(.stroked[focused_][invalid]) {
  --cr-input-border: 2px solid var(--cr-input-error-color);
}`]);
}
