/* Applies to apartment maps, map popups and the neighborhood map. */
.t3-map-open {
	display: block;
	margin: 12px 0;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.t3-map-floor-control {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0 0 12px;
}

.t3-map-floor-control[hidden] {
	display: none !important;
}

.t3-map-floor-control label {
	flex: 0 0 auto;
	font-size: 14px;
	margin: 0;
}

.t3-map-floor-control select {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
	flex: 1;
	font-size: 16px;
	min-height: 44px;
	min-width: 160px;
	padding: 8px 12px;
	width: auto;
}

.t3-map-floor-control option {
	background: #fff;
	color: #1e1c1c;
}

@media (max-width: 900px) {
	.hsp-popup-overlay .t3-map-floor-control {
		box-sizing: border-box;
		margin: 0;
		padding: 8px 64px 8px 12px;
	}

	/* Keep the picker clear of the popup's floating close button. */
	.hsp-popup-overlay .t3-map-floor-control label {
		clip-path: inset(50%);
		height: 1px;
		overflow: hidden;
		position: absolute;
		white-space: nowrap;
		width: 1px;
	}

	/* Removing the shadow host also removes its fixed-position descendants.
	   The chat session stays mounted and the launcher returns after scrolling
	   away from a map or switching to the grid/list view. */
	body.t3-mobile-map-active [data-sierra-chat-launcher],
	body.av-drawer-open [data-sierra-chat-launcher] {
		display: none !important;
	}

	@supports (height: 100dvh) {
		.av-wrap .t3-sightmap {
			height: min(var(--smh-m, 70vh), max(240px, calc(100dvh - var(--t3-mobile-header-h, 150px) - 24px)));
		}

		body .hsp-popup-overlay .t3-sightmap {
			height: calc(96dvh - var(--t3-map-floor-h, 0px) - 24px);
		}

		body .hsp-popup-overlay:has(.t3-sightmap) .hsp-popup-size-fullscreen {
			height: 96dvh;
			max-height: 96dvh;
		}
	}
}

@media (max-width: 690px) {
	@supports (height: 100dvh) {
		.av-drawer .av-drawer-panel {
			max-height: 100dvh;
			min-height: 100dvh;
		}
	}
}
