/*******************************************************************************
 * Name:    covid-19.css
 * Purpose: This CSS file styles index.html.
 * Author:  Huidae Cho
 * Since:   April 4, 2020
 *
 * Copyright (C) 2020, Huidae Cho <https://idea.isnew.info>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 ******************************************************************************/

/*******************************************************************************
 * MOBILE FIRST (less processing on mobile)
 ******************************************************************************/
html {
	width: 100%;
	height: 100%;
	line-height: 1.3;
}
body {
	width: calc(100% - 4px);
	height: calc(100% - 4px);
	margin: 0;
	padding: 2px;
	overflow: hidden;
	font-family: sans-serif;
	font-size: 0.69em;
}
.desktop-block,
.desktop-inline {
	display: none;
}
a {
	color: #0000cc;
	text-decoration: none;
}
a:hover {
	color: black;
	text-decoration: underline;
}
/*******************************************************************************
 * HEADER (TOP)
 ******************************************************************************/
h1 {
	display: inline-block;
	vertical-align: top;
	width: calc(100% - 106px);
	margin: 0;
	font-size: 1.3em;
}
#virus {
	position: absolute;
	color: #00000011;
	top: 0;
	right: 60px;
	font-size: 85px;
	z-index: -1;
}
.follow-me {
	display: inline-block;
	vertical-align: top;
	width: 100px;
	text-align: right;
}
.follow-me .author {
	display: none;
	font-size: 0.8em;
}
.follow-me .icons {
	font-size: 1.5em;
	margin: 0;
}
#legend {
	text-align: right;
	font-size: 0.8em;
}
#legend > .iconify {
	font-size: 1.5em;
	margin-bottom: -2px;
}
#country-links-wrap {
	white-space: nowrap;
}
#country-links > a {
	cursor: pointer;
}
/*******************************************************************************
 * MAP (LEFT)
 ******************************************************************************/
#map {
	display: inline-block;
}
/*******************************************************************************
 * POPUP (MAP)
 ******************************************************************************/
#popup {
	width: 105px;
}
h3 {
	font-size: 1em;
	margin: 0 0 2px 0;
}
#popup-last-updated {
	text-align: right;
	font-size: 0.9em;
}
#popup-stats {
	width: 100%;
	border-collapse: collapse;
	font-weight: bold;
}
#popup .cfr {
	font-size: 0.75em;
	font-weight: bold;
}
/*******************************************************************************
 * INFO (RIGHT)
 ******************************************************************************/
#info {
	display: inline-block;
	vertical-align: top;
	width: 35%;
	max-width: 300px;
	font-size: 0.95em;
}
h2 {
	font-size: 1.2em;
	text-align: center;
	margin: 0 0 0.1em 0;
}
#summary {
	font-size: 0.8em;
}
#last-updated-label {
	display: none;
	width: 0%;
}
#last-updated {
	display: inline-block;
	width: 100%;
	text-align: right;
}
#global-stats {
	width: 100%;
	font-weight: bold;
	font-size: 1.5em;
	border-collapse: collapse;
}
#summary .cfr {
	font-size: 1.1em;
	font-weight: bold;
}
.numeric {
	text-align: right;
}
.confirmed {
	background-color: #00000055;
}
.recovered {
	background-color: #00ff0055;
}
.deaths {
	background-color: #ff0000aa;
}
#plots {
	margin-bottom: 0;
}
.plots-menu a {
	display: inline-block;
	cursor: pointer;
	color: black;
	font-size: 0.9em;
	text-decoration: none;
	text-align: center;
	border-radius: 5px 5px 0 0;
	padding: 0;
	background: #cccccc;
	border: 1px solid #aaaaaa;
	border-bottom: none;
}
/* XXX: hover doesn't register a finger release from the touch screen? let's
 * use white here */
.plots-menu a:hover {
	background: white;
}
.plots-menu .active {
	background: white;
}
#popup-plots-menu {
	font-size: 0.9em;
}
#stats-by-province {
	overflow: auto;
}
.stats-by-province {
	border-top: 1px solid black;
	padding: 0;
	font-size: 0.95em;
	cursor: pointer;
}
.stats-by-province > div:first-child {
	font-weight: bold;
	margin-bottom: 0;
}
.stats-by-province .confirmed,
.stats-by-province .recovered,
.stats-by-province .deaths {
	margin-left: 10px;
	background-color: inherit;
}
.stats-by-province .confirmed {
	color: black;
}
.stats-by-province .recovered {
	color: green;
}
.stats-by-province .deaths {
	color: red;
}
.highlighted {
	background-color: #0000ff22;
}
/*******************************************************************************
 * DESKTOP
 ******************************************************************************/
@media screen and (min-width: 640px) {
	html {
		height: 100%;
	}
	body {
		width: calc(100% - 10px);
		height: calc(100% - 10px);
		padding: 5px;
		font-size: 1em;
	}
	.desktop-block {
		display: block;
	}
	.desktop-inline {
		display: inline;
	}
	.mobile-block,
	.mobile-inline {
		display: none;
	}
	/***********************************************************************
	 * HEADER (TOP)
	 **********************************************************************/
	h1 {
		width: calc(70% - 6px);
		font-size: 1.7em;
	}
	#virus {
		top: 0;
		right: 150px;
		font-size: 200px;
	}
	.follow-me {
		width: 30%;
	}
	.follow-me .author {
		display: inline;
	}
	#legend > .iconify {
		margin-bottom: -3px;
	}
	#country-links-wrap {
		font-size: 0.8em;
	}
	/***********************************************************************
	 * MAP (LEFT)
	 **********************************************************************/
	.ol-attribution {
		font-size: 0.7em;
	}
	/***********************************************************************
	 * POPUP (MAP)
	 **********************************************************************/
	#popup {
		width: 200px;
	}
	h3 {
		margin: 0 0 5px 0;
	}
	#popup .cfr {
		font-size: 0.85em;
	}
	/***********************************************************************
	 * INFO (RIGHT)
	 **********************************************************************/
	#info {
		width: 25%;
	}
	h2 {
		font-size: 1.5em;
		margin: 0 0 0.2em 0;
	}
	#summary {
		font-size: 1em;
	}
	#last-updated-label {
		display: inline-block;
		width: 35%;
	}
	#last-updated {
		width: 65%;
	}
	#summary .cfr {
		font-size: 1.2em;
	}
	.cfr sup {
		font-size: 0.7em;
	}
	#plots {
		margin-bottom: 10px;
	}
	#plots-menu a,
	#popup-plots-menu a {
		padding: 2px 5px;
	}
	.plots-menu a:hover {
		background: #dddddd;
	}
	#stats-by-province {
		font-size: 0.9em;
	}
	.stats-by-province .province {
		margin-bottom: 5px;
	}
}
