/* Checkbox */
.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background-color var(--duration-fast), border-color var(--duration-fast);
  font-family: inherit;
}
.checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 0.3rem;
  height: 0.55rem;
  border-right: 2px solid var(--primary-foreground);
  border-bottom: 2px solid var(--primary-foreground);
}
.checkbox:indeterminate {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox:indeterminate::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0.5rem;
  height: 2px;
  background: var(--primary-foreground);
}
.checkbox:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.checkbox:disabled { cursor: not-allowed; opacity: 0.5; }

/* Switch */
.switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.5rem;
  height: 1.375rem;
  border-radius: 9999px;
  background: var(--input);
  cursor: pointer;
  border: none;
  outline: none;
  transition: background-color var(--duration-fast);
  flex-shrink: 0;
  font-family: inherit;
}
.switch:focus-visible { box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 20%); }
.switch[data-state="checked"] { background: var(--primary); }
.switch-thumb {
  pointer-events: none;
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: oklch(0.98 0 0);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-spring);
  transform: translateX(0.1875rem);
}
.switch[data-state="checked"] .switch-thumb { transform: translateX(1.3125rem); }
.switch:disabled { cursor: not-allowed; opacity: 0.5; }

/* Radio Group */
.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.radio {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color var(--duration-fast);
  font-family: inherit;
}
.radio:checked::after {
  content: '';
  position: absolute;
  inset: 0.1875rem;
  border-radius: 9999px;
  background: var(--primary);
}
.radio:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.radio:disabled { cursor: not-allowed; opacity: 0.5; }
