.map-wrap nav {
	position: absolute;
	width: 100%;
	display: flex;
	align-items: center;
	justify-self: center;
	top: 0;
	justify-content: space-between;
	z-index: 4;
	background-color: royalblue;
}

/*  */

nav.top-nav {
	position: relative;
	width: 100%;
	z-index: 10;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 18px;
	background-color: var(--primary);
}

.nav-content-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 1rem;
}

.nav-space {
	display: flex;
	gap: 40px;
	align-items: center;
}

.nav-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	color: #ffffff;
	text-decoration: none;
	transition:
		background-color 180ms ease,
		transform 180ms ease;
}

.nav-pill:hover,
.nav-pill:focus-visible {
/* 	background: rgba(255, 255, 255, 0.14); */
	transform: translateY(-1px);
}

.pill-icon {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.18);
}

.pill-icon img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.nav-action {
	min-width: 160px;
	padding: 0.95rem 1.35rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-weight: 400;
	cursor: pointer;
	transition:
		background-color 180ms ease,
		transform 180ms ease;
	text-align: center;
}

.nav-action:hover,
.nav-action:focus-visible {
	background: rgba(255, 255, 255, 0.28);
	transform: translateY(-1px);
}
/*  */

.map-wrap .nav-content-wrap {
	display: flex;
	width: 100%;
	padding: 0;
}

.map-wrap .nav-space {
	cursor: pointer;
/* 	height: 3rem; */
	display: flex;
	width: 80%;
}

.map-wrap .nav-space .nav-content {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.map-wrap .nav-space a img {
	width: auto;
	height: 36px;
	padding: 0.5rem;
	border-radius: 8px;
	background-color: #d5d9dc;
}

.map-wrap #map {
	width: 100%;
	height: 100vh;
}



.size-controls {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.size-controls h3 {
	font-size: 1rem;
	font-weight: 700;
	color: #111;
}




/* Mapbox Popup Styling */
.mapboxgl-popup.custom-popup {
	z-index: 10;
}

.mapboxgl-popup.custom-popup .mapboxgl-popup-content {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
}

.mapboxgl-popup.custom-popup .mapboxgl-popup-tip {
	display: none;
}

.mapboxgl-popup.custom-popup .mapboxgl-popup-close-button {
	color: #475569;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 999px;
	width: 28px;
	height: 28px;
	line-height: 28px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
	right: 16px;
	top: 16px;
}

.custom-popup-card {
	width: 300px;
	font-family: "Archivo";
	background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
	border-radius: 28px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow: 0 30px 60px rgba(15, 23, 42, 0.14);
	padding: 22px;
	color: #0f172a;
	position: relative;
	overflow: hidden;
}

.custom-popup-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		circle at top right,
		rgba(59, 130, 246, 0.12),
		transparent 30%
	);
	pointer-events: none;
}

.custom-popup-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 10px;
	position: relative;
	z-index: 1;
}

.custom-popup-topline {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: #000;
    text-transform: unset;
	width: fit-content;
}

.custom-popup-card h3 {
    font-size: 35px;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
    color: #000;
}

.custom-popup-subtitle {
    color: #000;
    font-weight: 500;
    font-size: 14px;
}

.custom-popup-chips {
	display: flex;
	gap: 3px;
	flex-wrap: wrap;
	margin-bottom: 18px;
	position: relative;
	z-index: 1;
	align-items: center;
}


.custom-popup-impact-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.78rem;
	color: #475569;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	margin-bottom: 14px;
}

.custom-popup-impact-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.custom-popup-impact-row > div {
	display: flex;
	align-items: center;
	gap: 10px;
}



.icon-leaf {
	background: rgba(16, 185, 129, 0.12);
	color: #047857;
}

.custom-popup-impact-row strong {
	font-size: 1.05rem;
	color: #0f172a;
	line-height: 1.1;
	justify-content: center;
	display: flex;
}

.custom-popup-impact-row span {
	font-size: 0.78rem;
	color: #64748b;
}



