.wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-raised);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.box::after {
  content: '';
  display: none;
  width: 4px;
  height: 7px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.input:checked + .box {
  background: var(--amber);
  border-color: var(--amber);
}

.input:checked + .box::after {
  display: block;
}

.input:focus-visible + .box {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-bg);
}

.input:disabled + .box {
  opacity: 0.6;
  cursor: not-allowed;
}

.wrapper:has(.input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

.label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-primary);
}
