/**
 * Stakeholder Map: search, filters, map, popup and list.
 *
 * Sizes, colours, radii and borders follow the approved prototype. Only the typeface comes from the site
 * (inherited), and the site's blue and purple are used for the prototype's teal and pink.
 *
 * Layout: on phones and tablets search and filters come first, then the map, then the results. From 64em
 * (the theme's own breakpoint) the filters and results sit in a sidebar next to the map.
 */

.seb-sm {
	--seb-sm-teal: var(--wp--preset--color--blue, #0392b0);
	--seb-sm-pink: var(--wp--preset--color--purple, #b80f80);
	--seb-sm-dark: #1d3a4a;
	--seb-sm-muted: #6b7f88;
	--seb-sm-border: #d4dde0;
	--seb-sm-line: #e2e8ea;
	--seb-sm-c: #5f6b72; /* Rolle colour, set per element */
	--seb-sm-map-h: clamp( 420px, 68vh, 760px );
	--seb-sm-gutter: 16px;

	/* Full width: break out of the page's side margins (the parent is centred, so half the difference works). */
	width: 100vw;
	max-width: 100vw;
	margin-block: 2rem;
	margin-inline: calc( 50% - 50vw );
	color: var( --seb-sm-dark );
	font-size: 1rem;
	line-height: 1.4;
}

/* 100vw includes the scrollbar; do not let that add a horizontal scrollbar. */
body:has( .seb-sm ) {
	overflow-x: clip;
}

/* Existing pages put the shortcode into a grid layout that would squeeze the map into one cell. */
.is-layout-grid:has( .seb-sm ) {
	display: block !important;
}

.seb-sm *,
.seb-sm *::before,
.seb-sm *::after {
	box-sizing: border-box;
}

/* The theme sets display on some elements; `hidden` has to win. */
.seb-sm [hidden] {
	display: none !important;
}

/* The theme removes focus outlines site-wide; keep a visible focus for keyboard users. */
.seb-sm :focus-visible {
	outline: 3px solid var( --seb-sm-dark );
	outline-offset: 2px;
}

:where( .seb-sm ) :where( button, input, select ) {
	font: inherit;
	color: inherit;
}

.seb-sm__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.seb-sm__skip {
	position: absolute;
	left: -9999px;
}
.seb-sm__skip:focus {
	position: static;
	display: inline-block;
	margin-bottom: 0.75rem;
	padding: 0.4rem 0.8rem;
	background: var( --seb-sm-dark );
	color: #fff;
}

/* ---------------------------------------------------------------- notice */

.seb-sm__skip:focus,
.seb-sm__notice,
.seb-sm__bar,
.seb-sm__app {
	margin-inline: var( --seb-sm-gutter );
}

.seb-sm__notice {
	margin: 0 var( --seb-sm-gutter ) 1rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid var( --seb-sm-teal );
	border-radius: 6px;
	background: #e6f5f6;
	font-size: 0.86rem;
}
.seb-sm__notice a {
	font-weight: 600;
}

/* ---------------------------------------------------------------- search + button (prototype header) */

.seb-sm__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-bottom: 1rem;
}
.seb-sm__search {
	position: relative;
	flex: 1 1 14rem;
	max-width: 26rem;
}
.seb-sm__search::before {
	content: '🔍';
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY( -50% );
	font-size: 0.85rem;
	line-height: 1;
	pointer-events: none;
}
.seb-sm__search-input {
	display: block;
	width: 100%;
	margin: 0;
	padding: 9px 12px 9px 36px;
	border: 1.5px solid var( --seb-sm-border );
	border-radius: 8px;
	background: #fff;
	font-size: 0.9rem;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
}
.seb-sm__search-input:focus {
	outline: none;
	border-color: var( --seb-sm-teal );
}
.seb-sm__search-input:focus-visible {
	outline: none;
}

.seb-sm__join,
.seb-sm__toggle {
	display: inline-block;
	padding: 9px 16px;
	border: 0;
	border-radius: 8px;
	background: var( --seb-sm-teal );
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}
.seb-sm__join:hover {
	filter: brightness( 1.08 );
	color: #fff;
}

/* ---------------------------------------------------------------- join dialog */
/* The sizes and colours follow the prototype's "Werde Teil der Map" window. */

.seb-sm__dialog {
	width: min( 560px, 92vw );
	max-width: none;
	max-height: 88vh;
	max-height: 88dvh;
	padding: 24px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: var( --seb-sm-dark );
	overflow-y: auto;
}
.seb-sm__dialog::backdrop {
	background: rgba( 20, 40, 50, 0.55 );
}
html.seb-sm-dialog-open {
	overflow: hidden;
}
.seb-sm__dialog-close {
	position: sticky;
	top: 0;
	z-index: 5;
	float: right;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f0f5f6;
	color: var( --seb-sm-dark );
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}
.seb-sm__dialog-close:hover {
	background: #dce8ea;
}
.seb-sm__dialog-title {
	margin: 0 0 4px;
	color: var( --seb-sm-teal );
	font-size: 1.15rem;
	line-height: 1.3;
}
/* The explanation before the form. After a successful submit only the confirmation is left. */
.seb-sm__dialog:has( .gform_confirmation_wrapper ) .seb-sm__intro {
	display: none;
}
.seb-sm__intro p {
	margin: 10px 0 18px;
	font-size: 0.88rem;
	line-height: 1.6;
	color: var( --seb-sm-dark );
}
.seb-sm__intro-next {
	display: block;
	margin-left: auto;
}

/* Keep the error summary clear of the sticky close button when the dialog scrolls to it. */
.seb-sm__dialog .gform_validation_errors {
	scroll-margin-top: 40px;
}

/* The form (Gravity Forms). */
.seb-sm__dialog .gform_wrapper {
	margin: 0;
	padding: 0;
	font-size: 0.85rem;
	/* Gravity Forms colours its buttons and focus rings from these; it prints its own values on the form
	   element with a very specific selector, hence !important. */
	--gf-color-primary: var( --seb-sm-teal ) !important;
	--gf-color-primary-darker: var( --seb-sm-teal ) !important;
	--gf-color-primary-lighter: var( --seb-sm-teal ) !important;
	--gf-ctrl-btn-bg-color-primary: var( --seb-sm-teal ) !important;
	--gf-ctrl-btn-bg-color-hover-primary: var( --seb-sm-teal ) !important;
	--gf-ctrl-btn-border-color-primary: var( --seb-sm-teal ) !important;
	--gf-ctrl-btn-border-color-hover-primary: var( --seb-sm-teal ) !important;
}
.seb-sm__dialog .gform_wrapper .gform_fields {
	row-gap: 0;
}
.seb-sm__dialog .gform_wrapper .gform_required_legend,
.seb-sm__dialog .gform_wrapper .gfield_required {
	display: none; /* the sections say "(Pflicht)" instead of every field carrying a star */
}

/* Sections as cards (see decorateForm() in map.js). Without JavaScript the headings simply stand between the questions. */
.seb-sm__dialog .gform_wrapper .seb-sm-fs {
	min-width: 0;
	margin: 14px 0 0;
	padding: 10px 14px 14px;
	border: 1.5px solid var( --seb-sm-line );
	border-radius: 8px;
	grid-column: 1 / -1;
}
.seb-sm__dialog .gform_wrapper .seb-sm-fs:not( :has( > .gfield:not( [style*="display: none"] ):not( [style*="display:none"] ) ) ) {
	display: none; /* every question of the section is hidden by the chosen path */
}
.seb-sm__dialog .gform_wrapper .seb-sm-fs > legend {
	padding: 0 6px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.4;
	color: var( --seb-sm-dark );
}
.seb-sm__dialog .gform_wrapper .seb-sm-fs__req {
	color: var( --seb-sm-pink );
	font-size: 0.7rem;
	font-weight: 600;
}
.seb-sm__dialog .gform_wrapper .seb-sm-fs .gsection {
	margin: 0;
	padding: 0;
	border: 0;
}
.seb-sm__dialog .gform_wrapper .seb-sm-fs .gsection_title {
	display: none; /* now the legend */
}
.seb-sm__dialog .gform_wrapper .gsection_description {
	margin: 6px 0 0;
	font-size: 0.74rem;
	line-height: 1.5;
	color: #55696f;
}
.seb-sm__dialog .gform_wrapper .gsection:not( .seb-sm-fs .gsection ) {
	margin-top: 14px;
	padding: 0;
	border: 0;
	border-top: 2px solid var( --seb-sm-line );
}
.seb-sm__dialog .gform_wrapper .gsection_title {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.3;
}

/* Questions */
.seb-sm__dialog .gform_wrapper .gfield {
	margin: 22px 0 0; /* the gap above a question is clearly bigger than the gap inside it */
}
.seb-sm__dialog .gform_wrapper .seb-sm-fs > .gfield:first-of-type,
.seb-sm__dialog .gform_wrapper .seb-sm-fs > .gsection + .gfield {
	margin-top: 8px;
}
.seb-sm__dialog .gform_wrapper .gfield_label,
.seb-sm__dialog .gform_wrapper legend.gfield_label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
	color: var( --seb-sm-dark );
}
.seb-sm__dialog .gform_wrapper .gfield_description {
	margin: 6px 0 0;
	padding: 0;
	font-size: 0.74rem;
	line-height: 1.5;
	color: #55696f;
}
.seb-sm__dialog .gform_wrapper .ginput_container_text .ginput_counter {
	display: none; /* single-line fields stop at their limit anyway; the counter stays on the text areas */
}
.seb-sm__dialog .gform_wrapper .ginput_counter {
	font-size: 0.74rem;
	color: #55696f;
}
.seb-sm__dialog .gform_wrapper input[type="text"],
.seb-sm__dialog .gform_wrapper input[type="email"],
.seb-sm__dialog .gform_wrapper input[type="url"],
.seb-sm__dialog .gform_wrapper input[type="number"],
.seb-sm__dialog .gform_wrapper textarea,
.seb-sm__dialog .gform_wrapper select {
	box-sizing: border-box;
	inline-size: 100%;
	padding: 8px;
	border: 1.5px solid var( --seb-sm-border );
	border-radius: 8px;
	background-color: #fff;
	font-family: inherit;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var( --seb-sm-dark );
}
.seb-sm__dialog .gform_wrapper input::placeholder,
.seb-sm__dialog .gform_wrapper textarea::placeholder {
	color: #8a999f;
}
.seb-sm__dialog .gform_wrapper input[type="text"]:focus,
.seb-sm__dialog .gform_wrapper input[type="email"]:focus,
.seb-sm__dialog .gform_wrapper input[type="url"]:focus,
.seb-sm__dialog .gform_wrapper input[type="number"]:focus,
.seb-sm__dialog .gform_wrapper textarea:focus,
.seb-sm__dialog .gform_wrapper select:focus {
	border-color: var( --seb-sm-teal );
	outline: 2px solid var( --seb-sm-teal );
	outline-offset: 1px;
}

