/* SCC Partner Map — ported from client mockup Partner_Map_0.2.6.html */

.sccpm-app {
	--sccpm-pink: #c40075;
	--sccpm-highlight: #d7df23;
	--sccpm-ct-blue: #00addc;
	--sccpm-border: #d6d6d6;
	--sccpm-text-dark: #1a1a1a;
	--sccpm-text-mid: #666666;

	font-family: 'Roboto', Arial, sans-serif;
	color: var(--sccpm-text-mid);
	border: 1px solid var(--sccpm-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fafafa;
}
.sccpm-app *, .sccpm-app *::before, .sccpm-app *::after { box-sizing: border-box; }

/* ── FILTER BAR ── */
.sccpm-filter-bar {
	background: #fff;
	border-bottom: 1px solid var(--sccpm-border);
	padding: 10px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.sccpm-select-wrap {
	position: relative;
	flex: 1;
	min-width: 160px;
	max-width: 230px;
}
.sccpm-select-wrap::after {
	content: '▾';
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--sccpm-text-mid);
	pointer-events: none;
	font-size: 12px;
}
.sccpm-filter-bar select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	border: 1.5px solid var(--sccpm-border);
	border-radius: 6px;
	padding: 7px 28px 7px 10px;
	font-family: 'Roboto', Arial, sans-serif;
	font-size: 13px;
	line-height: 1.4;
	color: var(--sccpm-text-dark);
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.sccpm-filter-bar select:hover { border-color: #aab; }
.sccpm-filter-bar select:focus {
	outline: none;
	border-color: var(--sccpm-ct-blue);
	box-shadow: 0 0 0 3px rgba(0, 173, 220, 0.15);
}
.sccpm-btn-reset {
	background: #fff;
	color: var(--sccpm-ct-blue);
	border: 1.5px solid var(--sccpm-ct-blue);
	border-radius: 25px;
	padding: 7px 14px;
	font-family: 'Roboto', Arial, sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.18s, color 0.18s;
}
.sccpm-btn-reset:hover { background: var(--sccpm-ct-blue); color: #fff; }
.sccpm-filter-bar-divider {
	width: 1px;
	height: 24px;
	background: var(--sccpm-border);
	flex-shrink: 0;
}
.sccpm-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sccpm-text-mid);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}
.sccpm-checkbox-label input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: var(--sccpm-ct-blue);
	cursor: pointer;
	flex-shrink: 0;
	margin: 0;
}
.sccpm-filter-active-line {
	flex-basis: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--sccpm-text-mid);
	margin-top: -2px;
}
.sccpm-filter-active-label {
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 12px;
}
.sccpm-filter-active-value { font-weight: 600; font-size: 14px; }
.sccpm-filter-active-sep { font-size: 18px; }

/* ── SPLIT: RESULTS LEFT, MAP RIGHT ── */
.sccpm-split {
	display: grid;
	grid-template-columns: 520px 1fr;
	min-height: 0;
}

/* Results pane */
.sccpm-results-pane {
	background: #fff;
	border-right: 1px solid var(--sccpm-border);
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}
.sccpm-results-header {
	padding: 14px 18px 10px;
	border-bottom: 1px solid var(--sccpm-border);
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.sccpm-results-title {
	font-family: 'Noto Serif', Georgia, serif;
	font-style: italic;
	font-size: 28px;
	font-weight: 600;
	color: var(--sccpm-ct-blue);
	flex: 1;
	line-height: 1.2;
}
.sccpm-results-badge {
	background: var(--sccpm-ct-blue);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 20px;
}
.sccpm-results-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.sccpm-results-scroll::-webkit-scrollbar { width: 6px; }
.sccpm-results-scroll::-webkit-scrollbar-track { background: transparent; }
.sccpm-results-scroll::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }

.sccpm-results-list { list-style: none; margin: 0; padding: 0; }
.sccpm-result-item {
	border-bottom: 1px solid var(--sccpm-border);
	padding: 12px 18px;
	transition: background 0.15s;
}
.sccpm-result-item:last-child { border-bottom: none; }
.sccpm-result-item:hover { background: #f9f9f9; }
.sccpm-result-org-name {
	font-size: 18px;
	font-weight: 600;
	color: var(--sccpm-pink);
	line-height: 1.3;
	margin-bottom: 4px;
}
.sccpm-result-meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 6px;
}
.sccpm-meta-row { display: block; line-height: 1.5; }
.sccpm-meta-program-type {
	font-size: 15px;
	font-style: italic;
	color: var(--sccpm-text-mid);
	line-height: 1.5;
}
.sccpm-meta-program-type strong { font-weight: 700; color: var(--sccpm-text-mid); }
.sccpm-meta-county-office {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	color: var(--sccpm-text-mid);
	line-height: 1.5;
}
.sccpm-meta-county-office-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: var(--sccpm-pink);
	flex-shrink: 0;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.sccpm-meta-served,
