/* CF7 Australian Postcode Autocomplete */

/* The input wrapper needs position:relative for the dropdown to anchor to */
.wpcf7 .cf7-au-postcode-wrap {
  position: relative;
  display: block;
}

/* Make the visible input full-width like other CF7 fields */
.wpcf7 input.cf7-au-postcode {
  width: 100%;
  box-sizing: border-box;
}

/* Dropdown list */
.cf7-apc-dropdown {
  display: none;
  position: absolute;
  z-index: 9999;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Each option */
.cf7-apc-dropdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9em;
  line-height: 1.4;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}

.cf7-apc-dropdown li:last-child {
  border-bottom: none;
}

.cf7-apc-dropdown li:hover,
.cf7-apc-dropdown li.cf7-apc-active {
  background: #f5f7ff;
}

/* Suburb + state */
.cf7-apc-suburb {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf7-apc-suburb em {
  font-style: normal;
  font-weight: 400;
  color: #888;
  margin-left: 4px;
  font-size: 0.85em;
}

/* Postcode number on the right */
.cf7-apc-postcode {
  font-variant-numeric: tabular-nums;
  color: #555;
  font-size: 0.85em;
  flex-shrink: 0;
}

/* Selection label - shown after a suburb is chosen */
.cf7-apc-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f0f4ff;
  border: 1px solid #c0ccee;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

.cf7-apc-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  color: #888;
  padding: 0 0 0 8px;
}

.cf7-apc-clear:hover {
  color: #333;
}
