html,
body {
  margin: 0;
  padding: 0;
}

:root {
  --body-bg: #c7c8dd;
  --toggle-switch-bg: #232428;
  --toggle-border: #232428;
  --toggle-bg: #fff;
  --toggle-width: 150px;
  --toggle-height: 30px;
}

body {
  background-color: var(--body-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.toggle-wrap {
  width: var(--toggle-width);
  height: var(--toggle-height);
  border: 3px solid var(--toggle-border);
  border-radius: 40px;
  padding: 1.5px;
  background-color: var(--toggle-bg);
}

label {
  display: block;
  height: 100%;
  position: relative;
  cursor: pointer;
}

input {
  display: none;
}

.toggle-switch {
  background-color: var(--toggle-switch-bg);
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: absolute;
  left: 0;
  transition: 0.8s ease;
}

input:checked + .toggle-switch {
  left: 100%;
  transform: translateX(-100%);
}
/* Start styling */