.sccpm-meta-statewide {
	font-size: 15px;
	font-style: italic;
	color: #666;
	line-height: 1.5;
	word-break: break-word;
}
.sccpm-meta-website-wrap { display: block; }
.sccpm-meta-website {
	font-size: 15px;
	font-weight: 400;
	color: var(--sccpm-ct-blue);
	text-decoration: underline;
	display: inline;
	margin-top: 1px;
}
.sccpm-meta-website:hover { opacity: 0.75; }

.sccpm-empty-state {
	padding: 40px 20px;
	text-align: center;
	color: var(--sccpm-text-mid);
	font-size: 14px;
	line-height: 1.6;
}

/* ── MAP ── */
.sccpm-map-area {
	padding: 20px;
	overflow: auto;
	display: flex;
	flex-direction: column;
}
.sccpm-map-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sccpm-text-mid);
	opacity: 0.7;
	margin-bottom: 8px;
}
.sccpm-map-wrap {
	width: 100%;
	max-width: 720px;
	filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.10));
}
.sccpm-map-wrap svg { width: 100%; height: auto; display: block; }

.sccpm-map-wrap #Counties polygon { cursor: pointer; transition: fill 0.18s; }
.sccpm-map-wrap #Counties polygon:hover { fill: #b8bec2 !important; }
.sccpm-map-wrap #Counties polygon.highlighted:hover { fill: #c4ca1f !important; }
.sccpm-map-wrap #Counties polygon.clicked:hover { fill: #c4ca1f !important; }
.sccpm-map-wrap #Counties polygon.highlighted { fill: var(--sccpm-highlight) !important; }
.sccpm-map-wrap #Counties polygon.clicked { fill: var(--sccpm-highlight) !important; }

/* ── TOOLTIP ── */
.sccpm-tooltip {
	position: fixed;
	background: #666666;
	color: #fff;
	font-family: 'Roboto', Arial, sans-serif;
	font-variant-ligatures: none;
	font-size: 13px;
	font-weight: 400;
	padding: 6px 12px;
	border-radius: 6px;
	pointer-events: none;
	white-space: nowrap;
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.12s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.sccpm-tooltip.visible { opacity: 1; }

/* ── HEIGHT MODES (desktop) ── */
@media (min-width: 901px) {
	/* Fixed mode: bounded box, results list scrolls internally (mockup behavior).
	   --sccpm-split-height lets [scc_partner_map height="800px"] override it. */
	.sccpm-app.sccpm-h-fixed .sccpm-split {
		height: var(--sccpm-split-height, clamp(480px, 62vh, 640px));
	}

	/* Sticky mode (default): the full partner list renders inline and the map
	   stays pinned in view while you scroll past it. overflow:visible is required
	   so position:sticky has a scroll context; radius is dropped to avoid the
	   square-corner artifact that overflow:visible would otherwise expose. */
	.sccpm-app.sccpm-h-sticky {
		overflow: visible;
		border-radius: 0;
	}
	.sccpm-app.sccpm-h-sticky .sccpm-split { height: auto; }
	.sccpm-app.sccpm-h-sticky .sccpm-results-pane { max-height: none; }
	.sccpm-app.sccpm-h-sticky .sccpm-results-scroll { overflow: visible; }
	.sccpm-app.sccpm-h-sticky .sccpm-map-area {
		position: sticky;
		top: 24px;
		align-self: start;
	}
}
@media (max-width: 1100px) {
	.sccpm-split { grid-template-columns: 300px 1fr; }
}
@media (max-width: 900px) {
	.sccpm-split { grid-template-columns: 1fr; }
	.sccpm-results-pane {
		border-right: none;
		border-bottom: 1px solid var(--sccpm-border);
		max-height: 360px;
		order: 2;
	}
	.sccpm-map-area { order: 1; }
}
