* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  position: relative;
}

body {
  min-height: 100vh;
  font: 300 14px Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: #232323;
  background-color: #1976d2;
}

button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 0;
  outline: none;
  border-radius: 2px;
  padding: 8px 12px;
  font: inherit;
  color: inherit;
  background-color: #fbfbfb;
  cursor: pointer;
  box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
  opacity: .7;
  transition: opacity .3s ease;
}
button:hover {
  opacity: 1;
}
#buttons {
  position: fixed;
  top: 24px;
  right: 24px;
}

#myElement {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background-color: #FFF;
  border-radius: 18px;
  transform: translate(-50%, -50%);
  box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
}

.switch-input {
  display: none;
}
.switch-label {
  position: relative;
  display: inline-block;
  cursor: pointer;
  font-weight: 500;
  text-align: left;
  margin-right: 16px;
  color: #FFF;
  padding: 16px 0 16px 44px;
}
.switch-label:before, .switch-label:after {
  content: "";
  position: absolute;
  margin: 0;
  outline: 0;
  top: 50%;
  -webkit-transform: translate(0, -50%);
  transform: translate(0, -50%);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
.switch-label:before {
  left: 1px;
  width: 34px;
  height: 14px;
  background-color: #9E9E9E;
  border-radius: 8px;
}
.switch-label:after {
  left: 0;
  width: 20px;
  height: 20px;
  background-color: #FAFAFA;
  border-radius: 50%;
  -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.14), 0 2px 2px 0 rgba(0, 0, 0, 0.098), 0 1px 5px 0 rgba(0, 0, 0, 0.084);
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.14), 0 2px 2px 0 rgba(0, 0, 0, 0.098), 0 1px 5px 0 rgba(0, 0, 0, 0.084);
}
.switch-label .toggle--on {
  display: none;
}
.switch-label .toggle--off {
  display: inline-block;
}
.switch-input:checked + .switch-label:before {
  background-color: #A5D6A7;
}
.switch-input:checked + .switch-label:after {
  background-color: #4CAF50;
  -webkit-transform: translate(80%, -50%);
  transform: translate(80%, -50%);
}
.switch-input:checked + .switch-label .toggle--on {
  display: inline-block;
}
.switch-input:checked + .switch-label .toggle--off {
  display: none;
}
