<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Styled search</title>
  </head>

  <body>
    <div>
      <form>
        <div>
          <label for="search2">search: </label>
          <input id="search2" name="search2" type="search">
        </div>
      </form>
    </div>
    <script src="scripts.js"></script>
  </body>
</html>
body, form > div {
  display: flex;
}

body {
  margin: 20px auto;
  max-width: 800px;
  justify-content: space-around;
}

form > div {
  align-items: center;
}

input[type="search"] {
  border: 2px solid black;
  border-radius: 16px;
  box-shadow: 1px 1px 1px red;
  height: 32px;
  padding: 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
  outline: none;
}

input[type="search"]:hover, input[type="search"]:focus {
  background: #eee;
  box-shadow: 1px 1px 1px red,
              inset 2px 2px 3px #666;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.