/* Watershed maps (wr-maps). Popup rules are the ones from Mapster popup template 236 that actually applied,
   with the same selectors so they win and lose against the theme exactly as before. */

.wr-map { position: relative; }
.wr-map-canvas { position: relative; overflow: hidden; }

/* Loader: shown until the map's first "load". */
.wr-map-loader {
	position: absolute; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, 0.6);
	transition: opacity .2s;
}
.wr-map-loader svg { max-width: 70px; }
.wr-map-loader.is-done { opacity: 0; pointer-events: none; }

/* List of the watersheds for screen readers (hidden on screen, not display:none). */
.wr-map-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Same as Mapster: the compact attribution button has no padding. */
.wr-map .mapboxgl-ctrl-attrib-button { padding: 0; }

/* ---------- Popup (template 236) ---------- */

.mapbox-popup {
	background: white;
	padding: 10px 10px 5px 10px;
	min-width: 400px;
	text-align: left;
}
.mapboxgl-popup .mapboxgl-popup-content {
	padding: 0;
	background: none;
	border: none;
	box-shadow: none;
}
.mapboxgl-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip { border-bottom-color: #FFFFFF; display: block; }
.mapboxgl-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-tip { border-left-color: #FFFFFF; display: block; }
.mapboxgl-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-tip { border-right-color: #FFFFFF; display: block; }
.mapboxgl-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip { border-top-color: #FFFFFF; display: block; }

.watershed-popup h3 {
	font-family: Bison;
	margin: 0 0 5px 0;
	font-size: 30px;
}
.watershed-popup h4 {
	font-family: Bison;
	font-weight: bold;
	margin: 0;
	font-size: 20px;
	line-height: 1em;
}
.watershed-popup h4.score {
	font-weight: 100;
	display: inline;
}
.watershed-popup ul.score-block {
	color: #00121d;
	display: flex;
	flex-flow: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #d6d6d6;
}
.watershed-popup .score-block li {
	display: flex;
	flex-basis: calc(50%);
	align-items: center;
	margin: 0 0 3px 0;
	padding: 0;
}
.watershed-popup .score-block li:first-child {
	padding: 5px 0;
	border-top: 1px solid #d6d6d6;
	border-bottom: 1px solid #d6d6d6;
	flex-basis: 100%;
	margin-bottom: 5px;
}
.watershed-popup .score-block li img {
	padding: 5px;
	margin: 0 5px 0 10px;
	max-width: 45px;
	background-color: #C1DEEF;
}
.watershed-popup .bricks-button {
	text-decoration: none;
	font-size: 18px;
	padding: 6px 15px;
}
.watershed-popup .cta {
	padding: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
}
/* Mapster had ".subwatershed .cta"; scoped to the popup so it cannot hide other buttons on the page. */
.subwatershed .watershed-popup .cta,
.wr-map.is-subwatershed .watershed-popup .cta { display: none; }

/* Narrow maps (phones): the 400px minimum would push the popup off screen. */
.wr-map.is-narrow .mapbox-popup { min-width: 0; }
