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

:root {

	/* Colors */
	--color-primary: #c62828;
	--color-gray: #4a4a4a;
	--color-reggray: #777;
	--color-medgray: #ccc;
	--color-lightgray: #e9e9e9;
	--color-lee-hyperlinks: #2a5caa;

	/* Number of legend divisions */
	--num-legend-items: 4;

	/* Fonts */
	--font-primary: 'Libre Franklin', sans-serif;
	--font-secondary: 'Lato', 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-lee-hyperlinks);
	text-decoration: none;
}

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

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

.interactive__wrapper {
	width: 100%;
	position: relative;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	column-gap: 1.5rem;
}


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

.map__wrapper {
	position: relative;
	width: 100%;
	grid-column: span 1;
	margin: 0;
	display: inline-block;
	vertical-align: top;
}

.map__label {

}

.map-container {
	position: relative;
	width: 100%;
	height: 15vw;
    height: calc((100vw - 1.5rem) / 1.75);
}
svg {
	position: relative;
	width: 100%;
	height: 100%;
/*	filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));*/
}


/*
.state:hover, .county:hover {
	stroke: black;
	stroke-width: 2px;
}
*/

.state, .county {
	stroke: white;
	stroke-width: 1px;
	stroke-linejoin: round;
	stroke-linecap: round;
}

/* These are for separate meshes which I decided not to use, in favor of a hover effect */
.us-border {
	fill: none;
	stroke: white;
	stroke-width: 1px;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.state-borders {
	fill: none;
	stroke: black;
	stroke-width: 0.5px;
	stroke-linejoin: round;
	stroke-linecap: round;
	pointer-events: none;
}

.county-borders {
	fill: none;
	stroke: white;
	stroke-width: 1px;
	stroke-linejoin: round;
	stroke-linecap: round;
	pointer-events: none;
}



.tooltip {
	background: #fff;
	border: 1px solid var(--color-medgray);
	position: absolute;
	bottom: 0;
	left: 0;
	padding: 6px 7px;
	opacity: 0;
	transition: opacity 0.3s;
	pointer-events: none;
	box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3);
	border-radius: 2px;
	text-align: center;
	z-index: 200;
}
.tooltip h3 {
	font-size: 0.75rem;
	text-transform: uppercase;
	font-weight: normal;
	margin: 0px;
	line-height: 1.125rem;
}
.tooltip p.key-number {
	font-size: 1.125rem;
	font-weight: bold;
	margin: 0.25rem 0px 0px 0px;
	line-height: 1.125rem;
}
.tooltip p.label {
	font-size: 0.75rem;
	font-weight: normal;
	margin: 0.25rem 0px 0px 0px;
	line-height: 1.125rem;
}


.map__info, .map__source, .map__credit {
	grid-column: 1 / -1;
	margin: 0.25rem 0px;
	/*padding: 24px;*/
}


.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;
}

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

.map__source {
	font-style: italic;
	margin: 0.25rem 0px;
}

.map__credit {
	margin: 0.25rem 0px;
	text-align: right;
}

/* 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;
}

.rate-wrapper {
	padding: 2px 4px;
}

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


/*-------------
CONTROLS (above map)
--------------- */

.map__toggles {
	overflow: hidden;
	display: -ms-flexbox;
	display: flex;
	max-width: 450px;
	margin: 1rem auto 1.5rem auto;
}


.map__toggles button {
	background-color: var(--color-lightgray);
	padding: 0.5rem 0.75rem;
	width: 7rem;
	border: 1px solid var(--color-medgray);
	display: inline;
	-ms-flex: 1;
	flex: 1;
	outline: none;
	color: var(--color-reggray);
	border-right: none;
	line-height: 1;
	vertical-align: middle;
	margin: 0;
	cursor: pointer;
	font-size: 0.75rem;
	text-transform: uppercase;
	font-family: var(--font-primary);
}

.map__toggles button.active {
	font-weight: 700;
	background-color: white;
	box-shadow: inset 0px 0px 2px rgba(0,0,0,0.2);
	color: var(--color-darkgray);
}
.map__toggles button:first-of-type {
	border-top-left-radius: 0.25rem;
	border-bottom-left-radius: 0.25rem;
}
.map__toggles button:last-of-type {
	border-top-right-radius: 0.25rem;
	border-bottom-right-radius: 0.25rem;
	border-right: 1px solid var(--color-medgray);
}

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

.map__label {
	text-align: center;
	font-size: 1rem;
	margin: 0 0 0.25rem 0;
	font-weight: 700;
	color: var(--color-gray);
}

.legend__wrapper {
	width: 100%; 
	max-width: 500px;
	margin: 0 auto 0.5rem auto;
	display: grid;
	grid-template-columns: repeat(4,1fr);
}

