# CSS Classes

## idpc\_autocomplete

This class is applied to a div element that encapsulates the Address Lookup functionality. It is used to style the container that includes the text input and the list of suggestions.

![Address Lookup idpc\_autocomplete image](/img/idpc_autocomplete.png)

Example CSS:

```css
.idpc_autocomplete {
  width: 100%;
  max-width: 400px;
  background-color: #B3E5FC;
  border: 1px solid #81D4FA;
}
```

***

## idpc\_ul

Applied to the unordered list (ul) containing suggestions, styled to improve readability and interaction.

![Address Lookup idpc\_ul image](/img/idpc_ul.png)

Example CSS:

```css
.idpc_ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #FFCCBC;
  border: 1px solid #FFAB91;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
```

***

## idpc\_error

Div that contains the error message.

![Address Lookup idpc\_error image](/img/idpc_error.png)

Example CSS:

```css
.idpc_error {
  color: #ffffff;
  background-color: #f44336;
  padding: 8px;
  border-bottom: 1px solid #d32f2f;
}
```

***

## idpc\_toolbar

This class is applied to the div element that encapsulates the country selection functionality. It is used to style the container.

![Address Lookup idpc\_toolbar image](/img/idpc_toolbar.png)

Example CSS:

```css
.idpc_toolbar {
  background-color: #64B5F6;
  color: #FFF176;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #42A5F5;
}
```

***

## idpc\_country

This class is applied to the div element that encapsulates the country selection functionality. It is used to style the container.

![Address Lookup idpc\_country image](/img/idpc_country.png)

Example CSS:

```css
.idpc_country {
  background-color: #FFB74D;
  color: #6A1B9A;
  padding: 5px 10px;
  display: inline-block;
  margin: 5px 0;
  border-radius: 4px;
  font-weight: bold;
}
```

***

## Demo

You can use the Sandbox below to try it out:

Loading...

```
<form>
<label for="line_1">Address First Line</label>
<input type="text" id="line_1" />
<label for="line_2">Address Second Line</label>
<input type="text" id="line_2" />
<label for="city">City</label>
<input type="text" id="city" />
<label for="state">State</label>
<input type="text" id="state" />
<label for="zipcode">Zip Code</label>
<input type="text" id="zipcode" />
</form>
```

```

import { AddressLookup } from "@addresszen/address-lookup";

AddressLookup.setup({
  apiKey: "ak_test",
  outputFields: {
    line_1: "#line_1",
    line_2: "#line_2",
    city: "#city",
    state: "#state",
    zip_plus_4_code: "#zipcode",
  },
});
```

```
.idpc_autocomplete {
width: 100%;
max-width: 400px;
background-color: #B3E5FC;
border: 1px solid #81D4FA;
}

.idpc_ul {
list-style: none;
padding: 0;
margin: 0;
background-color: #FFCCBC;
border: 1px solid #FFAB91;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.idpc_error {
color: #ffffff;
background-color: #f44336;
padding: 8px;
border-bottom: 1px solid #d32f2f;
}

.idpc_toolbar {
background-color: #64B5F6;
color: #FFF176;
padding: 10px 15px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #42A5F5;
}

.idpc_country {
background-color: #FFB74D;
color: #6A1B9A;
padding: 5px 10px;
display: inline-block;
margin: 5px 0;
border-radius: 4px;
font-weight: bold;
}
```
