/* Container */
.dp-switch-wrapper {
  position: relative;
  display: inline-block;
  width: 80px; /* Adjust based on label length */
  height: 30px;
  background: transparent;
}

/* Hide the actual TYPO3 checkbox */
.dp-switch-wrapper input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The Track */
.dp-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 30px;
}

/* The Label Text (Dynamic) */
.dp-switch-slider::after {
  position: absolute;
  right: 12px;
  top: 8px;
  content: attr(data-off); /* Pulls from ViewHelper */
  color: white;
}

/* The Sliding Knob */
.dp-switch-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  z-index: 2;
}

/* ON State */
input:checked + .dp-switch-slider {
  background-color: #666;
}

input:checked + .dp-switch-slider::after {
  content: attr(data-on); /* Switches text */
  left: 12px;
  right: auto;
}

input:checked + .dp-switch-slider::before {
  transform: translateX(50px); /* Adjust based on wrapper width */
}