/*
 * EHNES PLZ-Finder — Gestaltung nach Hub-Vorlage (Unternehmen.dc.html,
 * „Vertrieb & Beratung"). Farben als Variablen: der Reiter „Stil" des
 * Widgets setzt sie über Elementors selectors, ohne Spezifitätskampf.
 *
 * Hover gibt Rückmeldung über Farbe, nie über Unterstreichung
 * (Arbeitsregel 8). Tastaturfokus ist immer sichtbar.
 */

.ehnes-plz {
	--ehnes-plz-akzent: #B51B26;
	--ehnes-plz-akzent-dunkel: #911520;
	--ehnes-plz-flaeche: #F3F3F3;
	--ehnes-plz-land: #FFFFFF;
	--ehnes-plz-rand: #AFAFAF;
	--ehnes-plz-text: #484847;
	--ehnes-plz-gedimmt: #767676; /* 4,54:1 auf Weiß */

	display: grid;
	grid-template-columns: minmax(0, 1fr) 500px;
	gap: 70px;
	align-items: start;
	box-sizing: border-box;
	padding: 50px 64px 56px;
	border-radius: 5px;
	background: var(--ehnes-plz-flaeche);
	color: var(--ehnes-plz-text);
	font-family: var(--font-sans, "Source Sans 3"), sans-serif;
}

.ehnes-plz *,
.ehnes-plz *::before,
.ehnes-plz *::after { box-sizing: border-box; }

.ehnes-plz p { margin: 0; }

/* ---- links ---- */

.ehnes-plz__links {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.ehnes-plz__feld {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ehnes-plz__label {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
}

.ehnes-plz__eingabe {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1px solid var(--ehnes-plz-rand);
	border-radius: 5px;
	background: #FFFFFF;
	color: var(--ehnes-plz-text);
	font: inherit;
	font-size: 18px;
	line-height: 1;
}
.ehnes-plz__eingabe::placeholder { color: var(--ehnes-plz-gedimmt); opacity: 1; }
.ehnes-plz__eingabe:hover { border-color: var(--ehnes-plz-text); }
.ehnes-plz__eingabe:focus {
	outline: none;
	border-color: var(--ehnes-plz-akzent);
	box-shadow: 0 0 0 2px var(--ehnes-plz-akzent);
}

.ehnes-plz__status {
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
}
.ehnes-plz__status.is-treffer { color: var(--ehnes-plz-akzent); }

/* Leerzustand */
.ehnes-plz__leer {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 26px 30px 28px;
	border-radius: 5px;
	box-shadow: inset 0 0 0 1px var(--ehnes-plz-rand);
}
.ehnes-plz__leer[hidden] { display: none; }
.ehnes-plz__leer-titel { font-size: 20px; font-weight: 700; line-height: 1; }
.ehnes-plz__leer-text { font-size: 18px; line-height: 26px; }

/* Ergebnis — ohne JavaScript stehen alle Karten untereinander. */
.ehnes-plz__treffer {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.ehnes-plz__vertretung {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 30px 34px 32px;
	border-radius: 5px;
	background: #FFFFFF;
}
.ehnes-plz__vertretung[hidden] { display: none; }
.ehnes-plz.is-bereit .ehnes-plz__vertretung:not([hidden]) { animation: ehnes-plz-auf 0.25s ease; }

.ehnes-plz__chip {
	align-self: flex-start;
	padding: 6px 10px;
	border-radius: 5px;
	background: var(--ehnes-plz-akzent);
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
}
.ehnes-plz__firma { font-size: 24px; font-weight: 700; line-height: 30px; }
.ehnes-plz__adresse { font-size: 18px; line-height: 25px; }
.ehnes-plz__kontakt {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 2px !important;
}
/* Mit Wurzelklasse davor (0,2,1): die Link-Regeln des Kits
   (.elementor-kit-5 a / a:hover) liegen sonst gleichauf und gewinnen
   den Hover — die Farbe blieb am 24.09.2026 beim Überfahren unverändert. */
.ehnes-plz .ehnes-plz__kontakt a {
	color: var(--ehnes-plz-akzent);
	font-size: 18px;
	line-height: 24px;
	text-decoration: none;
	overflow-wrap: anywhere;
}
.ehnes-plz__tel { font-weight: 600; }
.ehnes-plz .ehnes-plz__kontakt a:hover { color: var(--ehnes-plz-akzent-dunkel); text-decoration: none; }
.ehnes-plz .ehnes-plz__kontakt a:focus-visible { outline: 2px solid var(--ehnes-plz-akzent); outline-offset: 2px; }

@keyframes ehnes-plz-auf {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ehnes-plz.is-bereit .ehnes-plz__vertretung:not([hidden]) { animation: none; }
}

/* ---- rechts: Karte ---- */

.ehnes-plz__karte svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}
.ehnes-plz__land {
	fill: var(--ehnes-plz-land);
	stroke: var(--ehnes-plz-rand);
	stroke-width: 1;
	stroke-linejoin: round;
}

.ehnes-plz__marker { cursor: pointer; outline: none; }
.ehnes-plz__punkt {
	fill: var(--ehnes-plz-akzent);
	stroke: #FFFFFF;
	stroke-width: 2.5;
	transition: fill 0.15s ease, r 0.15s ease;
}
.ehnes-plz__ring {
	fill: none;
	stroke: var(--ehnes-plz-akzent);
	stroke-width: 1.5;
	opacity: 0;
}
.ehnes-plz__kuerzel {
	fill: var(--ehnes-plz-text);
	font-family: var(--font-sans, "Source Sans 3"), sans-serif;
	font-size: 13px;
	font-weight: 600;
	pointer-events: none;
}

.ehnes-plz__marker:hover .ehnes-plz__punkt { fill: var(--ehnes-plz-akzent-dunkel); }
.ehnes-plz__marker:focus-visible .ehnes-plz__ring { opacity: 1; stroke-width: 2.5; }

.ehnes-plz__marker.is-aktiv .ehnes-plz__punkt { r: 11; }
.ehnes-plz__marker.is-aktiv .ehnes-plz__ring { opacity: 0.55; }
.ehnes-plz__marker.is-aktiv .ehnes-plz__kuerzel { fill: var(--ehnes-plz-akzent); transform: translateY(4px); }
.ehnes-plz__marker.is-gedimmt .ehnes-plz__punkt { fill: var(--ehnes-plz-rand); }
.ehnes-plz__marker.is-gedimmt .ehnes-plz__kuerzel { fill: var(--ehnes-plz-gedimmt); }
.ehnes-plz__marker.is-gedimmt:hover .ehnes-plz__punkt { fill: var(--ehnes-plz-akzent); }

/* ---- Tablet und Handy: untereinander, Karte unten ---- */

@media (max-width: 1024px) {
	.ehnes-plz {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
		padding: 40px 40px 44px;
	}
	.ehnes-plz__karte { max-width: 500px; width: 100%; margin: 0 auto; }
}
@media (max-width: 767px) {
	.ehnes-plz { padding: 26px 20px 28px; gap: 28px; }
	.ehnes-plz__vertretung { padding: 24px 22px 26px; }
	.ehnes-plz__firma { font-size: 21px; line-height: 27px; }
	/* Auf dem Handy wird die Karte ~0,6× so groß — Kürzel sonst unlesbar klein. */
	.ehnes-plz__kuerzel { font-size: 19px; }
	.ehnes-plz__punkt { stroke-width: 3; }
}