/* Radio buttons and checkboxes */
.seb-sm__dialog .gform_wrapper .gfield:not( .seb-sm-chips ) .gfield_radio,
.seb-sm__dialog .gform_wrapper .gfield:not( .seb-sm-chips ) .gfield_checkbox {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.seb-sm__dialog .gform_wrapper .gchoice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
}
/* Plain browser checkboxes and radio buttons, as in the design, instead of Gravity Forms' drawn ones. */
.seb-sm__dialog .gform_wrapper .gchoice:not( .seb-sm-chips .gchoice ) input[type="radio"],
.seb-sm__dialog .gform_wrapper .gchoice:not( .seb-sm-chips .gchoice ) input[type="checkbox"] {
	-webkit-appearance: auto !important;
	appearance: auto !important;
	flex: none;
	inline-size: 13px !important;
	block-size: 13px !important;
	margin: 0.2em 0 0 !important;
	padding: 0 !important;
	border: revert !important;
	border-radius: revert !important;
	background: revert !important;
	box-shadow: none !important;
}
.seb-sm__dialog .gform_wrapper .gchoice:not( .seb-sm-chips .gchoice ) input[type="radio"]::before,
.seb-sm__dialog .gform_wrapper .gchoice:not( .seb-sm-chips .gchoice ) input[type="radio"]::after,
.seb-sm__dialog .gform_wrapper .gchoice:not( .seb-sm-chips .gchoice ) input[type="checkbox"]::before,
.seb-sm__dialog .gform_wrapper .gchoice:not( .seb-sm-chips .gchoice ) input[type="checkbox"]::after {
	content: none !important;
}
.seb-sm__dialog .gform_wrapper .gchoice label {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.45;
	color: var( --seb-sm-dark );
}
/* An explanation under a single choice, aligned with its label: box and label in the first row, the text
   below the label. */
