/* 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: 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 {
  --bce-c-surface:var(--bce-c001-surface);
  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-c700-light);
}
:host label > div[data-off]:after {
  left: 0;
  background-color: var(--bce-c500-light);
}
:host label > div[data-on] {
  background-color: var(--bce-c400);
}
:host label > div[data-on]:after {
  background-color: var(--bce-c500);
}

:host([disabled]) label {
  cursor: default;
}
:host([disabled]) label > div {
  background-color: var(--bce-con4-surface);
  opacity: 0.6;
}
:host([disabled]) label > div:after {
  background-color: var(--bce-con3-surface);
}

:host([focus]) {
  outline: none;
}
:host([focus]) label > div:after {
  width: 10px;
  height: 10px;
}
:host([focus]) label > div[data-off]:after {
  background-color: var(--bce-c500-ghost);
  border: 5px solid var(--bce-con2-surface);
}
:host([focus]) label > div[data-on]:after {
  background-color: var(--bce-c400);
  border: 5px solid var(--bce-c500);
}

: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;
  color: var(--bce-con2-surface);
}
@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;
  }
}