I was looking for the same style technique. From the point of view of UI / UX, simplifying search forms to one element makes a lot of sense in certain situations.
Consider the example below:

When you approach it in terms of development, the knee-jerk should decide on the style of the form itself, and not on the input elements. The transparent input [type = text] to the left and the transparent PNG send button to the right, and you have a sharp search field.
As you already found out, you are abandoning the CSS style features associated with: focus, because the input field is not the one that controls the background / color, etc. Instead, a form element is used.
Shape: A focus selector would be the perfect way to handle this. Unfortunately, we need to wait for CSS4 for this (thanks matt3141 for tid-bit).
In the meantime, you have several options available.
Option 1 - Disable the click to submit button
I usually try to avoid this, if possible, but you have the option to opt out of the submit button altogether. Create a text box of your choice and use a background image with a position bounded by a left or right margin. When a user types in his query and presses the enter key, you can still activate the GET action. The above example uses this technique.
Example: http://designdisease.com/
Pros: The easiest way to configure.
Disadvantages: users who still click the search buttons may be confused.
Option 2 - Use an alternative element to style the background
Your next option is to use a selector selector and content tags like ov so generously explained in his previous answer. This in effects adds a new element and stylizes it as a new background for the specified area when the focus effect is applied to the input field.
Example: http://jsfiddle.net/ovfiddle/PEK7h/2/
Pros: A simpler extension for larger forms with multiple fields.
Disadvantages: intensive selectors cannot degrade as gracefully as we would like.
Option 3 - Using absolute positioning for a stack of elements
In situations where the text field will cover the entire width of the form, you can use the position: absolute; attribute to simply load the submit button on top of the input element, and then several css buttons on the button to remove the background / border - giving the same effect as our example shown above, but with the added benefit of making it interactive.
Step One: Give the form a position - relative / absolute / fixed.
Step Two: Enter a text box 100% wide.
Step Three: Give the button an absolute position and a right position of 0.
I updated ov to include a new technique:
Example: http://jsfiddle.net/PEK7h/17/
Pro's: It degrades gracefully, gives us what we want in most cases with one input field.
Disadvantages: it is not so easy to expand to large forms, for example, ov fix is.
-
As you can see, each option has its drawbacks, but if you know about them before, you can reduce their impact. Hope this helps!