.toggle-container {
  display: inline-flex;
  align-items: center;     /* vertical centering */
  justify-content: center;
  gap: 8px;
  line-height: 1;          /* removes extra text vertical padding */
  vertical-align: middle;  /* fixes inline alignment issues */
}

.toggle-label {
  display: inline-flex;    /* ensures label text centers properly */
  align-items: center;
  font-size: 14px;
  line-height: 1;
}

.toggle-label.selected {
  font-weight: bold;
  color: #4caf50;
}


.toggle-wrapper {
  position: relative;
  display: inline-flex;    /* FIX: centers the slider block */
  align-items: center;     /* ensures slider aligns inside */
  width: 46px;
  height: 24px;
  margin: 0 !important;
}

.toggle-wrapper {
  position: relative;
}

.toggle-wrapper input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  z-index: 2;   /* ensure it captures clicks */
}


.toggle-slider {
  position: relative;      /* changed from absolute — helps centering */
  width: 100%;
  height: 100%;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 24px;
  transition: 0.25s;
  display: flex;
  align-items: center;     /* ensures knob is vertically centered */
  padding: 3px;            /* provides knob offset */
  box-sizing: border-box;
}

.toggle-slider::before {
  content: "";
  height: 18px;
  width: 18px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.toggle-wrapper input:checked + .toggle-slider {
  background-color: #4caf50;
}

.toggle-wrapper input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