.map__legend {
	max-width: 500px;
	display: grid;
	/* grid-template-rows: repeat(2, 1fr); */
}

.legend-0 {
	grid-column: span var(--num-legend-items);
}
.legend-spacer {
	grid-column: span 1;
}
.legend-1 {
	grid-column: span var(--num-legend-items);
}


.legend__row {
	display: grid;
	grid-template-columns: repeat(var(--num-legend-items), 1fr);
	/* margin-bottom: 0.5rem; */
}

/* Position the breakpoints and hashes at the borders between the legend rectangles */
.legend__row.legend__breakpoints {
	position: relative;
}
.legend-0 .legend__row.legend__breakpoints {
	left: calc(100% / (var(--num-legend-items)*2));
}
.legend-1 .legend__row.legend__breakpoints {
	left: calc(100% / (var(--num-legend-items)*2));
}


.legend__tick {
	height: 6px;
}


.legend__group {
	text-align: center;
	line-height: 1;
/*	display: grid;
	grid-template-columns: 26px 1fr;
	align-content: center;
	align-items: center;
*/}

.legend__square, .legend__value {
	display: inline-block;
	margin: 0px;
	padding: 0px;
	line-height: 14px;
	height: 14px;
	vertical-align: middle;
}


.legend__square {
	background: #aaa;
	height: 14px;
	opacity: 1;
}

.legend__tick, 
.legend__square {
	width: 100%;
}

.legend__group .legend__tick, 
.legend__group .legend__square {
	border-right: 1px solid #000;
}

.legend__group:last-of-type .legend__tick, 
.legend__group:last-of-type .legend__square {
	width: 100%;
	border-right: none;
}

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

/* Dynamically change the number of grid columns between views */
/*.legend-0 .legend__row { grid-template-columns: repeat(6, 1fr); } */
/*.legend-1 .legend__row { grid-template-columns: 1fr; } */


/* Color scale. */
/* Old version reserved color0 for #aaa, meant for exactly 0 cases/deaths or N/A. But no counties have N/A cases anymore. */

.view-0 .square-0, .color-0 { /* background: rgba(254,230,210,0.9);*/ color: black; }
.view-0 .square-1, .color-1 { /* background: rgba(253,190,133,0.9);*/ color: black; }
.view-0 .square-2, .color-2 { /* background: rgba(253,141,60,0.9);*/ color: black; }
.view-0 .square-3, .color-3 { /* background: rgba(230,85,13,0.9);*/ color: white; }
.view-0 .square-4, .color-4 { /* background: rgba(166,54,3,0.9);*/ color: white; }
.view-0 .square-5, .color-5 { /* background: rgba(166,54,3,0.9);*/ color: white; }


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




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

/* This is the container for text-label and also for label-icon */
.map-label {
	text-align: center;
	font-family: var(--font-primary);
	font-size: 0.875rem;
	line-height: 1;
	font-weight: 900;
	color: var(--color-reggray);
	/* for SVG */
	stroke: white;
	stroke-width: 0.25rem;
	/* for DOM */
	-webkit-text-stroke-color: white;
	-webkit-text-stroke-width: 0.25rem;
	text-stroke-color: white;
	text-stroke-width: 0.25rem;
	/* `paint-order` forces the browser to draw the stroke first and the fill later, */
	/* so the stroke won't appear in the interior of the letters. */
	paint-order: stroke fill;
	/* text-shadow: 0 0 0.5rem black; */
}

/* TEXT STYLES AND COLORS */
.text-label.state {
	text-transform: uppercase;
	letter-spacing: 0.25rem;
}

.map-label .black { color: #000000; }
.map-label .blue { color: #2166ac; }
.map-label .red { color: #b2182b; }
.map-label .green { color: #1b7837; }
.map-label .purple { color: #aa53c9; }
.map-label .white { color: #fefefe; }

/* Don't show until final scene */
.map-label .text-neighbors { display: none; }


/* POSITIONING */
.text-label { position: relative; }
.text-label.pad-bot { top: -0.625rem; } /* -px */
.text-label.pad-top { top: 1.375rem; } /* 22 px */
.text-label.pad-left { text-align: right; left: calc(-50% - 8px); } /* -20px */
.text-label.pad-right { text-align: left; right: calc(-50% - 8px); } /* -20px */



i.fa-check-circle,
i.fa-times-circle {
	margin-right: 6px;
}


/* Large devices */
@media (max-width: 1200px) {
}

/* Large devices */
@media (max-width: 1024px) {
}

/* Medium devices */
@media (max-width: 640px) {
	html {
		font-size: 87.5%;
	}

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

}

/* Medium devices */
@media (max-width: 600px) {
}

/* Small devices */
@media (max-width: 450px) {
}

/* Small devices */
@media (max-width: 320px) {
}


















