/* 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);
}
:host small:before {
  content: "|";
  position: absolute;
  left: -6px;
  font-weight: 100;
}

:host([disabled]) small {
  color: var(--bce-color-disable-n);
}

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

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

@media screen and (min-width: 1024px) {
  :host(:not([compact])[label]) small {
    left: calc(25% + 12px);
  }
}
:host {
  --bce-color-l: var(--bce-color-primary-l);
  --bce-color-n: var(--bce-color-primary-n);
  --bce-color-d: var(--bce-color-primary-d);
  --bce-color-t: var(--bce-color-primary-t);
  position: relative;
  display: inline-block;
  margin: 2px 0;
}
:host label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
:host label > input {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}
:host label > div {
  width: 36px;
  height: 12px;
  border-radius: 14px;
}
:host label > div:after {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
:host label > div[data-off] {
  background-color: var(--bce-color-light-d);
}
:host label > div[data-off]:after {
  left: 0;
  background-color: var(--bce-color-light-n);
}
:host label > div[data-on] {
  background-color: var(--bce-color-l);
}
:host label > div[data-on]:after {
  background-color: var(--bce-color-n);
}

:host([disabled]) label {
  cursor: default;
}
:host([disabled]) label > div {
  background-color: var(--bce-color-disable-l);
}
:host([disabled]) label > div:after {
  background-color: var(--bce-color-disable-n);
}

:host([focus]) {
  outline: none;
}
:host([focus]) label > div:after {
  width: 10px;
  height: 10px;
}
:host([focus]) label > div[data-off]:after {
  background-color: var(--bce-color-light-d);
  border: 5px solid var(--bce-color-light-n);
}
:host([focus]) label > div[data-on]:after {
  background-color: var(--bce-color-l);
  border: 5px solid var(--bce-color-n);
}

:host([label]) {
  display: flex;
  align-items: center;
  margin: 20px 0;
  height: 40px;
}
:host([label]) bce-label {
  flex: 1 1 auto;
}
:host([label]) .slot-container {
  margin: 0 12px;
}
@media screen and (min-width: 600px) {
  :host([label]) bce-label {
    flex: 0 0 25%;
  }
  :host([label]) .slot-container {
    order: 2;
  }
  :host([label]) label {
    order: 1;
  }
}