/* Oculta o checkbox original */
.switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Corpo do switch */
.switch-label {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  background-color: #444;
  border-radius: 34px;
  cursor: pointer;
}

/* A bolinha */
.switch-slider {
  position: absolute;
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #eee;
  border-radius: 50%;
  transition: transform 0.3s ease-out;
  z-index: 2;
}

/* Ícones */
.switch-label .sun-icon,
.switch-label .moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #fff;
  z-index: 1;
}

.switch-label .sun-icon {
  left: 8px;
}

.switch-label .moon-icon {
  right: 8px;
}

/* Quando marcado */
.switch-input:checked + .switch-label .switch-slider {
  transform: translateX(26px);
  background-color: #ddd;
}

.switch-input:checked + .switch-label {
  background-color: gray;
}

/* Hover */
.switch-label:hover {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}