.seb-sm__dialog .gform_wrapper .gchoice:has( > .seb-sm-choice-hint ) {
	display: grid;
	grid-template-columns: 13px minmax( 0, 1fr );
	column-gap: 8px;
	row-gap: 2px;
}
.seb-sm__dialog .gform_wrapper .seb-sm-choice-hint {
	grid-column: 2;
	font-size: 0.74rem;
	line-height: 1.5;
	color: #55696f;
}
/* Chips (Themenfelder, Angebote, Branche), like the filter chips on the map: the input is hidden, its label is the chip. */
.seb-sm__dialog .gform_wrapper .seb-sm-chips .gfield_checkbox {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 6px;
	padding: 0;
}
.seb-sm__dialog .gform_wrapper .seb-sm-chips .gchoice {
	position: relative;
	display: block;
	margin: 0;
}
.seb-sm__dialog .gform_wrapper .seb-sm-chips input[type="checkbox"] {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	inline-size: 1px;
	block-size: 1px;
	margin: 0;
	opacity: 0;
}
.seb-sm__dialog .gform_wrapper .seb-sm-chips .gchoice label {
	display: inline-block;
	padding: 4px 10px;
	border: 1.5px solid var( --seb-sm-border );
	border-radius: 12px;
	background: #fff;
	font-size: 0.76rem;
	line-height: 1.4;
	cursor: pointer;
	user-select: none;
}
.seb-sm__dialog .gform_wrapper .seb-sm-chips .gchoice label:hover {
	border-color: var( --seb-sm-teal );
}
.seb-sm__dialog .gform_wrapper .seb-sm-chips input:checked + label {
	border-color: var( --seb-sm-teal );
	background: var( --seb-sm-teal );
	color: #fff;
}
.seb-sm__dialog .gform_wrapper .seb-sm-chips input:focus-visible + label {
	outline: 2px solid var( --seb-sm-dark );
	outline-offset: 2px;
}

