/* Certified RoofMap — front-end styles.
   Scoped under .roofmap-* so it won't collide with a theme. */

.roofmap-wrap {
	--roofmap-ink: #16181d;
	--roofmap-muted: #5b6472;
	--roofmap-line: #e3e6ea;
	--roofmap-panel: #f7f8fa;
	color: var(--roofmap-ink);
	font-size: 16px;
	line-height: 1.5;
	margin: 0 0 1.5em;
}

.roofmap-head {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 16px;
}

.roofmap-title {
	margin: 0;
	font-size: clamp(20px, 3vw, 28px);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.roofmap-sub {
	margin: 4px 0 0;
	color: var(--roofmap-muted);
	font-size: 14px;
}

.roofmap-stats {
	display: flex;
	gap: 24px;
}

.roofmap-stat b {
	display: block;
	font-size: 26px;
	line-height: 1.1;
	color: var(--roofmap-brand, #c8102e);
}

.roofmap-stat span {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--roofmap-muted);
}

.roofmap-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.roofmap-filters:empty {
	display: none;
}

.roofmap-chip {
	border: 1px solid var(--roofmap-line);
	background: var(--roofmap-panel);
	color: inherit;
	border-radius: 999px;
	padding: 6px 14px;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.roofmap-chip:hover,
.roofmap-chip:focus-visible {
	border-color: var(--roofmap-brand, #c8102e);
}

.roofmap-chip[aria-pressed="true"] {
	background: var(--roofmap-brand, #c8102e);
	border-color: var(--roofmap-brand, #c8102e);
	color: #fff;
}

.roofmap-canvas {
	border-radius: 12px;
	border: 1px solid var(--roofmap-line);
	overflow: hidden;
	background: var(--roofmap-panel);
	min-height: 280px;
}

.roofmap-note {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--roofmap-muted);
}

.roofmap-note:empty {
	display: none;
}

/* Popups — shared between Leaflet and Google. */
.roofmap-pop {
	width: 230px;
	font-size: 16px;
}

.roofmap-pop img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
	border-radius: 6px 6px 0 0;
	background: #eee;
	max-width: 100%;
}

.roofmap-pop-b {
	padding: 10px 12px;
}

.roofmap-pop h4 {
	margin: 0 0 2px;
	font-size: 15px;
	line-height: 1.3;
}

.roofmap-pop p {
	margin: 0;
	font-size: 13px;
	color: var(--roofmap-muted);
}

/* Leaflet's default popup padding fights our own. */
.roofmap-wrap .leaflet-popup-content {
	margin: 0;
	width: 230px !important;
}

.roofmap-wrap .leaflet-popup-content-wrapper {
	padding: 0;
	overflow: hidden;
}

@media (prefers-color-scheme: dark) {
	.roofmap-wrap {
		--roofmap-ink: #e9ecf1;
		--roofmap-muted: #9aa3b0;
		--roofmap-line: #2a2f38;
		--roofmap-panel: #1a1d24;
	}
}
