/**
 * {CODICTS} Voxel UK Address Field - frontend.
 *
 * This renders on the SITE's surface, which is usually light, so none of the
 * dark admin-framework tokens belong here (Bible 7.8). Colours are neutral and
 * inherit wherever the theme has an opinion.
 */

/* Stacked, full width, like every other field on a Voxel form. An earlier
   side-by-side row fought Voxel's own `form-btn`, which is full width by
   design, and left the input at two thirds the width of the button under it. */
.cdts-ukaddr-search {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cdts-ukaddr-search > .input-container {
	width: 100%;
}

.cdts-ukaddr-find.vx-disabled {
	opacity: .6;
	pointer-events: none;
}

/* Results list. Capped and scrollable: a big-city postcode can return
   dozens of addresses, and an uncapped list pushes the submit button
   off the screen. */
.cdts-ukaddr-results {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	max-height: 260px;
	overflow-y: auto;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
}

.cdts-ukaddr-results li + li {
	border-top: 1px solid rgba(0, 0, 0, .07);
}

.cdts-ukaddr-results li a {
	display: block;
	padding: 10px 14px;
	text-decoration: none;
	color: inherit;
	line-height: 1.4;
}

.cdts-ukaddr-results li a:hover,
.cdts-ukaddr-results li a:focus {
	background: rgba(0, 0, 0, .04);
}

.cdts-ukaddr-notice {
	margin: 10px 0 0;
	font-size: 13px;
	color: #6b7280;
}

.cdts-ukaddr-notice--error {
	color: #b91c1c;
}

/* Actions sit under the field, wrapping rather than squeezing. */
.cdts-ukaddr-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}

.cdts-ukaddr-manual {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 10px;
}

/* Read-only, because the field requires an address chosen from the search.
   Muted rather than hidden - the address still has to be legible, and it
   stays selectable so somebody can copy it. */
.cdts-ukaddr-locked {
	background: rgba(0, 0, 0, .03);
	cursor: default;
}

.cdts-ukaddr-manual--locked label {
	opacity: .75;
}