/* Note below the sections */
.seb-sm__dialog .gform_wrapper .seb-sm-note {
	margin-top: 14px;
	padding: 10px 12px;
	border-left: 4px solid var( --seb-sm-teal );
	border-radius: 6px;
	background: #e6f5f6;
	font-size: 0.78rem;
	line-height: 1.5;
}
.seb-sm__dialog .gform_wrapper .seb-sm-note p {
	margin: 0;
}

/* Buttons */
.seb-sm__dialog .gform_wrapper .gform_footer,
.seb-sm__dialog .gform_wrapper .gform_page_footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
}
.seb-sm__dialog .gform_wrapper.gform-theme .gform_footer .gform_button,
.seb-sm__dialog .gform_wrapper.gform-theme .gform_footer input[type="submit"] {
	/* The same button as "Werde Teil der Map" (.seb-sm__join). !important because Gravity Forms styles
	   every button inside the form through its own variables. */
	display: inline-block !important;
	inline-size: auto !important;
	block-size: calc( 1.4 * 0.85rem + 18px ) !important; /* an <input> ignores line-height: same height as the join button */
	min-block-size: 0 !important;
	margin: 0 !important;
	padding: 9px 16px !important;
	border: 0 !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	background: var( --seb-sm-teal ) !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 0.85rem !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-decoration: none;
	cursor: pointer;
}
.seb-sm__dialog .gform_wrapper.gform-theme .gform_footer .gform_button:hover {
	filter: brightness( 1.08 );
}
.seb-sm__dialog .gform_wrapper.gform-theme .gform_footer .seb-sm-cancel {
	/* "Ghost" button of the design: white, so it is not mistaken for the submit button. !important because
	   Gravity Forms styles every button inside the form through its own variables. */
	margin: 0 !important;
	padding: 8px 16px !important; /* 1px less each side: the border makes up the height of the teal buttons */
	border: 1.5px solid var( --seb-sm-border ) !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: var( --seb-sm-dark ) !important;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
}
.seb-sm__dialog .gform_wrapper.gform-theme .gform_footer .seb-sm-cancel:hover {
	border-color: var( --seb-sm-teal ) !important;
}
.seb-sm__dialog .gform_confirmation_message {
	font-size: 0.85rem;
}