.tile-info-card {
	position: fixed;
	top: 30%;
	right: 50px;
	width: 328px;
	max-width: calc(100vw - 32px);
	z-index: 999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	pointer-events: auto;
	opacity: 1;
	transition:
		opacity 180ms ease,
		transform 180ms ease;
}

.tile-info-card.hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-10px);
}

.tile-info-card .tile-info-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: 50%;
	color: #374151;
	font-size: 28px;
	line-height: 20px;
	font-weight: 500;
	text-align: center;
	cursor: pointer;
	padding: 0;
	transition:
		transform 120ms ease,
		box-shadow 120ms ease;
	z-index:999;
}

.tile-info-card .tile-info-close:hover {
/* 	transform: scale(1.05); */
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.tile-info-card .tile-info-content {
	width: 100%;
}

.tile-info-card .tile-info-content .custom-popup-card {
	width: 100%;
	position: relative;
	overflow: visible;
}

.custom-popup-card {
	width: 100%;
	font-family: "Archivo";
	background: #c5d0d6;
	border-radius: 10px;
	border: none;
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
	padding: 22px 22px 18px;
	color: #17212b;
}



.custom-popup-chips span {
    background: transparent;
    color: #000;
    border: none;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
}
.custom-popup-chips span:first-child{
	background-color: var(--primary);
	color: #fff;
}
.custom-popup-impact {
	border-radius: 12px;
	background: #ffffff;
	overflow: hidden;
	margin-bottom: 0;
}

.custom-popup-impact-header {
background: var(--primary);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.04em;
}
.custom-popup-impact-header span:last-child {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 400;
    font-size: 14px;
}
.custom-popup-impact hr.popup-line {
    margin: 0;
    border-top: 1px solid #000;
	    width: calc(100% - 50px) !important;
    margin-right: 10px;
}
.custom-popup-impact-body {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	padding: 16px;
}
.custom-popup-impact-panel > div {
    display: flex;
    flex: 1;
    gap: 15px;
    align-items: center;
}
.custom-popup-impact-panel {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 24px 14px 16px;
	border-radius: 18px;
}
.custom-popup-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	object-fit: contain;
}

.icon-leaf {
	background: rgba(16, 185, 129, 0.18);
	color: #047857;
}

.custom-popup-impact-panel strong {
    display: block;
    font-size: 25px;
    color: var(--primary);
    line-height: 1;
}

.custom-popup-impact-panel span {
    font-size: 13px;
    color: #000;
    line-height: 1;
    font-weight: 500;
}

.custom-popup-footer {
	font-size: 12px;
	color: #000;
	text-align: right;
	display: none;
	padding-top: 8px;
	position: relative;
	z-index: 1;
}

.custom-popup-impact-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.75rem;
	color: #666;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e8eef6;
}

.custom-popup-impact-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.custom-popup-impact-row > div {
	display: flex;
	align-items: center;
	gap: 8px;
}



.custom-popup-icon.icon-leaf {
	background: rgba(34, 197, 94, 0.12);
	color: #22c55e;
}

.custom-popup-impact-row strong {
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
	color: #000;
}

.custom-popup-impact-row span {
	display: flex;
	justify-content: center;
	font-size: 0.75rem;
	color: #888;
	font-weight: 400;
}



@media(max-width:600px){
	.map-wrap .nav-space { flex-direction: column; height: auto; align-items: flex-start;gap:10px; }
	.nav-action { min-width: 130px;font-size: 16px;padding: 10px 12px;}
	.nav-pill span.pill-icon { height: 26px; width: 26px; flex: unset; }
	.nav-pill span { flex: 1;font-size: 15px;}
	.map-wrap .nav-space a img { height: 100%; }
	.tile-info-card { width: 290px; }
	.custom-popup-card h3 { font-size: 30px; }
	.custom-popup-impact-panel strong { font-size: 20px; }
	.custom-popup-impact-panel { padding: 10px; }
	.custom-popup-impact hr.popup-line { width: calc(100% - 30px) !important; margin-right: 0; }
	.custom-popup-impact-panel > div { gap: 10px; }

}