.toggle-switch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  padding: 4px 0;
  margin: 0;
  cursor: pointer;
}

.toggle-switch__row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
}

.toggle-switch__label {
  color: #191c1d;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.toggle-switch__input {
  position: absolute;
  right: 0;
  top: 50%;
  width: 40px;
  height: 22px;
  margin: 0;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
}

.toggle-switch__control {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s ease;
  pointer-events: none;
}

.toggle-switch__control::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.toggle-switch:has(.toggle-switch__input:checked) .toggle-switch__control {
  background: #22c55e;
}

.toggle-switch:has(.toggle-switch__input:checked) .toggle-switch__control::after {
  transform: translateX(18px);
}

.toggle-switch:has(.toggle-switch__input:disabled) {
  cursor: not-allowed;
  opacity: 0.65;
}

.toggle-switch__hint {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}
