.maplibregl-popup {
	max-height: 80vh;
	overflow: auto;
}

#showroom-popup {
	position: absolute;
	top: 50%;
	z-index: 10;
	width: clamp(240px, 30vw, 500px);
	max-height: calc(100% - min(200px, 25%));
	overflow: hidden;
	overscroll-behavior: none;
	background-color: #fff;
	box-sizing: border-box;
	transform: translateY(-50%);
	transition: transform 0.32s ease;
	pointer-events: none;
	display: flex;
	flex-direction: column;
}

#showroom-popup > .showroom-popup-inner {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: none;
}

#showroom-popup.showroom-popup-left {
	left: calc(50px + 2vh);
	right: auto;
	transform: translateY(-50%) translateX(calc(-100% - 50px - 2vh));
}

#showroom-popup.showroom-popup-right {
	right: calc(50px + 2vh);
	left: auto;
	transform: translateY(-50%) translateX(calc(100% + 50px + 2vh));
}

#showroom-popup.is-open {
	pointer-events: auto;
}

#showroom-popup.is-dragging {
	transition: none;
}

.showroom-popup-handle {
	display: none;
}

#showroom-popup.showroom-popup-left.is-open,
#showroom-popup.showroom-popup-right.is-open {
	transform: translateY(-50%) translateX(0);
}

#showroom-popup[hidden],
#showroom-popup.showroom-popup-left[hidden],
#showroom-popup.showroom-popup-right[hidden] {
	display: none;
}

#showroom-popup-scrim {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 9;
	pointer-events: none;
	display: block;
	opacity: 0;
	transition: opacity 0.32s ease;
}

#map.has-showroom-popup #showroom-popup-scrim {
	opacity: 1;
}

#map.has-showroom-popup.showroom-popup-left #showroom-popup-scrim {
	left: 0;
	right: auto;
	width: min(75%, calc(clamp(240px, 30vw, 500px) + 50px + 2vh + 200px));
	background: linear-gradient(to right, color-mix(in srgb, var(--black) 32%, transparent), transparent);
}

#map.has-showroom-popup.showroom-popup-right #showroom-popup-scrim {
	right: 0;
	left: auto;
	width: min(75%, calc(clamp(240px, 30vw, 500px) + 50px + 2vh + 200px));
	background: linear-gradient(to left, color-mix(in srgb, var(--black) 32%, transparent), transparent);
}

.maplibregl-marker {
	cursor: pointer;
}

.maplibregl-marker svg {
	transform: scale(1);
	transform-origin: bottom center;
	transition: transform 0.28s ease, filter 0.28s ease;
}

.maplibregl-marker.is-selected {
	z-index: 2 !important;
}

.maplibregl-marker.is-selected svg {
	transform: scale(1.38);
	filter: drop-shadow(0 0 1px #fff) drop-shadow(0 2px 8px color-mix(in srgb, var(--black) 40%, transparent));
}

.showroom-cluster {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: var(--red);
	color: var(--lightest-grey);
	font-family: var(--body);
	font-size: var(--small);
	font-weight: var(--bolder);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 1px 4px color-mix(in srgb, var(--black) 30%, transparent);
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
	border-bottom-color: var(--dark-grey);
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
	border-right-color: var(--dark-grey);
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
	border-left-color: var(--dark-grey);
}

.showroom-popup-more {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	appearance: none;
	outline: none;
	border: 0;
	cursor: pointer;
	color: var(--dark-grey);
	background-color: rgba(255,255,255,0.75);
	right: 2px;
	bottom: 5px;
	height: 22px;
	width: 22px;
	padding: 0;
	border-radius: 11px;
	z-index: 6;
}

.showroom-popup-more[hidden] {
	display: none;
}

.showroom-popup-more::before {
	content: "";
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
	box-sizing: border-box;
}

.maplibregl-popup-close-button {
	appearance: none;
	outline: none;
	font-size: var(--medium-small);
	color: var(--dark-grey);
	font-family: var(--body);
	background-color: rgba(255,255,255,0.75);
	right: 2px;
	top: 2px;
	height: 22px;
	width: 22px;
	padding: 0 0 3px;
	border-radius: 11px;
	z-index: 5;
	line-height: 22px;
}

.maplibregl-popup-content {
	box-sizing: border-box;
	padding: 0;
	border-radius: 0;
}

.maplibregl-popup-content .showroom-image-wrap {
	display: grid;
	position: relative;
}

.maplibregl-popup-content .showroom-image-wrap .showroom-image-container {
	grid-area: 1 / 1;
}

.maplibregl-popup-content .showroom-image-wrap .showroom-image-container.showroom-image-outgoing {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
	transition: opacity 0.32s ease;
}

.maplibregl-popup-content .showroom-image-wrap .showroom-image-container.showroom-image-outgoing.is-leaving {
	opacity: 0;
}

.maplibregl-popup-content .showroom-image-wrap::after {
	content: "";
	grid-area: 1 / 1;
	align-self: start;
	height: 56px;
	background: linear-gradient(to bottom, color-mix(in srgb, var(--black) 48%, transparent), transparent);
	pointer-events: none;
	z-index: 1;
}

.maplibregl-popup-content .showroom-type-brand,
.maplibregl-popup-content .showroom-type-multibrand {
	background-color: var(--red);
	position: absolute;
	left: 0;
	top: 0;
	color: var(--lightest-grey);
	z-index: 2;
    padding: 5px 10px;
    font-size: var(--small);
}

.maplibregl-popup-content .showroom-type-brand-online {
	background-color: var(--light-red);
	position: absolute;
	left: 0;
	top: 0;
	color: var(--lightest-grey);
	z-index: 2;
    padding: 5px 10px;
    font-size: var(--small);
}

.maplibregl-popup-content .showroom-type-reseller,
.maplibregl-popup-content .showroom-type-demonstration {
	background-color: var(--ochre);
	position: absolute;
	left: 0;
	top: 0;
	color: var(--lightest-grey);
	z-index: 2;
    padding: 5px 10px;
    font-size: var(--small);
}

.maplibregl-popup-content .showroom-image-wrap .showroom-type-brand,
.maplibregl-popup-content .showroom-image-wrap .showroom-type-multibrand,
.maplibregl-popup-content .showroom-image-wrap .showroom-type-brand-online,
.maplibregl-popup-content .showroom-image-wrap .showroom-type-reseller,
.maplibregl-popup-content .showroom-image-wrap .showroom-type-demonstration {
	grid-area: 1 / 1;
	position: sticky;
	align-self: start;
	justify-self: start;
	width: max-content;
}

.maplibregl-popup-content .showroom-image-container {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	aspect-ratio: 1.5 / 1;
}

.maplibregl-popup-content .showroom-image-container img {
	display: inline-block;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	object-fit: cover;
	object-position: center center;
}

.maplibregl-popup-content .showroom-navigation-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 8px 0;
	gap: 6px;
}

