:host {
  /**
   * @prop --background: Background of the toggle
   * @prop --background-checked: Background of the toggle when checked
   * @prop --handle-background: Background of the toggle handle
   * @prop --handle-background-checked: Background of the toggle handle when checked
   */
  /* stylelint-disable-next-line declaration-no-important */
  box-sizing: content-box !important;
  display: inline-block;
  contain: content;
  touch-action: none;
  user-select: none; }

:host(.toggle-key) input {
  border: 2px solid #5e9ed6; }

:host(:focus) {
  outline: none; }

:host(.toggle-disabled) {
  pointer-events: none; }

input {
  left: 0;
  top: 0;
  margin: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  outline: none;
  pointer-events: none; }

:host {
  --background: var(--ion-item-background-color, var(--ion-background-color, #fff));
  --background-checked: var(--ion-color-primary, #3880ff);
  --handle-background: var(--ion-item-background-color, var(--ion-background-color, #fff));
  --handle-background-checked: var(--ion-item-background-color, var(--ion-background-color, #fff));
  box-sizing: content-box;
  position: relative;
  width: 51px;
  height: 32px;
  contain: strict; }

:host(.ion-color.toggle-checked) .toggle-icon {
  background: var(--ion-color-base); }

:host(.ion-color.toggle-checked) .toggle-inner {
  background: var(--ion-color-contrast); }

.toggle-icon {
  border-radius: 16px;
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transition: background-color 300ms;
  background-color: var(--ion-background-color-step-50, #f2f2f2);
  overflow: hidden;
  pointer-events: none; }

.toggle-icon::before {
  left: 2px;
  right: 2px;
  top: 2px;
  bottom: 2px;
  border-radius: 16px;
  position: absolute;
  transform: scale3d(1, 1, 1);
  transition: transform 300ms;
  background: var(--background);
  content: ""; }

.toggle-inner {
  left: 2px;
  top: 2px;
  border-radius: 14px;
  position: absolute;
  width: 28px;
  height: 28px;
  transition: transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms, right 110ms ease-in-out 80ms;
  background: var(--handle-background);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16), 0 3px 1px rgba(0, 0, 0, 0.1);
  will-change: transform;
  contain: strict; }

:host(.toggle-checked) .toggle-icon {
  background: var(--background-checked); }

:host(.toggle-activated) .toggle-icon::before,
:host(.toggle-checked) .toggle-icon::before {
  transform: scale3d(0, 0, 0); }

:host(.toggle-checked) .toggle-inner {
  transform: translate3d(19px,  0,  0);
  background: var(--handle-background-checked); }

:host(.toggle-activated.toggle-checked) .toggle-inner::before {
  transform: scale3d(0, 0, 0); }

:host(.toggle-activated) .toggle-inner {
  width: 34px; }

:host(.toggle-activated.toggle-checked) .toggle-inner {
  left: -4px; }

:host(.toggle-disabled) {
  opacity: 0.3; }

:host(.in-item[slot]) {
  margin: 0;
  padding: 6px 8px 5px 16px; }

:host(.in-item[slot="start"]) {
  padding: 6px 16px 5px 0; }
