.tgl {
  position: relative;
  outline: 0;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  margin: 0 0 0 0;
}
.tgl,
.tgl:after,
.tgl:before,
.tgl *,
.tgl *:after,
.tgl *:before,
.tgl + .tgl-btn {
  box-sizing: border-box;
}
.tgl::selection,
.tgl:after::selection,
.tgl:before::selection,
.tgl *::selection,
.tgl *:after::selection,
.tgl *:before::selection,
.tgl + .tgl-btn::selection {
  background: none;
}
.tgl span {
  position: relative;
  display: block;
  line-height: 1.2em;
  font-weight: normal;
  text-align: center;
  padding: 0.2em 1em;
  border: 1px solid #fafafa;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.2), 0 2px 0 rgba(255, 255, 255, 0.7);
  transition: color 0.5s ease, padding 0.3s ease-in-out, background 0.5s ease-in-out;
}
.tgl span:before {
  position: relative;
  display: block;
  line-height: 1.3em;
  padding: 0 0.2em;
  font-size: 1em;
}
.tgl span:after {
  position: absolute;
  display: block;
  content: '';
  width: 1.3em;
  height: 1.3em;
  margin-left: -1.45em;
  top: 0.2em;
  background: #FFFFFF;
  transition: left 0.5s cubic-bezier(0.175, 0.885, 0.32, 0.97), background 0.5s ease-in-out;
}
.tgl input[type="checkbox"] {
  display: none !important;
}
.tgl input[type="checkbox"]:not(:checked) + span {
  background: #c41223;
  color: #FFFFFF;
  padding-left: 1.6em;
  padding-right: 0.4em;
}
.tgl input[type="checkbox"]:not(:checked) + span:before {
  content: attr(data-off);
  color: #FFFFFF;
}
.tgl input[type="checkbox"]:not(:checked) + span:after {
  background: #FFFFFF;
  left: 1.6em;
}
.tgl input[type="checkbox"]:checked + span {
  background: #86d993;
  color: #FFFFFF;
  padding-left: 0.4em;
  padding-right: 1.6em;
}
.tgl input[type="checkbox"]:checked + span:before {
  content: attr(data-on);
}
.tgl input[type="checkbox"]:checked + span:after {
  background: #FFFFFF;
  left: 100%;
}
.tgl input[type="checkbox"]:disabled,
.tgl input[type="checkbox"]:disabled + span,
.tgl input[type="checkbox"]:read-only,
.tgl input[type="checkbox"]:read-only + span {
  cursor: pointer;
}
.tgl-gray input[type="checkbox"]:not(:checked) + span {
  background: #e3e3e3;
  color: #999999;
}
.tgl-gray input[type="checkbox"]:not(:checked) + span:before {
  color: #999999;
}
.tgl-gray input[type="checkbox"]:not(:checked) + span:after {
  background: #ffffff;
}

.tgl-marker input[type="checkbox"]:not(:checked) + span {
  background: #229FAA;
  color: #FFFFFF;
}
.tgl-marker input[type="checkbox"]:not(:checked) + span:before {
  color: #FFFFFF;
}
.tgl-marker input[type="checkbox"]:not(:checked) + span:after {
  background: #ffffff;
}
.tgl-marker input[type="checkbox"]:checked + span {
  background: #c41223;
  color: #FFFFFF;
}
.tgl-marker span {
	height: 2.5em;
	padding: 0 0;
}
.tgl-marker span:before {
  padding: .5em 1em;
}
.tgl-marker span:after {
  height: 2em;
}

.tgl-inline {
  display: inline-block !important;
  vertical-align: top;
}
.tgl-inline.tgl {
  font-size: 16px;
}
.tgl-inline.tgl span {
  min-width: 50px;
}
.tgl-inline.tgl span:before {
  line-height: 1.4em;
  padding-left: 0.4em;
  padding-right: 0.4em;
}
.tgl-inline-label {
  display: inline-block !important;
  vertical-align: top;
  line-height: 26px;
}
