A. The syntax is presented above.

The following selector matches all <input> elements in an HTML document that are not disabled and don’t have the class .example:

HTML:

<form>
    Phone: <input type="tel" class="example">
    E-mail: <input type="email" disabled="disabled">
    Password: <input type="password">
</form>

CSS:

input:not([disabled]):not(.example){
   background-color: #ccc;
}

The :not() pseudo-class will also support comma-separated selectors in Selectors Level 4:

CSS:

input:not([disabled], .example){
   background-color: #ccc;
}

Live Demo on JSBin

See background syntax here.

B. The :focus-within CSS pseudo-class

HTML:

<h3>Background is blue if the input is focused .</p>
<div>
  <input type="text">
</div>

CSS:

div {
  height: 80px;
}
input{
  margin:30px;
}
div:focus-within {
  background-color: #1565C0;
}

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/48ebf9ef-7aad-4071-87c8-a5a6ac36e006/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ec5f9877-ca91-42ee-98a2-2dff242c12e9/Untitled.png