/* BHM address autocomplete + zone hard-block */

.bhm-locale-hidden {
	display: none !important;
}

.bhm-address-zone-warning {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border-radius: var(--bhm-radius);
	border: 1px solid #e2b86a;
	background: #fff8e8;
	color: #3d2e0a;
}

.bhm-address-zone-warning.is-error {
	border-color: #c2410c;
	background: #fff1f0;
	color: #7c2d12;
}

.bhm-address-zone-warning__cta {
	margin: 0.45rem 0 0;
}

.bhm-address-zone-warning__tel {
	font-weight: var(--bhm-fw-semibold, 600);
	color: inherit;
}

.bhm-address-zone-warning[hidden] {
	display: none !important;
}

.bhm-address-zone-warning__text {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.45;
}

.bhm-address-zone-warning--quote {
	margin-top: 0.5rem;
}

.bhm-address-zone-warning--pay {
	margin: 0 0 0.85rem;
}

.bhm-address-branding {
	display: inline-block;
	font-size: 0.75rem;
	opacity: 0.7;
}

.bhm-address-ac {
	position: relative;
	display: block;
	width: 100%;
}

.bhm-address-ac__list {
	position: absolute;
	z-index: 40;
	left: 0;
	right: 0;
	top: calc(100% + 2px);
	margin: 0;
	padding: 0.25rem 0;
	list-style: none;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: var(--bhm-radius);
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
	max-height: 240px;
	overflow: auto;
}

.bhm-address-ac__item {
	padding: 0.55rem 0.85rem;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.35;
}

.bhm-address-ac__item:hover,
.bhm-address-ac__item.is-active {
	background: #f2f4f7;
}

.bhm-address-pin {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
}

.bhm-address-pin__row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--bhm-space-2, 0.5rem);
	width: 100%;
}

.bhm-address-pin__field,
.bhm-address-pin__row > .bhm-address-ac,
.bhm-address-pin__row > .woocommerce-input-wrapper,
.bhm-address-pin__row > .wc-block-components-text-input {
	flex: 1 1 12rem;
	width: auto;
	min-width: 0;
}

.bhm-address-pin__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	gap: var(--bhm-space-2, 0.5rem);
	box-sizing: border-box;
	min-height: 44px;
	padding: 0 var(--bhm-space-2, 0.5rem);
	border: 1px solid transparent;
	border-radius: var(--bhm-radius-sm, 4px);
	background: transparent;
	color: var(--bhm-accent, #0764fd);
	font: inherit;
	font-size: var(--bhm-text-small, 0.875rem);
	font-weight: var(--bhm-fw-semibold, 600);
	line-height: 1.2;
	text-decoration: none;
	text-underline-offset: 2px;
	cursor: pointer;
}

