@import url('https://fonts.googleapis.com/css?family=Libre+Franklin:400,700|Montserrat:400,700');

:root {

	/* Colors */
	--color-primary: #c62828;
	--color-map-base: rgb(5,5,5); /* This is the base color of Carto's `light_all` map tiles. */

	--color-white:			#fff;
	--color-white-100:		#efefef;

	--color-grey-100:		#eef0f0;
	--color-grey-150:		#e1e3e3;
	--color-grey-200:		#dbdddd;
	--color-grey-300:		#cacccc;
	--color-grey-400:		#a8aaaa;
	--color-grey-500:		#979999;
	--color-grey-600:		#888a8a;
	--color-grey-700:		#7e8080;
	--color-grey-800:		#646666;
	--color-grey-900:		#4a4a4a;


	--color-black:			#000000;
	--color-black-100:		#070909;
	--color-black-200:		#0F1111;
	--color-black-300:		#171919;
	--color-black-400:		#202222;
	--color-black-500:		#313333;

	/* Legacy variables */
	--color-gray: var(--color-grey-900);
	--color-reggray: var(--color-grey-700);
	--color-medgray: var(--color-grey-300);
	--color-lightgray: var(--color-grey-100);

	/* Fonts */
	--font-primary: 'Libre Franklin', sans-serif;
	--font-secondary: 'Lato', sans-serif;
	--font-tertiary: 'Montserrat', sans-serif;

	--letter-spacing: 0.5px;
	--border-radius: 3px;

}

html {
	padding: 0;
	margin: 0;
	font-size: 100%;
	box-sizing: border-box;
}
*, *:before, *:after {
	box-sizing: inherit;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--font-primary);
}

a {
	color: var(--color-primary);
	/* text-decoration: none; */
}

.desktop-text { display: inline; }
.mobile-text { display: none; }


/*-------------
GRID
--------------- */

.interactive__wrapper {
	width: 100%;
	position: relative;
	font-family: var(--font-primary);
}


/*-------------
MAP
--------------- */

#interactive-map {
	height: 425px;
}

.map__info {
	margin: 0;
}

.map__info ul li {
	font-size: 0.875rem;

}

.map__headline,
.map__date,
.map__subheadline,
.map__source {
	font-family: var(--font-primary);
}

.map__headline {
	font-size: 1.25rem;
	margin: 0;
	font-weight: 700;
	color: var(--color-gray);
	/*margin-top: 24px;*/
}

.map__date {
	margin-top: 4px;
}

.map__subheadline {
	font-size: 1rem;
	margin-top: 4px;
}

.map__date,
.map__note,
.map__credit,
.map__source {
	font-size: 0.875rem;
}

.map__source {
	font-style: italic;
	padding-bottom: 24px;
	border-bottom: 1px solid #ddd;
}



/* Displays information when a polygon is clicked */
.map__sentence {
	font-family: var(--font-primary);
	font-size: 1rem;
	margin-top: 0;
	/*margin-top: 32px;*/
	/*margin-bottom: 32px;*/
}

.map__sentence h2, .map__sentence p {
	margin: 0.5rem 0px;
}

.map__sentence h2 {
	font-size: 1rem;
	text-transform: uppercase;
	color: var(--color-gray);
}

.map__sentence strong {
	font-weight: 700;
}

.prompt {
	font-family: var(--font-primary);
	/*font-weight: 700;*/
	color: var(--color-gray);
	margin-top: 32px;
	/*margin-bottom: 8px;*/
}




/*-------------
CONTROLS
--------------- */
.map__controls {
	position: relative;
	max-width: 1024px;
	width: 100%;
	margin: 0px 0px 1.5rem 0px;
	grid-column: 1 / span 4;
}

.form__group {
	position: relative;
	width: 100%;
}

.form__group.group--byplace {
	display: flex;
	gap: 1rem;
}

.form__group.group--separator hr {
	border: none;
	width: 100%;
	display: block;
	background: var(--color-medgray);
	height: 1px;
	margin: 1rem auto;
}




.control__wrapper,
.input__wrapper,
.select__wrapper {
	position: relative;
}

.control__wrapper { width: 100%; }

.map__controls label {
	text-transform: uppercase;
	font-size: 0.75rem;
}


.map__controls button {
	-webkit-appearance: none;
	-moz-appearance: none;

	font-family: var(--font-primary);
	font-weight: 700;
	font-size: 0.875rem;

	color: white;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0.875rem 1rem;

	border-radius: 0.25rem;
	border: none;
	background: var(--color-black-500);
}

.map__controls button:hover { background: var(--color-black); }


