.dazzler-core-switch {
  width: 2.5rem;
  height: 1.25rem;
  margin: 0 2px;

  position: relative;
  display: flex;
  align-items: center;

  cursor: pointer;

  .switch-inner {
    width: 100%;
    height: 60%;
    background-color: darken($neutral, 10%);
    position: absolute;
    top: 20%;
    left: 0
  }

  .switch-caret {
    background-color: darken($neutral-dark, 10%);
    height: 1.25rem;
    width: 1.25rem;
    position: absolute;
    top: 0;
    right: 0;
    &:hover {
      box-shadow: 0 0 0 6px rgba(238, 238, 238, 0.5);
    }
  }
  &.switch-off .switch-caret {
    right: unset;
    left: 0;
  }
  &.switch-off div.switch-inner {
    background-color: darken($neutral-light, 5%);
  }

  &.disabled {
    div.switch-inner { background: $neutral }
    div.switch-caret { background: $neutral-dark }
    &.switch-off div.switch-inner { background: $neutral-light }
  }

  &.rounded .switch-caret  {
    border-radius: 50%;
  }
  &.rounded .switch-inner {
    border-radius: 25px;
  }

  &.switch-primary {
    .switch-inner {
      background-color: $primary-light;
    }

    .switch-caret {
      background-color: $primary-dark;
    }
  }
  &.switch-secondary {
    .switch-inner {
      background-color: $secondary-light;
    }

    .switch-caret {
      background-color: $secondary;
    }
  }
  &.switch-tertiary {
    .switch-inner {
      background-color: $tertiary-light;
    }

    .switch-caret {
      background-color: $tertiary;
    }
  }
  &.switch-danger {
    .switch-inner {
      background-color: $danger-light;
    }

    .switch-caret {
      background-color: $danger-dark;
    }
  }
  &.switch-warning {
    .switch-inner {
      background-color: $warning-light;
    }

    .switch-caret {
      background-color: $warning-dark;
    }
  }
  &.switch-success {
    .switch-inner {
      background-color: $success-light;
    }

    .switch-caret {
      background-color: $success-dark;
    }
  }

  &.tiny {
    width: 1.2rem;
    height: 0.6rem;

    .switch-caret {
      height: 0.6rem;
      width: 0.6rem;
    }
  }
  &.small {
    width: 1.6rem;
    height: 0.8rem;

    .switch-caret {
      height: 0.8rem;
      width: 0.8rem;
    }
  }
  &.medium {
    width: 2rem;
    height: 1rem;

    .switch-caret {
      width: 1rem;
      height: 1rem;
    }
  }
  &.large {
    width: 3rem;
    height: 1.5rem;

    .switch-caret {
      width: 1.5rem;
      height: 1.5rem;
    }
  }
  &.larger {
    width: 3.5rem;
    height: 1.75rem;

    .switch-caret {
      width: 1.75rem;
      height: 1.75rem;
    }
  }
  &.x-large {
    width: 4rem;
    height: 2rem;

    .switch-caret {
      width: 2rem;
      height: 2rem;
    }
  }
  &.xx-large {
    width: 5rem;
    height: 2.5rem;

    .switch-caret {
      width: 2.5rem;
      height: 2.5rem;
    }
  }
}
