/* ===== RPROJEKTE PROJEKTKARTE ===== */

.rpk {
	--rpk-accent: #FF6600;
	--rpk-radius: 16px;
	--rpk-height: 520px;
	position: relative;
	font-family: inherit;
}
.rpk *, .rpk *::before, .rpk *::after { box-sizing: border-box; }

.rpk-canvas {
	height: var(--rpk-height);
	border-radius: var(--rpk-radius);
	overflow: hidden;
	background: #eef1f5;
	z-index: 0;
}

/* ---- Consent-Layer ---- */
.rpk-consent {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, #f4f6fa, #e7ebf1);
	border-radius: var(--rpk-radius);
	border: 1px solid #e6eaf1;
}
.rpk-consent-inner { max-width: 420px; padding: 28px; text-align: center; color: #16202b; }
.rpk-consent-ico { width: 44px; height: 44px; color: var(--rpk-accent); margin-bottom: 10px; }
.rpk-consent-title { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.rpk-consent-text { font-size: 13.5px; color: #5e6976; line-height: 1.55; margin: 0 0 16px; }
.rpk-consent-btn {
	display: inline-block;
	padding: 11px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--rpk-accent);
	color: #fff;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease;
}
.rpk-consent-btn:hover { filter: brightness(.94); transform: translateY(-1px); }

/* ---- Nadeln (divIcon) ---- */
.rpk-pin-wrap { background: none; border: none; }
.rpk-pin {
	--rpk-pin: #FF6600;
	display: block;
	width: 26px;
	height: 26px;
	margin: 4px auto 0;
	background: var(--rpk-pin);
	border: 3px solid #fff;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	box-shadow: 0 3px 10px rgba(22, 32, 43, .3);
}
.rpk-pin::after {
	content: "";
	position: absolute;
	inset: 6px;
	background: #fff;
	border-radius: 50%;
	opacity: .9;
}

/* ---- Popup ---- */
.rpk .leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; box-shadow: 0 12px 32px rgba(22, 32, 43, .18); }
.rpk .leaflet-popup-content { margin: 0; width: auto !important; font-family: inherit; }
.rpk-pop { min-width: 220px; }
.rpk-pop-media { aspect-ratio: 3 / 2; overflow: hidden; }
.rpk-pop-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpk-pop-body { padding: 12px 14px 14px; }
.rpk-pop-title { font-size: 15px; font-weight: 800; color: #16202b; line-height: 1.3; }
.rpk-pop-city { font-size: 12.5px; color: #5e6976; margin-top: 2px; }
.rpk-pop-status {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 8px; padding: 4px 10px;
	background: #f4f6fa; border-radius: 999px;
	font-size: 12px; font-weight: 700; color: #16202b;
}
.rpk-pop-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rpk-pop-btn {
	display: block;
	margin-top: 10px;
	padding: 9px 14px;
	background: var(--rpk-accent, #FF6600);
	color: #fff !important;
	border-radius: 9px;
	text-align: center;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 700;
	transition: filter .15s ease;
}
.rpk-pop-btn:hover { filter: brightness(.94); }

/* ---- Legende ---- */
.rpk-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: 12px;
	font-size: 13.5px;
	color: #16202b;
}
.rpk-legend-item { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.rpk-legend-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }

.rpk-empty {
	margin-top: 12px; padding: 16px;
	border: 1px dashed #e6eaf1; border-radius: 12px;
	color: #5e6976; font-size: 14px; text-align: center;
}

/* ---- Projektkarte als Grid-Kachel ---- */
.rps-card--map { padding: 0; }
.rps-card--map .rpk--tile {
	flex: 1;
	display: flex;
	min-height: 320px;
}
.rpk--tile .rpk-canvas {
	flex: 1;
	height: auto;
	min-height: 320px;
	border-radius: 0;
}
.rpk--tile .rpk-consent { border-radius: 0; border: 0; }
.rpk--tile .rpk-consent-inner { padding: 20px; }
.rpk--tile .rpk-consent-title { font-size: 16px; }
.rpk--tile .rpk-consent-text { font-size: 12.5px; margin-bottom: 12px; }
.rpk--tile .rpk-consent-btn { padding: 9px 18px; font-size: 13.5px; }


/* ---- Karten-Buttons: Farben gegen Theme-Hover fixieren ---- */
button.rpk-consent-btn,
button.rpk-consent-btn:hover,
button.rpk-consent-btn:focus,
button.rpk-consent-btn:active {
	background: var(--rpk-accent, #FF6600) !important;
	background-color: var(--rpk-accent, #FF6600) !important;
	background-image: none !important;
	color: #fff !important;
	border: 0 !important;
}
button.rpk-consent-btn:hover { filter: brightness(.94); }
a.rpk-pop-btn,
a.rpk-pop-btn:hover,
a.rpk-pop-btn:focus {
	background: var(--rpk-accent, #FF6600) !important;
	color: #fff !important;
}

/* ---- Karten-Kachel als eigene Reihe unter allen Phasen ---- */
.rps-maprow { grid-template-columns: 1fr !important; margin-top: 28px; }
.rps-maprow .rpk--tile,
.rps-maprow .rpk--tile .rpk-canvas { min-height: 400px; }

/* ---- Karten-Kachel: Sichtbarkeit je Gerät (Breakpoints wie das Raster) ---- */
@media (min-width: 1025px) {
	.rps-card--map.rps-hide-desktop { display: none !important; }
}
@media (min-width: 641px) and (max-width: 1024px) {
	.rps-card--map.rps-hide-tablet { display: none !important; }
}
@media (max-width: 640px) {
	.rps-card--map.rps-hide-mobile { display: none !important; }
}