@media ( prefers-reduced-motion: no-preference ) {
	.seb-sm__dialog[open] {
		animation: seb-sm-dialog-in 0.18s ease-out;
	}
	@keyframes seb-sm-dialog-in {
		from { opacity: 0; transform: translateY( 8px ); }
		to { opacity: 1; transform: none; }
	}
}

/* ---------------------------------------------------------------- layout */

.seb-sm__app {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
/* On small screens the sidebar parts take part in the page flow: filters, count, map, results. */
.seb-sm__side {
	display: contents;
}
.seb-sm__filters {
	order: 1;
}
.seb-sm__count {
	order: 2;
}
.seb-sm__map {
	order: 3;
}
.seb-sm__listing {
	order: 4;
}

@media ( min-width: 601px ) {
	.seb-sm {
		--seb-sm-gutter: 20px; /* the prototype's header padding */
	}
}
@media ( max-width: 600px ) {
	.seb-sm {
		--seb-sm-map-h: min( 70vh, 480px );
	}
}

@media ( min-width: 64em ) {
	.seb-sm {
		--seb-sm-map-h: clamp( 36rem, 80vh, 50rem );
	}
	/* Sidebar and map run edge to edge. */
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__app {
		display: grid;
		grid-template-columns: 300px minmax( 0, 1fr );
		gap: 0;
		height: var( --seb-sm-map-h );
		margin-inline: 0;
		overflow: hidden;
		border-block: 1px solid var( --seb-sm-line );
	}
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__side {
		display: block;
		min-height: 0;
		padding: 16px;
		overflow-y: auto;
		border-right: 1px solid var( --seb-sm-line );
		background: #fff;
	}
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__map {
		height: 100%;
		border: 0;
		border-radius: 0;
	}
}

/* Map-only view (e.g. embedded on another site): the map alone, full width, no sidebar column. */
.seb-sm--map-only .seb-sm__app {
	margin-inline: 0;
}
.seb-sm--map-only .seb-sm__notice {
	margin-inline: 0;
}
@media ( min-width: 64em ) {
	.seb-sm.seb-sm--map-only:not( .seb-sm--no-map ) .seb-sm__app {
		display: block;
		height: auto;
		overflow: visible;
		border-block: 0;
	}
	.seb-sm.seb-sm--map-only:not( .seb-sm--no-map ) .seb-sm__map {
		height: var( --seb-sm-map-h );
		border: 1px solid var( --seb-sm-line );
		border-radius: 10px;
	}
}

/* ---------------------------------------------------------------- filters */

/* Phones: the filters fold away behind a button. */
.seb-sm__filters-toggle {
	display: flex;
	align-items: center;
	gap: 0.6em;
	width: 100%;
	padding: 9px 16px;
	border: 1.5px solid var( --seb-sm-border );
	border-radius: 8px;
	background: #fff;
	color: var( --seb-sm-dark );
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}
.seb-sm__filters-toggle::after {
	content: '';
	width: 0.5em;
	height: 0.5em;
	margin-left: auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate( 45deg ) translate( -2px, -2px );
}
.seb-sm__filters-toggle[aria-expanded='true']::after {
	transform: rotate( -135deg ) translate( -2px, -2px );
}
.seb-sm__filters-active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5em;
	height: 1.5em;
	padding: 0 0.4em;
	border-radius: 999px;
	background: var( --seb-sm-pink );
	color: #fff;
	font-size: 0.8em;
	font-weight: 700;
}

