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

:root {

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

	/* Number of legend divisions */
	--num-legend-items-0: 10;
	--num-legend-items-1: 9;

	/* Light, 7-color qualitative color scheme  */
	--color-qualitative-lt-0: rgb(102,194,165); /* teal */
	--color-qualitative-lt-1: rgb(252,141,98); /* lt orange */
	--color-qualitative-lt-2: rgb(141,160,203); /* lt blue */
	--color-qualitative-lt-3: rgb(231,138,195); /* pink */
	--color-qualitative-lt-4: rgb(166,216,84); /* yellow green */
	--color-qualitative-lt-5: rgb(255,217,47); /* lt yellow */
	--color-qualitative-lt-5: rgb(229,196,148); /* tan */

	/* Dark, 7-color qualitative color scheme  */
	--color-qualitative-dk-0: rgb(228,26,28); /* red */
	--color-qualitative-dk-1: rgb(55,126,184); /* blue */
	--color-qualitative-dk-2: rgb(77,175,74); /* green */
	--color-qualitative-dk-3: rgb(152,78,163); /* purple */
	--color-qualitative-dk-4: rgb(255,127,0); /* orange */
	--color-qualitative-dk-5: rgb(255,255,51); /* yellow */
	--color-qualitative-dk-5: rgb(166,86,40); /* brown */



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


/*-------------
CHART
--------------- */

.charts__wrapper {
	display: grid;
	grid-template-columns: 1fr; /* Change this depending on how many side-by-side charts you want to display */
	gap: 1rem;
}
.interactive__wrapper, .chart__wrapper {
	position: relative;
	width: 100%;
}

.full-width {
	grid-column: 1 / -1;
}


.chart {
	width: 100%;
	margin-bottom: 8px;
}

text { font-family: "Libre Franklin", sans-serif; }


.chart__footer table {
	margin: 0px auto;
}


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

}

.chart__headline,
.chart__header,
.chart__date,
.chart__subheadline,
.chart__source {
	font-family: var(--font-primary);
}

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

.chart__header {
	font-size: 0.875rem;
	text-transform: uppercase;
	margin: 1rem 0px 0px 0px;
	font-weight: 700;
	/*color: var(--color-gray);*/
	text-align: center;
}


.chart__date {
	margin-top: 4px;
}

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

.chart__date,
.chart__note,
.chart__credit,
.chart__source {
	font-size: 0.875rem;
}

.chart__credit,
.chart__source {
	margin: 0.25rem 0px;
	font-size: 0.75rem;
}


.chart__credit {
	text-align: right;
}


.chart__source {
	font-style: italic;
	/*padding-bottom: 1rem;*/
	/*border-bottom: 1px solid #ddd;*/
}


/* FORM CONTROLS */
select {
	font-size: 1rem;
	padding: 0.5rem;
}


/*-------------
LEGEND (above chart)
--------------- */

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

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

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

.chart__legend .legend-0 ul li span {
	display: inline-block;
	width: 14px;
	height: 14px;
	/* border-radius: 14px; */
}



/* Rainbow from blue to orange; blue is open; orange is dead/unknown */
.view-0 .square-0, .color-0 { background: var(--color-qualitative-dk-0); } /* Use dark red here */
.view-0 .square-1, .color-1 { background: var(--color-qualitative-dk-1); } /* Use dark blue here */
.view-0 .square-2, .color-2 { background: var(--color-qualitative-lt-2); }
.view-0 .square-3, .color-3 { background: var(--color-qualitative-lt-3); }
.view-0 .square-4, .color-4 { background: var(--color-qualitative-lt-4); }
.view-0 .square-5, .color-5 { background: var(--color-qualitative-lt-5); }
.view-0 .square-6, .color-6 { background: var(--color-qualitative-lt-6); }

.line-bg {
	color:  var(--color-lightgray);
}



.chart__tooltip {
	pointer-events: none;
	display: block;
	position: absolute;
	opacity: 0;
	top: 0;
	left: 0;
	border: 1px black solid;
	background-color: white;
	padding: 0px 1rem;
}

.chart__tooltip h2 { font-size: 0.875rem; }
.chart__tooltip p { font-size: 0.75rem; }


/* BAR ENHANCEMENTS */
rect.bar-striped {
	fill: url(#pattern-stripe);
}



/* RESPONSIVE */

@media (min-width: 1400px) {
	.charts__wrapper {
		gap: 2rem;
	}
}

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

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

	.charts__wrapper {
		gap: 0px;
	}

	.desktop-only { display: none; }
	.chart__legend .legend-0 ul li.desktop-only { display: none; }
}

@media (max-width: 640px) {

	h4 {
		margin: 0px 0px 4px 0px;
		padding: 0px;
	}


}

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