.bhm-address-pin__cta-icon {
	display: block;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.bhm-address-pin__cta:hover {
	color: var(--bhm-navy, #0b1220);
	text-decoration: underline;
}

.bhm-address-pin__cta:focus {
	outline: none;
}

.bhm-address-pin__cta:focus-visible {
	color: var(--bhm-navy, #0b1220);
	text-decoration: underline;
	box-shadow: var(--bhm-focus-ring, 0 0 0 3px rgba(7, 100, 253, 0.28));
}

@media (max-width: 767px) {
	.bhm-address-pin__cta {
		width: 100%;
	}
}

.bhm-address-pin__panel {
	display: flex;
	flex-direction: column;
	gap: var(--bhm-space-3, 0.75rem);
	margin-top: var(--bhm-space-3, 0.75rem);
	padding: 0;
	border: 0;
	background: transparent;
}

.bhm-address-pin__panel[hidden] {
	display: none !important;
}

.bhm-address-pin__stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--bhm-border, #e2e8f0);
	border-radius: var(--bhm-radius-sm);
	background: var(--bhm-surface-2, #eef2f7);
}

.bhm-address-pin__map {
	width: 100%;
	height: min(240px, 58vw);
	background: var(--bhm-surface-2, #eef2f7);
}

.bhm-address-pin__locate {
	position: absolute;
	z-index: 2;
	top: 8px;
	left: 8px;
	max-width: min(13.5rem, calc(100% - 52px));
}

.bhm-address-pin__status {
	position: absolute;
	z-index: 2;
	top: calc(8px + var(--bhm-touch, 48px) + 8px);
	left: 8px;
	bottom: auto;
	max-width: calc(100% - 56px);
	margin: 0;
	padding: 6px 10px;
	border: 0;
	border-radius: var(--bhm-radius-sm);
	background: rgba(248, 250, 252, 0.78);
	color: var(--bhm-ink, #0b1220);
	font-size: var(--bhm-text-small, 0.875rem);
	font-weight: var(--bhm-fw-regular, 400);
	line-height: 1.35;
	opacity: 0.92;
	pointer-events: none;
}

.bhm-address-pin__status[hidden] {
	display: none !important;
}

.bhm-address-pin__status.is-solid,
.bhm-address-pin__status.is-error {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	padding: 8px 12px;
	border: 1px solid var(--bhm-border, #e2e8f0);
	border-radius: var(--bhm-radius-sm);
	background: var(--bhm-glass-bg-chrome, rgba(248, 250, 252, 0.92));
	box-shadow: var(--bhm-shadow-sm, 0 4px 12px rgba(2, 16, 86, 0.06));
	text-shadow: none;
	pointer-events: auto;
	opacity: 1;
	font-weight: var(--bhm-fw-semibold, 600);
}

.bhm-address-pin__status.is-solid {
	-webkit-backdrop-filter: var(--bhm-glass-filter, blur(8px) saturate(1.35));
	backdrop-filter: var(--bhm-glass-filter, blur(8px) saturate(1.35));
}

.bhm-address-pin__status.is-error {
	color: var(--bhm-warn, #c45c26);
	border-color: var(--bhm-warn, #c45c26);
	background: var(--bhm-warn-soft, #fff3e8);
}

.bhm-address-pin__confirm {
	box-sizing: border-box;
	width: 100%;
	min-height: var(--bhm-touch, 48px);
	padding: 12px 16px;
	border: 0;
	border-radius: var(--bhm-radius-sm);
	background: var(--bhm-accent, #0764fd);
	color: var(--bhm-paper, #fff);
	font: inherit;
	font-size: var(--bhm-text-small, 0.875rem);
	font-weight: var(--bhm-fw-bold, 700);
	cursor: pointer;
}

.bhm-address-pin__confirm:hover,
.bhm-address-pin__confirm:focus-visible {
	background: var(--bhm-accent-hover, #0554d6);
	outline: none;
	box-shadow: var(--bhm-focus-ring, 0 0 0 3px rgba(7, 100, 253, 0.28));
}

.bhm-address-pin__confirm[hidden] {
	display: none !important;
}

.bhm-address-pin__confirm:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.bhm-address-pin__stage .maplibregl-ctrl-top-right {
	top: 8px;
	right: 8px;
}

.bhm-address-pin__stage .maplibregl-ctrl-group {
	border: 1px solid var(--bhm-border, #e2e8f0);
	border-radius: var(--bhm-radius-sm);
	overflow: hidden;
	box-shadow: var(--bhm-shadow-sm, 0 4px 12px rgba(2, 16, 86, 0.06));
}

.bhm-address-pin__stage .maplibregl-ctrl-bottom-right {
	right: 8px;
	bottom: 8px;
}

.bhm-address-pin__stage .maplibregl-ctrl-attrib:not(.maplibregl-compact-show) {
	width: 24px !important;
	min-width: 24px !important;
	max-width: 24px !important;
	height: 24px !important;
	min-height: 24px !important;
	margin: 0;
	padding: 0 !important;
	overflow: hidden !important;
	font-size: var(--bhm-text-kicker, 0.78rem);
	line-height: 1.3;
	background: var(--bhm-glass-bg-chrome, rgba(248, 250, 252, 0.92));
}

.bhm-address-pin__stage .maplibregl-ctrl-attrib:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner {
	display: none !important;
}

.bhm-address-pin__stage .maplibregl-ctrl-attrib.maplibregl-compact-show {
	width: auto !important;
	max-width: min(70%, 16rem) !important;
	height: auto !important;
	overflow: visible !important;
	padding: 4px 8px !important;
}

.bhm-address-pin__stage .maplibregl-cooperative-gesture-screen {
	background: rgba(11, 18, 32, 0.42);
}

.bhm-address-pin__stage .maplibregl-cooperative-gesture-screen .maplibregl-cooperative-gesture-message {
	max-width: 16rem;
	padding: 8px 12px;
	border-radius: var(--bhm-radius-sm);
	background: var(--bhm-glass-bg-chrome, rgba(248, 250, 252, 0.92));
	-webkit-backdrop-filter: var(--bhm-glass-filter, blur(8px) saturate(1.35));
	backdrop-filter: var(--bhm-glass-filter, blur(8px) saturate(1.35));
	color: var(--bhm-ink, #0b1220);
	font-size: var(--bhm-text-small, 0.875rem);
	font-weight: var(--bhm-fw-semibold, 600);
	line-height: 1.35;
	box-shadow: var(--bhm-shadow-sm, 0 4px 12px rgba(2, 16, 86, 0.06));
}

@media (prefers-reduced-transparency: reduce) {
	.bhm-locate--overlay,
	.bhm-address-pin__status.is-solid,
	.bhm-address-pin__stage .maplibregl-cooperative-gesture-message {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background: var(--bhm-paper, #fff);
	}
}

@media (min-width: 768px) {
	.bhm-address-pin__map {
		height: 280px;
	}
}

@media (min-width: 1100px) {
	.bhm-address-pin__map {
		height: 320px;
	}
}

/* Hide Blocks additional geo fields — filled by pin JS, persisted via Store API. */
.wc-block-checkout__form .wc-block-components-text-input:has(input[id*="bhmpro/geo-lat"]),
.wc-block-checkout__form .wc-block-components-text-input:has(input[id*="bhmpro/geo-lng"]),
.wc-block-checkout__form .wc-block-components-text-input:has(input[id*="bhmpro/geo-source"]),
.woocommerce-checkout .wc-block-components-text-input:has(input[id*="bhmpro-geo-lat"]),
.woocommerce-checkout .wc-block-components-text-input:has(input[id*="bhmpro-geo-lng"]),
.woocommerce-checkout .wc-block-components-text-input:has(input[id*="bhmpro-geo-source"]) {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
