/* prettier-ignore */
:host small {
  position: absolute;
  font-size: 12px;
  bottom: -16px;
  left: 12px;
  text-align: left;
  transition: left 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--bce-con2-surface);
}
:host small:before {
  content: "";
  position: absolute;
  left: -6px;
  font-weight: 100;
}

:host([disabled]) small {
  color: var(--bce-con3-surface);
}

:host([focus]) small {
  color: var(--bce-con1-surface);
}

:host([error]) bce-label {
  color: var(--bce-c500-error);
}
:host([error]) small {
  color: var(--bce-c500-error);
}

@media screen and (min-width: 1024px) {
  :host(:not([compact])[label]) small {
    left: calc(25% + 12px);
  }
}
:host {
  --bce-c300:var(--bce-c300-primary);
  --bce-c400:var(--bce-c400-primary);
  --bce-c500:var(--bce-c500-primary);
  --bce-c600:var(--bce-c600-primary);
  --bce-c700:var(--bce-c700-primary);
  --bce-con1:var(--bce-con1-primary);
  --bce-con2:var(--bce-con2-primary);
  --bce-con3:var(--bce-con3-primary);
  --bce-con4:var(--bce-con4-primary);
  position: relative;
  display: flex;
  margin: 20px 0;
  height: 48px;
}
:host .container {
  position: relative;
  width: 100%;
  background-color: var(--bce-c-surface);
  border: 1px solid var(--bce-con4-surface);
  border-radius: 4px;
  transition: border-color 0.3s ease-in-out;
}
:host .container input {
  position: absolute;
  left: 3px;
  width: calc(100% - 6px);
  top: 3px;
  bottom: 3px;
  padding: 0;
  outline: none;
  height: inherit;
  border: none;
  border-radius: 4px;
}
:host .container input::-webkit-color-swatch-wrapper {
  padding: 0;
}
:host .container input::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}
:host .container input:last-of-type {
  left: auto;
  top: 10px;
  bottom: 10px;
  right: 10px;
  width: 40%;
  opacity: 0.87;
}
:host .container .preview {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  width: 200px;
  height: 10px;
  border-radius: 4px;
}
:host .container .preview div {
  --bce-c-surface:var(--bce-c001-surface);
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  margin: 0 2px;
  border-radius: 2px;
  width: 10px;
  height: 10px;
}
:host .container .preview :nth-child(1) {
  background-color: var(--bce-c300);
}
:host .container .preview :nth-child(2) {
  background-color: var(--bce-c400);
}
:host .container .preview :nth-child(3) {
  background-color: var(--bce-c500);
}
:host .container .preview :nth-child(4) {
  background-color: var(--bce-c600);
}
:host .container .preview :nth-child(5) {
  background-color: var(--bce-c700);
}
:host .container .preview :nth-child(6) {
  background-color: var(--bce-con1);
}
:host .container .preview :nth-child(7) {
  background-color: var(--bce-con2);
}
:host .container .preview :nth-child(8) {
  background-color: var(--bce-con3);
}
:host .container .preview :nth-child(9) {
  background-color: var(--bce-con4);
}

:host([disabled]) .container {
  background-color: var(--bce-con4-surface);
  color: var(--bce-con3-surface);
  border-color: var(--bce-con4-surface);
}
:host([disabled]) .container input {
  opacity: 0.6;
}

:host([focus]) .container {
  border-color: var(--bce-c500);
}
:host([focus]) .container input:focus {
  border: 1px solid var(--bce-c300);
}

:host([error]) bce-label {
  color: var(--bce-c500-error);
}
:host([error]) .container {
  border-color: var(--bce-c500-error);
}

:host([label]) bce-label {
  position: absolute;
  margin: 7px 12px;
  font-size: 0.8em;
  color: var(--bce-con1);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

@media screen and (min-width: 1024px) {
  :host(:not([compact])) {
    height: 40px;
  }

  :host(:not([compact])[label]) bce-label {
    flex: 0 0 25%;
    position: initial;
    margin: 0;
    color: var(--bce-con1-surface);
    font-size: initial;
    line-height: 40px;
  }

  :host(:not([compact])[label][focus]) bce-label {
    color: var(--bce-c500);
  }
}