.maplibregl-popup-content .showroom-navigation-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.3);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.maplibregl-popup-content .showroom-navigation-dot.active {
	background-color: var(--darker-grey);
}

.maplibregl-popup-content .showroom-navigation-dot:hover {
	background-color: rgba(0, 0, 0, 0.5);
}

.maplibregl-popup-content .showroom-text-container {
	padding: 14px 14px 0;
}

.maplibregl-popup-content .showroom-text-container > :last-child {
	padding-bottom: 10px;
}

.maplibregl-popup-content .showroom-image-container ~ .showroom-text-container,
.maplibregl-popup-content .showroom-image-wrap ~ .showroom-text-container,
.maplibregl-popup-content .showroom-navigation-dots ~ .showroom-text-container {
	padding: 7px 14px 0;
}

.maplibregl-popup-content .showroom-type-brand + .showroom-text-container,
.maplibregl-popup-content .showroom-type-multibrand + .showroom-text-container,
.maplibregl-popup-content .showroom-type-brand-online + .showroom-text-container,
.maplibregl-popup-content .showroom-type-reseller + .showroom-text-container,
.maplibregl-popup-content .showroom-type-demonstration + .showroom-text-container {
  padding: 40px 14px 0;
}

.maplibregl-popup-content .showroom-text-container h2 {
	font-family: var(--body);
	font-size: var(--medium-small);
	font-weight: var(--bold);
	color: var(--darker-grey);
	margin: 0;
	line-height: normal;
	max-width: calc(100% - 10px);
}

.maplibregl-popup-content .showroom-text-container p {
	font-family: var(--body);
	font-size: var(--small);
	font-weight: var(--normal);
	color: var(--darker-grey);
	margin: 0;
	padding-bottom: 3px;
}

.maplibregl-popup-content .showroom-text-container a.showroom-directions {
	padding-bottom: 6px;
}

.maplibregl-popup-content .showroom-text-container .showroom-hours-details,
.maplibregl-popup-content .showroom-text-container .showroom-available-models-details {
	font-size: var(--small);
	padding: 4px 0;
	position: relative;
}

.maplibregl-popup-content .showroom-text-container .showroom-details-body,
.maplibregl-popup-content .showroom-text-container .showroom-details-body-inner {
	display: block;
}

.maplibregl-popup-content .showroom-text-container .showroom-hours-summary,
.maplibregl-popup-content .showroom-text-container .showroom-models-summary {
	display: block;
	font-size: var(--small);
	padding-bottom: 5px;
	cursor: default;
	font-family: var(--body);
	font-weight: var(--bold);
}

.maplibregl-popup-content .showroom-text-container .showroom-hours-summary span {
	display: block;
	max-width: 100%;
}