.map__controls input {
	border: none;
	border: 1px solid var(--color-black-500);
	border-radius: 0.25rem;
	padding: 1rem;
	font-family: var(--font-primary);
	font-size: 1rem;
}

.map__controls input[type='search'] {
	width: 100%;
	background: var(--color-grey-white);
	padding-left: 3rem;
	box-shadow: inset 0 1px 3px rgba(0,0,0,.3);
}

/* Remove Safari's default styling since we are adding our own. */
.map__controls input[type="search"]::-webkit-search-decoration,
.map__controls input[type="search"]::-webkit-search-cancel-button,
.map__controls input[type="search"]::-webkit-search-results-button,
.map__controls input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance:none;
}

.map__controls button[type='submit'] {
	position: absolute;
	top: 0px;
	right: 0px;
	border-top-left-radius: 0px;
	border-bottom-left-radius: 0px;
	font-size: 1rem;
	padding: 1rem;
	background-color: var(--color-black-500);
	color: var(--color-white);
	border: 1px solid var(--color-black-500);
}
.map__controls button[type='submit']:hover {
	background-color: var(--color-black);
	border: 1px solid var(--color-black);
}

.map__controls button[type='submit'] span {
	font-size: 0.875rem;
}

/* Button text is inside a span so we can set a smaller font-size on the text */
/* while keeping button's font size same as other inputs. This keeps height the same. */



/* Add downward pointing triangle */
.input__wrapper .fa-search {
	position: absolute;
	top: 1.25rem;
	left: 1.125rem;
	color: var(--color-reggray);
}




