/* Contact custom field — composer-style on/off switch (matches document Comments toggle) */

.cf-switch-toggle.composer-track-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 32px;
  padding: 0 4px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
}

.cf-switch-toggle.composer-track-toggle:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 10px;
}

.cf-switch-toggle .composer-switch {
  --composer-switch-w: 52px;
  --composer-switch-h: 24px;
  --composer-switch-knob: 18px;
  position: relative;
  display: inline-block;
  width: var(--composer-switch-w);
  height: var(--composer-switch-h);
  flex-shrink: 0;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  overflow: hidden;
}

.cf-switch-toggle .composer-switch__knob {
  position: absolute;
  top: 2px;
  left: 3px;
  width: var(--composer-switch-knob);
  height: var(--composer-switch-knob);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.18s ease;
}

.cf-switch-toggle .composer-switch__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  pointer-events: none;
  user-select: none;
}

.cf-switch-toggle .composer-switch:not(.composer-switch--on) .composer-switch__text {
  justify-content: flex-start;
  padding-left: 22px;
  padding-right: 0;
}

.cf-switch-toggle .composer-switch:not(.composer-switch--on) .composer-switch__knob {
  transform: translateX(0);
}

.cf-switch-toggle .composer-switch--on {
  background: #2563eb;
  border-color: #1d4ed8;
}

.cf-switch-toggle .composer-switch--on .composer-switch__text {
  justify-content: flex-start;
  padding-left: 8px;
  padding-right: 0;
  color: rgba(255, 255, 255, 0.92);
}

.cf-switch-toggle .composer-switch--on .composer-switch__knob {
  transform: translateX(calc(var(--composer-switch-w) - var(--composer-switch-knob) - 6px));
}

html[data-theme="dark"] .cf-switch-toggle .composer-switch:not(.composer-switch--on) {
  background: #2a2a2a;
  border-color: rgba(240, 240, 240, 0.12);
}

html[data-theme="dark"] .cf-switch-toggle .composer-switch:not(.composer-switch--on) .composer-switch__text {
  color: #909090;
}

html[data-theme="dark"] .cf-switch-toggle .composer-switch__knob {
  background: #f0f0f0;
}

html[data-theme="dark"] .cf-switch-toggle .composer-switch--on {
  background: #3b82f6;
  border-color: #2563eb;
}
