:root {
	--gu-nz-brand: #056983;
	--gu-nz-brand-dark: #044f63;
	--gu-nz-border: #d7e0e3;
	--gu-nz-muted: #63757c;
}

.gu-nz-address-type {
	margin: 0 0 18px;
	padding: 16px;
	border: 1px solid var(--gu-nz-border);
	border-radius: 10px;
	background: #f7fbfc;
}

.gu-nz-address-type__label {
	display: block;
	margin: 0 0 7px;
	color: #183239;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.35;
}

.gu-nz-address-type__label span {
	color: #cc1818;
}

.gu-nz-address-type__control {
	position: relative;
}

.gu-nz-address-type select {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 42px 10px 13px;
	border: 1px solid #9caeb4;
	border-radius: 7px;
	background-color: #fff;
	color: #183239;
	font: inherit;
	line-height: 1.3;
}

.gu-nz-address-type select:focus {
	border-color: var(--gu-nz-brand);
	outline: 2px solid color-mix(in srgb, var(--gu-nz-brand) 24%, transparent);
	outline-offset: 1px;
}

.gu-nz-address-type select:disabled {
	cursor: wait;
	opacity: 0.72;
}

.gu-nz-address-type__spinner {
	position: absolute;
	top: 50%;
	right: 14px;
	display: none;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid #c7d5d9;
	border-top-color: var(--gu-nz-brand);
	border-radius: 50%;
	animation: gu-nz-spin 0.7s linear infinite;
	pointer-events: none;
}

.gu-nz-address-type__spinner.is-active {
	display: block;
}

.gu-nz-address-type__help,
.gu-nz-locality-help {
	display: block;
	margin: 7px 0 0;
	color: var(--gu-nz-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.45;
}

.gu-nz-address-type .wc-block-components-validation-error {
	margin-top: 7px;
}

.gu-nz-address-type .wc-block-components-validation-error p {
	margin: 0;
	font-size: 12px;
}

.gu-nz-locality-results {
	position: fixed;
	z-index: 999999;
	box-sizing: border-box;
	overflow: auto;
	border: 1px solid #b7c6cb;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 32px rgb(15 49 58 / 16%);
	overscroll-behavior: contain;
}

.gu-nz-locality-results[hidden] {
	display: none !important;
}

.gu-nz-locality-results__option {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 10px 13px;
	border: 0;
	border-bottom: 1px solid #edf1f2;
	border-radius: 0;
	background: #fff;
	color: #183239;
	font-family: inherit;
	font-size: 14px;
	font-weight: 450;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.gu-nz-locality-results__option:last-child {
	border-bottom: 0;
}

.gu-nz-locality-results__option:hover,
.gu-nz-locality-results__option:focus,
.gu-nz-locality-results__option.is-active {
	outline: 0;
	background: #edf7f9;
	color: var(--gu-nz-brand-dark);
}

.gu-nz-locality-results__empty {
	padding: 13px;
	color: var(--gu-nz-muted);
	font-size: 13px;
	line-height: 1.45;
}

.gu-nz-locality-help {
	position: static !important;
	width: auto !important;
	height: auto !important;
	overflow: visible !important;
	clip: auto !important;
	white-space: normal !important;
}

/*
 * The Block's floating City label is the only in-field prompt. Target the
 * native IDs/names as well as our enhancement attribute so React cannot bring
 * the old "Search city or town" placeholder back between renders.
 */
#shipping-city::placeholder,
#billing-city::placeholder,
input[name="shipping_city"]::placeholder,
input[name="billing_city"]::placeholder,
input[data-gu-nz-locality="1"]::placeholder {
	color: transparent !important;
	opacity: 0 !important;
}

/*
 * Before Urban/Rural is selected, WooCommerce formats the temporary zero-cost
 * calculation row as FREE. Hide only that generated price; genuine free
 * shipping continues to display normally once the subtotal qualifies.
 */
.gu-nz-pending-rate-price {
	display: none !important;
}

.gu-nz-phone-required label::after {
	content: " *";
	color: #cc1818;
}

@keyframes gu-nz-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 600px) {
	.gu-nz-address-type {
		margin-bottom: 14px;
		padding: 13px;
		border-radius: 8px;
	}

	.gu-nz-address-type select {
		min-height: 50px;
		font-size: 16px;
	}

	.gu-nz-locality-results {
		max-width: calc(100vw - 16px);
	}

	.gu-nz-locality-results__option {
		min-height: 46px;
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gu-nz-address-type__spinner {
		animation-duration: 1.4s;
	}
}