.map__controls select {
	-webkit-appearance: none;
	-moz-appearance: none;

	font-family: var(--font-primary);
	font-weight: 700;
	width: 100%;
	line-height: 1;
	font-size: 1rem;

	background: #FFF;
	background: linear-gradient(to bottom, #FFF 50%, var(--color-grey-150) 100%);

	/* Reserve space on right for the downward pointing triangle */
	padding: 1rem 1.75rem 1rem 0.75rem;
	border: 1px solid var(--color-black-500);
	border-radius: 0.25rem;
}

/* Add downward pointing triangle */
.select__wrapper::after {
	content: "▼";
	font-size: 0.75rem;
	top: calc(1.25rem - 1px);
	right: 0.75rem;
	position: absolute;
	color: var(--color-reggray);
}

/* Gray out the disabled selects */
select:disabled,
.select__wrapper.disabled::after {
	opacity: 0.333;
}







/*-------------
LEGEND (above map)
--------------- */

.map__legend ul {
	margin: 0px 0px 15px 0px;
	padding: 0;
	list-style: none;
}

.map__legend ul li {
	display: inline-block;
	margin-right: 8px;
	list-style: none;
	font-size: 14px;
	line-height: 14px;
	height: 14px;
}

.map__legend ul li span {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 14px;
}




/* Color scale. */
.color-0 { background-color: rgb(85, 85, 85); }
.color-1 { background-color: rgb(50, 136, 189); }
.color-2 { background-color: rgb(102, 194, 165); }
.color-3 { background-color: rgb(175, 221, 136); }
.color-4 { background-color: rgb(255, 221, 136); }


.legend__value {
	margin: 0;
	font-size: 0.875rem;
}


/*-------------
OTHER
--------------- */


.leaflet-interactive.no-pointer {
	cursor: default;
}

.text-labels {
	text-align: center;
	font-family: var(--font-primary);
	font-size: 0.875rem;
	font-weight: 900;
	color: var(--color-reggray);
}


/*-------------
POPUP INFO BOXES
--------------- */

.leaflet-popup-content {
	font-family: var(--font-primary);
}
.leaflet-popup-content h3,
.leaflet-popup-content p, 
.leaflet-popup-content tr td {
	line-height: 1;
	font-size: 1rem;
}
.leaflet-popup-content h3 {
	margin-top: 1rem;
	margin-bottom: 0.75rem;
}
.leaflet-popup-content p {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
}


.info {
	background: white;
	font-family: var(--font-secondary);
	font-size: 1rem;
	line-height: 1.8;
	border-radius: var(--border-radius);
	color: black;
	width: 250px;
	max-width: 250px;
}

.popup {
}

.popup.is-hidden {
	border: none;
	display: none;
	padding: 0px;
}

.popup p {
	line-height: 1.2;
	margin: 0.875rem 0;
}

.popup p:last-child {
	margin-bottom: 0px;
}


.popup p.popup__name {
	font-weight: 900;
	text-transform: uppercase;
	margin: 0.25rem 0px 0.875rem 0px;
}

.popup__county {
	margin: 0px 0px 1rem 0px;
	padding-bottom: 0.5rem;
}

.popup__margin {
	margin: 0.25rem 0px 0px;
	font-weight: 700;
}

.popup ul {
	width: 100%;
	margin: 0;
	-webkit-padding-start: 0;
}

.popup ul li {
	font-size: 0.8125rem;
	margin: 0 0 0.5rem 1rem;
	padding: 0;
	text-indent: 0;
	-webkit-padding-start: 0;
	line-height: 1;
}

.popup table {
	border-collapse: collapse;
	width: 100%;
}

.popup table tr:nth-child(even) {
	background-color: var(--color-lightgray);
} 

.popup table tr td, 
.popup table tr th {
	text-align: left;
}
.popup table tr td.data, 
.popup table tr th.data {
	text-align: right;
	padding-left: 0.75rem;
}


/* INTERACTIVE-TABLE */

/* Only show the legend that matches the current view */
.view-0 .table-1 { display: none; }
.view-1 .table-0 { display: none; }

/* Style the toggle button like a hyperlink */
.interactive-table-toggle {
	font-family: var(--font-primary);
	font-weight: bold;
	font-size: 1rem;
	text-align: left;
	color: black;
	background: none;
	margin: 1rem 0 0 0;
	padding: 0 0 3px 0;
	border: none;
	border-bottom: 1px solid black;
	cursor: pointer;
}
.interactive-table-toggle:hover {
	color: var(--color-primary);
	border-bottom: 1px solid var(--color-primary);
}


/* Styles to simulate jQuery slideToggle() */
.interactive-table {
	display: block;
	overflow-y: scroll;
	max-height: 480px;
	transition: max-height 0.3s ease;
}
.interactive-table.hidden {
	max-height: 0;
}

.interactive-table table {
	margin: 15px 0px 15px 0px;
	padding: 0;
	width: 100%;
	border-collapse: collapse;
	/*display: none;*/
}

.interactive-table table tr td,
.interactive-table table tr th {
	font-size: 1rem;
	line-height: 1;
	padding: 6px;
}

.interactive-table table tr td div,
.interactive-table table tr th div {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	border-radius: 1rem;
}

.interactive-table table tr td {
	font-weight: normal;
	border-bottom: 1px solid #aaa;
}

.interactive-table table tr th {
	text-align: left;
	font-weight: bold;
	border-bottom: 1px solid black;
}

.interactive-table table tr td a { color: black; text-decoration: none;}

.interactive-table table tr td span { display: inline-block; width: 1rem; height: 1rem; border-radius: 1rem; }


/* On a normal row, columns */
.interactive-table table tr td:nth-of-type(3),
.interactive-table table tr td:nth-of-type(4),
.interactive-table table tr td:nth-of-type(5),
/* On the header row, columns */
.interactive-table table tr th:nth-of-type(3),
.interactive-table table tr th:nth-of-type(4),
.interactive-table table tr th:nth-of-type(5) {
	border-left: 1px solid #aaa;
}


/* On a normal row, columns */
.interactive-table table tr td:nth-of-type(1),
.interactive-table table tr td:nth-of-type(4),
.interactive-table table tr td:nth-of-type(5),
.interactive-table table tr td:nth-of-type(6),
.interactive-table table tr td:nth-of-type(7),
.interactive-table table tr td:nth-of-type(8),
.interactive-table table tr td:nth-of-type(9),
.interactive-table table tr td:nth-of-type(10),
.interactive-table table tr td:nth-of-type(11),
/* On the header row, columns */
.interactive-table table tr th:nth-of-type(1),
.interactive-table table tr th:nth-of-type(4),
.interactive-table table tr th:nth-of-type(5),
.interactive-table table tr th:nth-of-type(6),
.interactive-table table tr th:nth-of-type(7),
.interactive-table table tr th:nth-of-type(8),
.interactive-table table tr th:nth-of-type(9),
.interactive-table table tr th:nth-of-type(10),
.interactive-table table tr th:nth-of-type(11) {
	text-align: center;
}

.interactive-table table tr:nth-child(even) {
	background: #f0f0f0;
}



/* RESPONSIVE */

@media (max-width: 700px) {
}


@media (min-width: 1400px) {
}

@media (max-width: 800px) {
	.map__legend {
		max-width: 100%;
	}
}

@media (max-width: 640px) {
	h4 {
		margin: 0px 0px 4px 0px;
		padding: 0px;
	}

}

@media (max-width: 360px) {
}

