:host {
  /**
   * @prop --background: Background of the input
   *
   * @prop --color: Color of the input text
   *
   * @prop --padding-top: Top padding of the input
   * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the input
   * @prop --padding-bottom: Bottom padding of the input
   * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the input
   *
   * @prop --placeholder-color: Color of the input placeholder text
   * @prop --placeholder-font-style: Font style of the input placeholder text
   * @prop --placeholder-font-weight: Font weight of the input placeholder text
   * @prop --placeholder-opacity: Opacity of the input placeholder text
   * @prop --placeholder-transition-delay: Transition delay of the input placeholder text
   *
   * @prop --border-radius: Border radius of the clear button
   * @prop --background: Background of the clear button
   * @prop --background-opacity: Background opacity of the clear button
   * @prop --background-active: Background of the clear button when pressed.
   * @prop --background-active-opacity: Opacity of the clear button when pressed
   * @prop --background-focus: Background of the clear button when focused with the tab key
   * @prop --background-focus-opacity: Opacity of the clear button when focused with the tab key
   * @prop --background-hover: Background of the clear button on hover
   * @prop --background-hover-opacity: Opacity of the clear button of the background on hover
   * @prop --color: Text color of the clear button
   * @prop --color-active: Text color of the clear button when pressed
   * @prop --color-focus: Text color of the clear button when focused with the tab key
   * @prop --color-hover: Text color of the clear button when hover
   */
  --placeholder-color: initial;
  --placeholder-font-style: initial;
  --placeholder-font-weight: initial;
  --padding-top: 10px;
  --padding-end: calc(var(--bkkr-spacer, 16px) * 0.5);
  --padding-bottom: 10px;
  --padding-start: 0;
  --background: transparent;
  --color: initial;
  --button-border-radius: 6.4px;
  --button-background: transparent;
  --button-background-active: var(--color, currentColor);
  --button-background-focus: var(--color, currentColor);
  --button-background-hover: var(--color, currentColor);
  --button-background-opacity: 1;
  --button-background-active-opacity: 0.12;
  --button-background-focus-opacity: 0.04;
  --button-background-hover-opacity: 0.04;
  --button-color-active: var(--color, currentColor);
  --button-color-focus: var(--color, currentColor);
  --button-color-hover: var(--color, currentColor);
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex;
  position: relative;
  flex: 1;
  align-items: center;
  width: 100%;
  background: var(--background);
  color: var(--color);
  font-family: var(--bkkr-font-family);
  font-size: inherit;
  touch-action: manipulation;
  z-index: 2;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  :host {
    padding-left: unset;
    padding-right: unset;
    -webkit-padding-start: 0 !important;
    padding-inline-start: 0 !important;
    -webkit-padding-end: 0 !important;
    padding-inline-end: 0 !important;
  }
}

:host-context(bkkr-item:not(.item-label)) {
  --padding-start: 0px;
}

:host-context(.item-label-stacked),
:host-context(.item-label-floating) {
  --padding-top: 8px;
  --padding-bottom: 8px;
  --padding-start: 0px;
}

.native-input {
  border-radius: var(--border-radius);
  padding-left: var(--padding-start);
  padding-right: var(--padding-end);
  padding-top: var(--padding-top);
  padding-bottom: var(--padding-bottom);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-decoration: inherit;
  text-indent: inherit;
  text-overflow: inherit;
  text-transform: inherit;
  white-space: inherit;
  display: inline-block;
  flex: 1;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  box-sizing: border-box;
  appearance: none;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  .native-input {
    padding-left: unset;
    padding-right: unset;
    -webkit-padding-start: var(--padding-start);
    padding-inline-start: var(--padding-start);
    -webkit-padding-end: var(--padding-end);
    padding-inline-end: var(--padding-end);
  }
}
.native-input::placeholder {
  transition: opacity 0.15s cubic-bezier(0.32, 0.72, 0, 1);
  transition-delay: var(--placeholder-transition-delay, none);
  color: var(--placeholder-color);
  font-family: inherit;
  font-style: var(--placeholder-font-style);
  font-weight: var(--placeholder-font-weight);
  opacity: var(--placeholder-opacity, 0.5);
}
.native-input:-webkit-autofill {
  background-color: transparent;
}
.native-input:invalid {
  box-shadow: none;
}
.native-input::-ms-clear {
  display: none;
}

.native-input[disabled]:not(.cloned-input) {
  opacity: 0.4;
}

.cloned-input {
  left: 0;
  top: 0;
  position: absolute;
  pointer-events: none;
}
[dir=rtl] .cloned-input, :host-context([dir=rtl]) .cloned-input {
  left: unset;
  right: unset;
  right: 0;
}

/**
 * The cloned input needs to be disabled on
 * Android otherwise the viewport will still
 * shift when running scroll assist.
 */
.cloned-input:disabled {
  opacity: 1;
}

.input-clear-button {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: var(--button-border-radius);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-decoration: inherit;
  text-indent: inherit;
  text-overflow: inherit;
  text-transform: inherit;
  white-space: inherit;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: flex;
  position: relative;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  border: 0;
  outline: none;
  background: var(--button-background);
  color: var(--button-color, currentColor);
  contain: layout style;
  cursor: pointer;
  overflow: var(--overflow, initial);
  visibility: hidden;
  z-index: 0;
  box-sizing: border-box;
  appearance: none;
}

:host(.has-value) .input-clear-button {
  visibility: visible;
}

:host-context(.item-fill-none.item-label-stacked) .input-clear-button,
:host-context(.item-fill-none.item-label-floating) .input-clear-button,
:host-context(.item-fill-outline.item-label-stacked) .input-clear-button,
:host-context(.item-fill-solid.item-label-stacked) .input-clear-button {
  transform: translateY(-25%);
}

.input-clear-button::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  content: "";
  opacity: 0;
  border-radius: var(--button-border-radius);
  transition: 0.2s opacity cubic-bezier(0.32, 0.72, 0, 1);
}

@media (any-hover: hover) {
  .input-clear-button:hover {
    color: var(--button-color-hover);
  }
  .input-clear-button:hover::after {
    background: var(--button-background-hover);
    opacity: var(--button-background-hover-opacity);
  }
}
.input-clear-button:focus {
  color: var(--button-color-focus);
}
.input-clear-button:focus::after {
  background: var(--button-background-focus);
  opacity: var(--button-background-focus-opacity);
}

.input-clear-button:active {
  color: var(--button-color-active);
}
.input-clear-button:active::after {
  background: var(--button-background-active);
  opacity: var(--button-background-active-opacity);
}

:host(:disabled),
:host(.state-disabled) {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

:host(.has-focus) {
  pointer-events: none;
}

:host(.has-focus) input,
:host(.has-focus) a,
:host(.has-focus) button {
  pointer-events: auto;
}