/* Map Locations Widget — matches Figma Standorte section */

.map-locations-widget {
	--mmw-map-height: 750px;
	--mmw-gap: 32px;
	--mmw-card-radius: 24px;
	--mmw-map-radius: 12px;
	--mmw-border: #a8a8a8;
	--mmw-text: #161616;
	--mmw-track: #f7f7f7;
	--mmw-thumb: #e0e0e0;
	--mmw-title-size: 22px;
	--mmw-meta-size: 18px;
	--mmw-shadow:
		0 0 80px rgba(0, 0, 0, 0.03),
		0 0 33.422px rgba(0, 0, 0, 0.02),
		0 0 17.869px rgba(0, 0, 0, 0.02),
		0 0 10.017px rgba(0, 0, 0, 0.01),
		0 0 5.32px rgba(0, 0, 0, 0.01),
		0 0 2.214px rgba(0, 0, 0, 0.01);
	width: 100%;
	color: var(--mmw-text);
}

.map-locations-widget__layout {
	display: flex;
	align-items: stretch;
	gap: var(--mmw-gap);
	width: 100%;
}

.map-locations-widget__map {
	flex: 1 1 56%;
	min-width: 0;
	height: var(--mmw-map-height);
	overflow: hidden;
	border-radius: var(--mmw-map-radius);
	background: #f3f3f3;
}

.map-locations-widget__map iframe {
	display: block;
	width: 100% !important;
	height: 100% !important;
	border: 0;
	border-radius: var(--mmw-map-radius);
}

.map-locations-widget__list-panel {
	position: relative;
	flex: 1 1 42%;
	min-width: 0;
	display: flex;
	align-items: stretch;
	gap: 12px;
	height: var(--mmw-map-height);
}

.map-locations-widget__list-wrap {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
}

.map-locations-widget__list-wrap::before,
.map-locations-widget__list-wrap::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 56px;
	pointer-events: none;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.map-locations-widget__list-wrap::before {
	top: 0;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.map-locations-widget__list-wrap::after {
	bottom: 0;
	background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.map-locations-widget__list-wrap.has-top-fade::before,
.map-locations-widget__list-wrap.has-bottom-fade::after {
	opacity: 1;
}

.map-locations-widget__list {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 24px;
	padding: 0 0px 8px 0;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.map-locations-widget__list::-webkit-scrollbar {
	display: none;
}

.map-locations-widget__scrollbar {
	position: relative;
	flex: 0 0 15px;
	width: 15px;
	align-self: stretch;
	border-radius: 999px;
	background: var(--mmw-track);
	overflow: hidden;
}

.map-locations-widget__scrollbar-track {
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.map-locations-widget__scrollbar-thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 22%;
	min-height: 48px;
	border-radius: inherit;
	background: var(--mmw-thumb);
	pointer-events: none;
	will-change: transform;
}

/* flex-shrink: 0 is critical — otherwise cards compress and clip content */
.map-locations-widget__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 0 0 auto;
	gap: 24px;
	width: 100%;
	padding: 28px 32px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--mmw-border);
	border-radius: var(--mmw-card-radius);
	box-shadow: var(--mmw-shadow);
	overflow: visible;
}

.map-locations-widget__card-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	width: 100%;
	min-width: 0;
}

.map-locations-widget__badge {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 5px 10px;
	border: 1px solid var(--mmw-text);
	border-radius: 4px;
	font-family: var(--primr-font-family, "Source Sans Pro", sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--mmw-text);
	background: #fff;
	word-break: break-word;
}

.map-locations-widget .map-locations-widget__card-title {
	margin: 0;
	padding: 0;
	width: 100%;
	font-family: var(--h3-font-family, "Source Sans Pro", sans-serif);
	font-size: var(--mmw-title-size);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--mmw-text);
	hyphens: none;
	-webkit-hyphens: none;
	overflow-wrap: anywhere;
	word-break: normal;
}

.map-locations-widget__card-meta {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	min-width: 0;
}

.map-locations-widget__pin {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	margin-top: 1px;
	color: var(--mmw-text);
	line-height: 0;
}

.map-locations-widget__pin svg {
	display: block;
	width: 28px;
	height: 28px;
}

.map-locations-widget__card-meta-text {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--text-font-family, "Sora", sans-serif);
	font-size: var(--mmw-meta-size);
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: 0.01em;
	color: var(--mmw-text);
	overflow-wrap: anywhere;
}

.map-locations-widget .map-locations-widget__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 16px;
	border: 2px solid #000;
	border-radius: 5px;
	background: #fff;
	box-shadow: 3px 3px 0 #000;
	color: var(--mmw-text) !important;
	font-family: var(--button-font-family, "Sora", sans-serif);
	font-size: 18px;
	font-weight: 450;
	line-height: 1;
	letter-spacing: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-locations-widget .map-locations-widget__button:hover,
.map-locations-widget .map-locations-widget__button:focus-visible {
	transform: translate(1px, 1px);
	box-shadow: 2px 2px 0 #000;
	color: var(--mmw-text) !important;
	background: #fff;
}

.map-locations-widget .map-locations-widget__button:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}

.map-locations-widget__card--makermobil {
	border-color: #161616;
}

.map-locations-widget__empty {
	flex: 0 0 auto;
	padding: 32px;
	border: 1px dashed var(--mmw-border);
	border-radius: var(--mmw-card-radius);
	font-family: var(--text-font-family, "Sora", sans-serif);
	font-size: 16px;
	color: var(--mmw-text);
}

/* Tablet */
@media screen and (max-width: 1024px) {
	.map-locations-widget {
		--mmw-gap: 24px;
		--mmw-title-size: 20px;
		--mmw-meta-size: 16px;
	}

	.map-locations-widget__card {
		padding: 24px;
		gap: 20px;
	}

	.map-locations-widget__list {
		gap:16px;
	}
}

/* Mobile: stack map above list */
@media screen and (max-width: 767px) {
	.map-locations-widget {
		--mmw-gap: 20px;
		--mmw-title-size: 18px;
		--mmw-meta-size: 16px;
	}

	.map-locations-widget__layout {
		flex-direction: column;
	}

	.map-locations-widget__map,
	.map-locations-widget__list-panel {
		flex: 1 1 auto;
		width: 100%;
	}

	.map-locations-widget__map {
		height: min(var(--mmw-map-height), 70vw);
		min-height: 400px;
	}

	.map-locations-widget__list-panel {
		height: auto;
		max-height: none;
	}

	.map-locations-widget__list-wrap {
		height: auto;
		max-height: 400px;
	}

	.map-locations-widget__list {
		height: auto;
		max-height: 400px;
		border-bottom: 0;
		gap:8px;
	}

	.map-locations-widget__scrollbar {
		display: none;
	}

	.map-locations-widget__card {
		padding: 20px;
		gap: 18px;
		border-radius: 16px;
	}

	.map-locations-widget .map-locations-widget__button {
		font-size: 16px;
		min-height: 44px;
	}
}
