/* WHV Wahllokal-Finder */

.whv-wl {
	--whv-accent: #0b5d8f;
	--whv-accent-dark: #073f61;
	--whv-bg: #ffffff;
	--whv-muted: #5b6570;
	--whv-border: #d7dde3;
	--whv-radius: 10px;

	max-width: 46rem;
	margin: 0 0 1.5rem;
	color: inherit;
	font-size: 1rem;
	line-height: 1.5;
}

.whv-wl *,
.whv-wl *::before,
.whv-wl *::after {
	box-sizing: border-box;
}

.whv-wl__title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	line-height: 1.3;
}

/* ------------------------------------------------------------------ Formular */

.whv-wl__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	padding: 1rem;
	background: #f5f7f9;
	border: 1px solid var(--whv-border);
	border-radius: var(--whv-radius);
}

.whv-wl__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.whv-wl__field--street {
	flex: 1 1 16rem;
}

.whv-wl__field--number {
	flex: 0 1 8rem;
}

.whv-wl__field--submit {
	flex: 0 0 auto;
}

.whv-wl__field label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--whv-muted);
}

.whv-wl__field input {
	width: 100%;
	padding: 0.6rem 0.7rem;
	font: inherit;
	color: inherit;
	background: var(--whv-bg);
	border: 1px solid var(--whv-border);
	border-radius: 6px;
}

.whv-wl__field input:focus {
	outline: 2px solid var(--whv-accent);
	outline-offset: 1px;
	border-color: var(--whv-accent);
}

.whv-wl__submit {
	padding: 0.62rem 1.1rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--whv-accent);
	border: 1px solid var(--whv-accent);
	border-radius: 6px;
	cursor: pointer;
}

.whv-wl__submit:hover,
.whv-wl__submit:focus {
	background: var(--whv-accent-dark);
	border-color: var(--whv-accent-dark);
}

.whv-wl.is-loading .whv-wl__submit {
	opacity: 0.6;
	pointer-events: none;
}

.whv-wl__status {
	min-height: 1.2em;
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: var(--whv-muted);
}

/* ------------------------------------------------------------------ Ergebnis */

.whv-wl__result {
	margin-top: 0.5rem;
}

.whv-wl__card {
	padding: 1rem 1.1rem;
	background: var(--whv-bg);
	border: 1px solid var(--whv-border);
	border-left: 4px solid var(--whv-accent);
	border-radius: var(--whv-radius);
}

.whv-wl__card--error {
	border-left-color: #b91c1c;
}

.whv-wl__district {
	display: flex;
	gap: 0.8rem;
	align-items: center;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid var(--whv-border);
}

.whv-wl__district-nr {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.1rem;
	padding: 0.35rem 0.5rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #fff;
	background: var(--whv-accent);
	border-radius: 6px;
}

.whv-wl__district-text {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

.whv-wl__district-name {
	font-size: 1.05rem;
}

.whv-wl__area {
	font-size: 0.85rem;
	color: var(--whv-muted);
}

.whv-wl__station {
	padding-top: 0.85rem;
}

.whv-wl__station-label {
	margin: 0 0 0.3rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--whv-muted);
}

.whv-wl__station-name {
	margin: 0 0 0.15rem;
	font-size: 1.15rem;
	font-weight: 700;
	white-space: pre-line;
}

.whv-wl__station-addr {
	margin: 0;
}

.whv-wl__actions {
	margin: 0.75rem 0 0;
}

.whv-wl__route {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--whv-accent);
	text-decoration: none;
	border: 1px solid var(--whv-accent);
	border-radius: 6px;
}

.whv-wl__route:hover,
.whv-wl__route:focus {
	color: #fff;
	background: var(--whv-accent);
}

.whv-wl__note {
	margin: 0.85rem 0 0;
	padding: 0.5rem 0.7rem;
	font-size: 0.88rem;
	color: #7c4a03;
	background: #fff7ed;
	border-radius: 6px;
}

.whv-wl__suggestions {
	margin: 0.6rem 0 0;
	font-size: 0.92rem;
}

.whv-wl__suggestion {
	padding: 0;
	font: inherit;
	color: var(--whv-accent);
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

.whv-wl__meta {
	margin: 0.8rem 0 0;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--whv-muted);
}

/* --------------------------------------------------------------------- Karte */

.whv-wl__map-wrap {
	margin-top: 0.9rem;
	overflow: hidden;
	border: 1px solid var(--whv-border);
	border-radius: var(--whv-radius);
}

.whv-wl__map {
	width: 100%;
	height: 340px;
}

.whv-wl__consent {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	align-items: flex-start;
	padding: 1rem;
	background: #f5f7f9;
}

.whv-wl__consent-hint {
	margin: 0;
	font-size: 0.85rem;
	color: var(--whv-muted);
}

.whv-wl__consent-btn {
	padding: 0.5rem 0.9rem;
	font: inherit;
	font-weight: 600;
	color: var(--whv-accent);
	background: #fff;
	border: 1px solid var(--whv-accent);
	border-radius: 6px;
	cursor: pointer;
}

.whv-wl__consent-btn:hover,
.whv-wl__consent-btn:focus {
	color: #fff;
	background: var(--whv-accent);
}

/* Marker */

.whv-wl-pin {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	text-align: center;
	border-radius: 50% 50% 50% 4px;
	transform: rotate( -45deg );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.4 );
}

.whv-wl-pin span {
	transform: rotate( 45deg );
}

.whv-wl-pin--lokal {
	color: #fff;
	background: #c2410c;
	border: 2px solid #fff;
}

.whv-wl-pin--addr {
	font-size: 13px;
	color: #fff;
	background: var(--whv-accent);
	border: 2px solid #fff;
}

@media ( max-width: 480px ) {
	.whv-wl__form {
		flex-direction: column;
		align-items: stretch;
	}

	/* In der Spaltenrichtung würde flex-basis sonst als Höhe wirken. */
	.whv-wl__field {
		flex: 0 0 auto;
	}

	.whv-wl__field--submit .whv-wl__submit {
		width: 100%;
	}

	.whv-wl__map {
		height: 260px;
	}
}

.whv-wl__spread {
	margin: 0.6rem 0 0;
	padding-left: 1.2rem;
	font-size: 0.92rem;
}

.whv-wl__spread li {
	margin: 0.1rem 0;
}

/* ------------------------------------------------------ Vorschlagsliste */

.whv-wl__field--street {
	position: relative;
}

.whv-wl__suggest {
	position: absolute;
	z-index: 20;
	top: 100%;
	right: 0;
	left: 0;
	max-height: 15rem;
	margin: 0.15rem 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	background: var(--whv-bg);
	border: 1px solid var(--whv-border);
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.12 );
	-webkit-overflow-scrolling: touch;
}

.whv-wl__suggest-item {
	padding: 0.6rem 0.7rem;
	cursor: pointer;
	border-bottom: 1px solid #eef1f4;
}

.whv-wl__suggest-item:last-child {
	border-bottom: 0;
}

.whv-wl__suggest-item:hover,
.whv-wl__suggest-item[aria-selected="true"] {
	color: #fff;
	background: var(--whv-accent);
}

/* iOS zoomt beim Fokus in Felder mit weniger als 16px Schriftgröße hinein. */
@media ( max-width: 780px ) {
	.whv-wl__field input {
		font-size: 16px;
	}
}