.maplibregl-popup-content .showroom-text-container .showroom-hours-heading {
	font-weight: var(--medium-bold);
	padding-top: 6px;
	padding-bottom: 2px;
}

.maplibregl-popup-content .showroom-text-container .showroom-working-hours-container {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	padding: 0;
}

.maplibregl-popup-content .showroom-text-container .showroom-temporary-hours-container {
	justify-content: space-between;
	padding-bottom: 4px;
}

.maplibregl-popup-content .showroom-text-container .showroom-working-hours-container .showroom-working-days,
.maplibregl-popup-content .showroom-text-container .showroom-working-hours-container .showroom-working-dates,
.maplibregl-popup-content .showroom-text-container .showroom-working-hours-container .showroom-working-hours {
	display: inline-block;
	vertical-align: top;
}

.maplibregl-popup-content .showroom-text-container .showroom-working-hours-container .showroom-working-hours {
	text-align: right;
}

.maplibregl-popup-content .showroom-text-container .is-today {
	font-weight: var(--bolder);
}

.maplibregl-popup-content .showroom-text-container a {
	outline: none;
	text-underline-offset: 2px;
	color: var(--dark-grey);
	font-size: var(--small);
	color: var(--darker-grey);
	display: block;
}

.maplibregl-popup-content .showroom-text-container a.showroom-email {
	padding-top: 4px;
}

.maplibregl-popup-content .showroom-text-container a.showroom-booking-link {
	background-color: var(--turquoise-light);
	display: inline-block;
	border-radius: 4px;
	padding: 6px 12px;
	text-decoration: none;
	color: var(--white);
	margin: 10px 0;
}

.maplibregl-popup-content .showroom-text-container .showroom-available-models-details {
	margin-top: 8px;
	padding-bottom: 0;
}

.maplibregl-popup-content .showroom-text-container .showroom-available-models-details .showroom-available-models-container {
	padding: 0 10px 0 8px;
	text-align: center;
}

.maplibregl-popup-content .showroom-text-container .showroom-available-models-details a.showroom-available-model {
	display: inline-block;
	margin: 0 6px 1px 0;
	padding: 0;
}

@media screen and (max-width: 500px) {
	.maplibregl-ctrl-bottom-left {
		display: none;
	}

	#showroom-popup,
	#showroom-popup.showroom-popup-left,
	#showroom-popup.showroom-popup-right {
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		transform: translateY(100%);
		width: 100%;
		min-height: 0;
		max-height: 70%;
		overflow: visible;
		display: flex;
		flex-direction: column;
		box-shadow: 0 -16px 28px color-mix(in srgb, var(--black) 22%, transparent);
		container-type: inline-size;
	}

	#showroom-popup.is-open,
	#showroom-popup.showroom-popup-left.is-open,
	#showroom-popup.showroom-popup-right.is-open {
		transform: translateY(0);
	}

	#showroom-popup.is-open > .showroom-popup-handle {
		display: flex;
		position: absolute;
		bottom: 100%;
		left: 0;
		right: 0;
		height: 24px;
		z-index: 6;
		align-items: center;
		justify-content: center;
		pointer-events: auto;
		touch-action: none;
	}

	.showroom-popup-handle::before {
		content: "";
		width: 36px;
		height: 5px;
		border-radius: 3px;
		background-color: var(--lighter-grey);
	}

	#map.has-showroom-popup #showroom-popup-scrim,
	#map.has-showroom-popup.showroom-popup-left #showroom-popup-scrim,
	#map.has-showroom-popup.showroom-popup-right #showroom-popup-scrim {
		display: none;
	}

	.maplibregl-popup-content .showroom-image-container {
		aspect-ratio: 2 / 1;
	}

	.maplibregl-popup-content .showroom-text-heading-sentinel {
		height: 1px;
		margin: 0;
		pointer-events: none;
	}

	#showroom-popup > .maplibregl-popup-close-button {
		position: absolute;
		float: none;
		top: 2px;
		right: 2px;
		z-index: 6;
	}

	.maplibregl-popup-content .showroom-text-heading {
		position: sticky;
		top: 0;
		z-index: 3;
		background-color: #fff;
		margin-left: -14px;
		margin-right: -14px;
		padding: 7px 14px 4px;
	}

	.maplibregl-popup-content .showroom-text-heading.is-stuck {
		box-shadow: 0 8px 12px color-mix(in srgb, var(--black) 16%, transparent);
	}

	.maplibregl-popup-content .showroom-text-container .showroom-hours-details .showroom-working-hours-container {
		padding: 0 10px 0 0;
	}

}

@media screen and (max-height: 500px) {
	#showroom-popup,
	#showroom-popup.showroom-popup-left,
	#showroom-popup.showroom-popup-right {
		max-height: calc(100% - 32px);
	}
}

@media (prefers-reduced-motion: reduce) {
	#showroom-popup,
	#showroom-popup-scrim {
		transition: none;
	}
}