.seb-sm__filters-body {
	display: none;
	margin-top: 0.5rem;
	padding: 16px;
	border: 1px solid var( --seb-sm-line );
	border-radius: 8px;
	background: #fff;
}
.seb-sm__filters-body.is-open {
	display: block;
}

@media ( min-width: 64em ) {
	.seb-sm__filters-toggle {
		display: none;
	}
	.seb-sm__filters-body {
		display: block;
	}
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__filters-body {
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
	}
	/* Without a map there is no sidebar: the filter groups sit side by side above the results. */
	.seb-sm--no-map .seb-sm__filters-body {
		display: grid;
		grid-template-columns: repeat( auto-fit, minmax( 16rem, 1fr ) );
		gap: 1rem;
		align-items: start;
	}
	.seb-sm--no-map .seb-sm__filters-body > .seb-sm__group {
		margin: 0;
	}
}

/* Group titles: the prototype's small grey capitals. */
.seb-sm__group {
	min-width: 0;
	margin: 14px 0 0;
	padding: 0;
	border: 0;
}
.seb-sm__filters-body > :first-child {
	margin-top: 0;
}
.seb-sm__group > legend,
.seb-sm__legend {
	display: block;
	float: left; /* a floated legend sits inside the fieldset instead of on its border */
	width: 100%;
	margin: 0 0 8px;
	padding: 0;
	color: var( --seb-sm-muted );
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}
.seb-sm__legend {
	float: none;
}
.seb-sm__group > legend + * {
	clear: both;
}

/* "Ich suche ein Angebot" */
.seb-sm__group--offer {
	margin: 0 0 16px;
	padding: 12px;
	border: 1.5px solid #b8e2e4;
	border-radius: 10px;
	background: #e6f5f6;
}
.seb-sm__group--offer > legend {
	color: var( --seb-sm-teal );
}
.seb-sm__hint {
	margin: 0 0 8px;
	color: #55696f;
	font-size: 0.74rem;
	line-height: 1.4;
}

.seb-sm__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.seb-sm__chip {
	padding: 4px 10px;
	border: 1.5px solid var( --seb-sm-border );
	border-radius: 12px;
	background: #fff;
	font-size: 0.76rem;
	line-height: 1.4;
	cursor: pointer;
	user-select: none;
}
.seb-sm__chip[aria-pressed='true'] {
	border-color: var( --seb-sm-teal );
	background: var( --seb-sm-teal );
	color: #fff;
}
.seb-sm__group--offer .seb-sm__chip[aria-pressed='true'] {
	border-color: var( --seb-sm-dark );
	background: var( --seb-sm-dark );
}

/* Rolle: a row per role. Once roles are selected, the others are dimmed. */
.seb-sm__role-opt {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 5px 6px;
	border: 0;
	border-radius: 6px;
	background: none;
	font-size: 0.86rem;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	user-select: none;
}
.seb-sm__role-opt:hover {
	background: #f0f5f6;
}
.seb-sm__role-opt[aria-pressed='true'] {
	background: #f0f5f6;
	font-weight: 600;
}
.seb-sm__group--role.is-filtered .seb-sm__role-opt[aria-pressed='false'] {
	opacity: 0.35;
}
.seb-sm__role-count {
	margin-left: auto;
	color: #8aa0a8;
	font-size: 0.75rem;
}

.seb-sm__dot {
	display: inline-block;
	flex: none;
	width: 13px;
	height: 13px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var( --seb-sm-c );
	box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.15 );
}

/* Bezirk */
.seb-sm__district {
	display: block;
	width: 100%;
	margin: 0;
	padding: 8px 36px 8px 8px;
	border: 1.5px solid var( --seb-sm-border );
	border-radius: 8px;
	background: #fff url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d3a4a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ) no-repeat right 14px center;
	font-size: 0.86rem;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.seb-sm__reset,
.seb-sm__roles-all {
	padding: 0;
	border: 0;
	background: none;
	color: var( --seb-sm-pink );
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.seb-sm__reset:hover,
.seb-sm__roles-all:hover {
	text-decoration: none;
}
.seb-sm__roles-all {
	margin: 6px;
}
.seb-sm__filters-body > .seb-sm__reset {
	display: block;
	margin-top: 14px;
}

/* ---------------------------------------------------------------- map */

.seb-sm__map {
	position: relative;
	isolation: isolate; /* keeps Leaflet's high z-indexes below sticky headers and menus */
	container-type: inline-size; /* lets the popup size itself against the map width (cqw) */
	width: 100%;
	height: var( --seb-sm-map-h );
	border: 1px solid var( --seb-sm-line );
	border-radius: 10px;
	background: #f0f0f0;
	font-family: inherit;
}
/* Phones: the map runs edge to edge (no side margin, border or rounded corners), which leaves the popup more room.
   Placed after the base rule above so it wins; the map-only view has no side margin to pull out of. */
@media ( max-width: 600px ) {
	.seb-sm:not( .seb-sm--map-only ) .seb-sm__map {
		/* No fixed width: in the column layout the map stretches, so the negative margins widen it on both sides. */
		width: auto;
		margin-inline: calc( -1 * var( --seb-sm-gutter ) );
		border-inline: 0;
		border-radius: 0;
	}
}

.seb-sm .leaflet-container {
	font-family: inherit;
}
.seb-sm .leaflet-control-attribution a {
	text-decoration: underline;
}
.seb-sm .leaflet-container:focus-visible,
.seb-sm .leaflet-bar a:focus-visible,
.seb-sm .leaflet-popup-close-button:focus-visible {
	outline: 3px solid var( --seb-sm-dark );
	outline-offset: 2px;
}

/* Pins: a rounded square turned by 45 degrees, point down, as in the prototype. */
.seb-sm-pin {
	background: none;
	border: 0;
}
.seb-sm-pin__drop {
	width: 26px;
	height: 26px;
	border: 2.5px solid #fff;
	border-radius: 50% 50% 50% 0;
	box-shadow: 1px 2px 5px rgba( 0, 0, 0, 0.35 );
	transform: rotate( -45deg );
}
.seb-sm-pin:focus-visible {
	outline: 3px solid var( --seb-sm-dark );
	outline-offset: 3px;
	border-radius: 8px;
}

/* Clusters use the markercluster default look (MarkerCluster.Default.css). */
.seb-sm .marker-cluster:focus-visible {
	outline: 3px solid var( --seb-sm-dark );
	outline-offset: 2px;
	border-radius: 50%;
}

/* ---------------------------------------------------------------- popup (prototype) */

.seb-sm-popup .leaflet-popup-content-wrapper {
	border-radius: 10px;
	color: var( --seb-sm-dark );
	font-family: inherit;
}
.seb-sm-popup .leaflet-popup-content {
	margin: 14px 16px;
	/* Leaflet sets an inline width of at least 240px; on narrow maps (320px phones) cap it to the map width,
	   leaving room for the content margins and the autopan padding so the popup is never cut off. */
	max-width: calc( 100cqw - 84px );
	min-width: min( 230px, calc( 100cqw - 84px ) );
	/* A long description scrolls inside the popup instead of running out of the map. */
	max-height: calc( var( --seb-sm-map-h ) - 10rem );
	overflow-y: auto;
	font-size: 13px;
	line-height: 1.3;
}
.seb-sm-popup:focus {
	outline: none;
}
.seb-sm-popup__logo {
	float: right;
	max-width: 72px;
	max-height: 48px;
	margin: 0 0 6px 10px;
	object-fit: contain;
}
.seb-sm-popup__tags {
	margin-bottom: 6px;
}
.seb-sm-popup__role,
.seb-sm-popup__badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 10px;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 600;
	line-height: 1.3;
}
.seb-sm-popup__badge {
	margin-left: 4px;
	background: var( --seb-sm-dark );
}
.seb-sm-popup__tags > :first-child {
	margin-left: 0;
}
.seb-sm .seb-sm-popup__name {
	margin: 0 0 4px;
	padding: 0;
	color: inherit;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: normal;
	line-height: 1.3;
	text-transform: none;
	hyphens: manual;
}
.seb-sm-popup__meta {
	margin-bottom: 6px;
	color: #55696f;
	font-size: 0.78rem;
}
.seb-sm-popup__desc {
	margin-bottom: 8px;
	font-size: 0.8rem;
}
.seb-sm-popup__chips {
	margin-bottom: 8px;
}
.seb-sm-popup__tag {
	display: inline-block;
	margin: 0 4px 4px 0;
	padding: 2px 8px;
	border-radius: 9px;
	background: #eef4f5;
	font-size: 0.7rem;
}
.seb-sm-popup__tag--offer {
	background: var( --seb-sm-teal );
	color: #fff;
	font-weight: 600;
}
.seb-sm-popup__link {
	color: var( --seb-sm-teal );
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
}
.seb-sm-popup__link:hover {
	text-decoration: underline;
}

/* ---------------------------------------------------------------- count + results */

.seb-sm__count {
	margin: 0;
	color: var( --seb-sm-muted );
	font-size: 0.8rem;
	line-height: 1.4;
}
@media ( min-width: 64em ) {
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__count {
		margin: 14px 0 6px;
	}
}

.seb-sm__empty {
	margin: 0;
	padding: 8px 10px;
	font-size: 0.86rem;
}

.seb-sm__list {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( min( 100%, 16rem ), 1fr ) );
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.seb-sm__item {
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var( --seb-sm-line );
	border-left: 4px solid var( --seb-sm-c );
	border-radius: 8px;
	background: #fff;
	line-height: 1.4;
}
.seb-sm__more-btn {
	display: block;
	width: 100%;
	margin: 10px 0 0;
	padding: 10px 14px;
	border: 1px solid var( --seb-sm-teal );
	border-radius: 8px;
	background: #fff;
	color: var( --seb-sm-dark );
	font: inherit;
	font-size: 0.86rem;
	font-weight: 600;
	cursor: pointer;
}
.seb-sm__more-btn:hover {
	background: var( --seb-sm-line );
}
.seb-sm__more-btn[hidden] {
	display: none;
}
.seb-sm__item.is-clickable {
	cursor: pointer;
}
.seb-sm__item.is-clickable:hover {
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}
.seb-sm .seb-sm__name {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 0.86rem;
	font-weight: 700;
	letter-spacing: normal;
	line-height: 1.4;
	text-transform: none;
	hyphens: manual;
}
.seb-sm__name-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-align: left;
	cursor: pointer;
}
.seb-sm__meta {
	margin: 0;
	color: var( --seb-sm-muted );
	font-size: 0.75rem;
}

/* The longer card is only for when there is no map (no JavaScript, base map unavailable). */
.seb-sm:not( .seb-sm--no-map ) .seb-sm__more {
	display: none;
}
.seb-sm__more {
	margin-top: 6px;
	font-size: 0.86rem;
}
.seb-sm__more p {
	margin: 0 0 6px;
}
.seb-sm__badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 10px;
	background: var( --seb-sm-dark );
	color: #fff;
	font-size: 0.68rem;
	font-weight: 600;
}
.seb-sm__link {
	color: var( --seb-sm-teal );
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
}
.seb-sm__link:hover {
	text-decoration: underline;
}

/* Next to the map the cards are a list in the sidebar; the sidebar is the only scroll area. */
@media ( min-width: 64em ) {
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__list {
		display: block;
		padding: 6px 2px 0 0;
		border-top: 1px solid var( --seb-sm-line );
	}
	.seb-sm:not( .seb-sm--no-map ) .seb-sm__item {
		margin-bottom: 8px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.seb-sm * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
