:root {
  color-scheme: light dark;
  supported-color-schemes: light dark;
}

body {
  margin: 0;
  padding-left: 300px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: relative;
}

.beta {
  font-size: 8pt;
  text-transform: uppercase;
  background-color: #e0e0f0;
  padding: 1px 4px;
  border-radius: 4px;
}

nav {
  height: 70px;
  position: relative;
  box-sizing: border-box;
  text-align: center;
  padding-top: 25px;
  user-select: none;
  -webkit-user-select: none;
}

nav .segment {
  margin-right: 10px;
}

nav .segment a {
  position: relative;
  border: 1px solid #ccc;
  border-right: none;
  padding: 6px 13px;
  text-decoration: none;
  color: #444;
  font-size: 11pt;
}

nav .segment a.first {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

nav .segment a.last {
  border-right: 1px solid #ccc;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

nav .segment a:hover {
  background-color: #eee;
}

nav .segment a.selected {
  background-color: hsl(215, 100%, 80%);
}

#current_mode {
  margin-left: 100px;
}

#extra_panel {
  margin-right: 0;
  z-index: 1;
}

nav.compare #current_mode {
  margin-left: 100px;
}

#ranking_sets {
  margin-left: 200px;
}

nav .beta {
  position: absolute;
  right: 0px;
  top: -14px;
  font-size: 7pt;
}

#checkboxes {
  font-size: 11pt;
  vertical-align: top;
  margin-top: -9px;
  text-align: left;
  width: 14.2em;
}

#checkboxes.shows1 {
  margin-top: 0px;
}

#checkboxes.shows3 {
  margin-top: -18px;
}

nav.table #checkboxes {
  width: 15.2em;
}

#checkboxes span {
  position: relative;
}

#checkboxes .beta {
  position: absolute;
  top: 2px;
  right: -45px;
}

#checkboxes input[type=checkbox] {
  margin-right: 5px;
  margin-bottom: 4px;
  position: relative;
  bottom: 1px;
}

#checkboxes input[type=text] {
  margin: 0px;
  padding-top: 0px;
  width: 10px;
  cursor: default;
  vertical-align: middle;
}

#checkboxes input[type=text]:focus {
  cursor: text;
}

#checkboxes label {
  user-select: none;
  -webkit-user-select: none;
}

#country_selection {
  height: 50px;
  box-sizing: border-box;
  padding-top: 0px;
  text-align: center;
  font-size: 11pt;
  margin-bottom: 20px;
}

#country_selection .box {
  display: inline-block;
  border: 1px solid #e0e0e0;
  margin: 0px auto;
  padding: 10px 12px;
  border-radius: 5px;
}

#country_selection .mobile {
  display: none;
}

#country_selection .search {
  width: 190px;
}

#country_selection .search.error {
  background-color: rgba(255, 0, 0, 0.2);
}

#country_selection .search[disabled] {
  background-color: #eee;
}

#country_selection .preset {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 12px;
  text-decoration: none;
  color: #444;
}

#country_selection .preset:hover {
  background-color: #eee;
}

#country_selection .add {
  border: none;
  padding: 5px;
}

#country_selection .add img {
  width: 20px;
  vertical-align: middle;
  margin-bottom: 2px;
  opacity: 0.3;
}

#country_selection .separator {
  border-left: 1px solid #ddd;
  margin-left: 1px;
  margin-right: 10px;
  padding-top: 3px;
  padding-bottom: 3px;
}

#preset_selector {
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  width: 210px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 4px 10px 6px;
  margin-right: 4px;
  text-align: left;
  cursor: default;
}

#preset_selector.expanded {
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

#preset_selector label {
  font-size: 9pt;
  color: #666;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

#preset_selector:active {
  cursor: default;
}

#preset_selector label:active {
  cursor: default;
}

#preset_selector .arrow {
  width: 10px;
  position: absolute;
  right: 7px;
  top: 0.7em;
  opacity: 0.7;
}

#preset_selector .pulldown {
  display: none;
  position: absolute;
  box-sizing: border-box;
  background: white;
  z-index: 1;
  width: 210px;
  max-height: 500px;
  overflow-y: auto;
  left: -1px;
  border: 1px solid #ccc;
  border-radius: 5px;
  border-top: none;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  margin-top: 7px;
  margin-bottom: 0px;
  list-style-type: none;
  padding: 5px;
  font-size: 12px;
  color: #333;
}

#preset_selector li {
  padding: 7px 9px;
  border-radius: 5px;
}

#preset_selector li:hover {
  background: #eee;
}

#preset_selector li.added {
  background: #dfb;
}

#preset_selector li.added.fadeout {
  background: inherit;
  transition: background-color 0.5s linear;
}

#preset_selector li.new {
  padding-left: 6px;
  padding-right: 3px;
}

#preset_selector li.new:hover {
  background: transparent;
}

#preset_selector li .delete {
  width: 14px;
  height: 14px;
  position: absolute;
  right: 12px;
  opacity: 0.5;
  display: none;
  background-image: url('/images/corona/remove-circle-line.png');
  background-size: contain;
}

#preset_selector li:hover .delete {
  display: inline;
}

#preset_selector li .delete:hover {
  background-image: url('/images/corona/remove-circle-dark.png');
}

#preset_selector.expanded label {
  opacity: 0.8;
}

#preset_selector.expanded .pulldown {
  display: block;
}

#preset_selector.expanded .arrow {
  opacity: 0.6;
}

#preset_selector input.preset-name {
  width: 71%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px;
  margin-right: 1px;
}
 
#selection_info {
  font-size: 11pt;
  color: #666;
}

#time_slider_row {
  margin: 5px auto 10px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

#time_slider_row span, #time_slider_row a {
  font-size: 9pt;
  color: #333;
  vertical-align: top;
  position: relative;
  top: -2px;
}

#time_slider {
  display: inline-block;
  width: 650px;
  max-width: 80%;
  height: 20px;
  margin-left: 5px;
  margin-right: 5px;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#time_slider .timeline {
  margin: 5px;
  width: calc(100% - 10px);
  border-top: 1px solid #ccc;
  border-left: 1px solid #ccc;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
}

#time_slider .selection {
  position: absolute;
  left: 0px;
  top: 0px;
  margin: 5px;
  border-top: 1px solid hsl(205, 100%, 50%);
  border-bottom: 2px solid hsl(205, 100%, 40%);
}

#time_slider .handle {
  position: absolute;
  left: 0px;
  top: 0px;
  line-height: 12px;
  user-select: none;
  -webkit-user-select: none;
}

#time_slider .handle img {
  width: 12px;
  user-select: none;
  -webkit-user-select: none;
}

#time_slider .handle[data-side=end] {
  left: auto;
  right: 0px;
}

#warning {
  font-size: 11pt;
  color: #333;
  text-align: center;
  margin: 8px auto 0px;
  max-width: 1040px;
  line-height: 160%;
}

#warning span {
  display: inline-block;
  background-color: #eee;
  border-radius: 5px;
  padding: 6px 8px;
}

#warning img {
  width: 20px;
  vertical-align: middle;
  margin-bottom: 3px;
  margin-right: 6px;
}

#help_button {
  position: absolute;
  top: 21px;
  right: 25px;
}

#help_button img {
  width: 24px;
  opacity: 0.3;
}

@media (hover: hover) {
  #help_button:hover img {
    opacity: 0.5;
  }
}

#ukraine_button {
  position: absolute;
  top: 15px;
  left: 21px;
  font-size: 22pt;
  padding: 0px 4px;
  text-decoration: none;
}

#ukraine_button:hover {
  background-color: #eee;
  border-radius: 6px;
}

#settings_button {
  display: none;
  position: absolute;
}

#settings_button img {
  width: 26px;
  opacity: 0.3;
}

@media (hover: hover) {
  #settings_button:hover img {
    opacity: 0.5;
  }
}

#no_actives_warning {
  display: none;
  position: absolute;
  box-sizing: border-box;
  width: 95%;
  bottom: 35px;
  font-size: 9pt;
  text-align: center;
  color: #888;
}

#chart_container {
  position: relative;
  height: calc(100vh - 75px);
  padding: 40px;
  padding-top: 0px;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

#table_container {
  display: none;
  max-width: 100%;
  overflow: auto;
  margin: 0px 5px;
}

#ranking_table {
  margin: 15px auto 20px;
  border: 1px solid #888;
  border-collapse: collapse;
}

#ranking_table th, #ranking_table td {
  border: 1px solid #888;
  padding: 5px 8px;
  color: #333;
  font-size: 11pt;
  white-space: nowrap;
}

#ranking_table tr.header {
  height: 2.7em;
}

#ranking_table td {
  text-align: right;
  padding-left: 15px;
}

#ranking_table td.name {
  text-align: left;
  padding-left: 8px;
  max-width: 240px;
  white-space: normal;
}

#ranking_table td.nr {
  padding-left: 8px;
}

#ranking_table th {
  cursor: default;
  padding-left: 10px;
  padding-right: 10px;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

#ranking_table th .title {
  padding-left: 10px;
}

#ranking_table th.nr .title {
  padding-left: 0px;
}

#ranking_table th.total {
  min-width: 6.5em;
}

#ranking_table th.daily {
  min-width: 4.3em;
}

#ranking_table .arrow {
  display: inline-block;
  opacity: 0;
  margin-left: 5px;
  width: 8px;
  height: 10px;
}

#ranking_table .arrow.up, #ranking_table .arrow.down {
  background-repeat: no-repeat;
  opacity: 0.8;
}

#ranking_table .arrow.up {
  background: url('/images/corona/sort-up.png');
  background-size: contain;
}

#ranking_table .arrow.down {
  background: url('/images/corona/sort-down.png');
  background-size: contain;
}

#ranking_table .arrow.fade {
  opacity: 0.5;
}

#ranking_table img.trend {
  width: 7px;
  margin-left: 4px;
}

#ranking_table img.trend ~ img.trend {
  margin-left: 1px;
}

#ranking_table th .note {
  margin-top: 2px;
  margin-bottom: 0px;
  font-size: 8pt;
  font-weight: normal;
  color: #888;
}

#map_container {
  width: 100%;
  height: 600px;
}

.map-info {
  position: fixed;
  right: 10px;
  top: 10px;
  background-color: white;
  border: 1px solid #333;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  padding: 15px;
  max-width: 400px;
  min-width: 120px;
}

.map-info h2 {
  font-size: 13pt;
  margin-top: 0;
  margin-bottom: 5px;
}

.map-info h3 {
  font-size: 13px;
  margin-top: 0;
  margin-bottom: 5px;
}

.map-info p {
  margin: 10px 0 0;
  font-size: 13px;
}

.map-info p.large {
  font-size: 10.5pt;
  margin: 10px 0 0;
}

.map-info p img.trend {
  width: 10px;
  position: relative;
  top: 2px;
  margin-right: 1px;
}

#map_container .mapbox-logo {
  margin-bottom: 3px;
  margin-left: 8px;
}

#map_container .mapbox-logo img {
  width: 76px;
}

#ukraine_message {
  display: none;
  width: 500px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background-color: white;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
  padding: 5px 20px 16px;
  position: absolute;
  top: 45px;
  left: 60px;
	z-index: 1200;
  font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
  text-align: left;
  user-select: auto;
  -webkit-user-select: auto;
}

#ukraine_message h2 {
  font-size: 13pt;
  margin-top: 10px;
  margin-bottom: 5px;
}

#ukraine_message p {
  font-size: 10.5pt;
  margin: 10px 0 0;
}

#ukraine_message .close {
  position: absolute;
  top: 12px;
  right: 10px;
}

#ukraine_message .close img {
  width: 16px;
  opacity: 0.4;
}

#ukraine_message .close:hover img {
  opacity: 0.6;
}

#data_providers_popup {
  width: 320px;
  border-radius: 10px;
  border: 1px solid #d8d8d8;
  background-color: white;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);
  padding: 3px 18px 14px;
  position: absolute;
  bottom: 30px;
  left: 42%;
	z-index: 1200;
}

#help_overlay {
  position: fixed;
  display: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 2001;
}

#help_container {
  display: none;
  position: absolute;
  top: 20%;
  height: 60%;
  margin-left: 140px;
  margin-right: 140px;
  border-radius: 10px;
  border: 2px solid #888;
  background-color: rgba(48, 48, 48, 0.97);
  color: #eee;
  z-index: 2002;
}

#help_container .content {
  overflow-y: scroll;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 30px;
}

#help_container p {
  line-height: 125%;
}

#help_container a {
  color: hsl(215, 100%, 60%);
}

#help_container a:hover {
  color: hsl(215, 100%, 50%);
}

#help_container li {
  margin-top: 5px;
  margin-bottom: 5px;
  line-height: 125%;
}

#help_container .close {
  position: absolute;
  top: 10px;
  right: 22px;
}

#help_container .close img {
  width: 20px;
  opacity: 0.5;
}

#help_container .close:hover img {
  opacity: 0.8;
}

#data_providers_popup {
  width: 320px;
  border-radius: 10px;
  border: 1px solid #d8d8d8;
  background-color: white;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);
  padding: 3px 18px 14px;
  position: absolute;
  bottom: 30px;
  left: 42%;
	z-index: 1200;
}

#data_providers_popup:before, #data_providers_popup:after {
	content: "";
	position: absolute;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	top: 100%;
	left: 50%;
	margin-left: -10px;
}

#data_providers_popup:before {
	border-top: 10px solid #111;
	border-top: 10px solid rgba(0, 0, 0, 0.1);
	margin-top: 0px;
}

#data_providers_popup:after{
	border-top: 10px solid white;
	margin-top: -2px;
	z-index: 1201;
}

#data_providers_popup h3 {
  font-size: 11pt;
  margin-top: 15px;
  margin-bottom: 10px;
}

#data_providers_popup p {
  font-size: 11pt;
  margin: 8px 0px 8px 8px;
}

#data_providers_popup a {
  text-decoration: none;
  color: blue;
}

#data_providers_popup a:hover {
  text-decoration: underline;
}

#data_providers_popup .close {
  position: absolute;
  top: 12px;
  right: 10px;
}

#data_providers_popup .close img {
  width: 16px;
  opacity: 0.4;
}

#data_providers_popup .close:hover img {
  opacity: 0.6;
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  margin: 0;
  box-sizing: border-box;
}

#search {
  height: 38px;
  box-sizing: border-box;
  text-align: center;
  padding-top: 5px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #ddd;
}

#search img {
  width: 18px;
  opacity: 0.3;
  vertical-align: middle;
  margin-right: 5px;
  margin-bottom: 1px;
}

#search input {
  font-size: 13pt;
  width: 200px;
}

#list {
  margin: 0;
  height: calc(100vh - 38px);
  box-sizing: border-box;
  overflow-y: scroll;
  padding: 0px 0 30px;
  border-right: 1px solid #eee;
}

#list li {
  list-style-type: none;
  position: relative;
}

#list li a {
  display: block;
  position: relative;
  padding: 8px 16px;
  padding-right: 25px;
  font-size: 11pt;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  color: #333;
}

#list li a:hover {
  background-color: #eee;
}

#list li a:focus {
  outline: none;
}

#list li a.selected {
  background-color: hsl(215, 100%, 80%);
}

#list li a.region {
  display: none;
  padding-left: 40px;
}

#list li a.region.expanded {
  display: block;
}

#list li a.special {
  font-weight: bold;
}

#list li a .country {
  font-size: 9pt;
  margin-right: 5px;
  color: #888;
  display: none;
}

#list li a .counter {
  position: absolute;
  right: 8px;
  top: 10px;
  font-size: 10pt;
  color: #888;
}

#list.filtered li a {
  display: none;
}

#list.filtered li a.region.expanded {
  display: none;
}

#list.filtered li a.matched {
  display: block;
}

#list.filtered li a.region.expanded.matched {
  display: block;
}

#list.filtered li a.region {
  padding-left: 16px;
}

#list.filtered li a .country {
  display: inline;
}

#list .beta {
  position: relative;
  top: -1px;
  font-size: 8pt;
  text-transform: uppercase;
  background-color: #e0e0f0;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 8px;
}

footer {
  position: fixed;
  display: block;
  width: calc(100vw - 300px);
  bottom: 10px;
  text-align: center;
  font-size: 9pt;
  color: #666;
}

footer a {
  color: #666;
}

footer.inline {
  position: static;
  width: auto;
  margin-top: 10px;
  margin-bottom: 10px;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: black;
  }

  .beta {
    background-color: #78a;
    color: black;
  }

  nav {
    color: #ddd;
  }

  nav .segment a {
    border-color: #777;
    color: #bbb;
  }

  nav .segment a:hover {
    background-color: #555;
  }

  nav .segment a.selected {
    background-color: hsl(215, 70%, 40%);
  }

  nav .segment a.last {
    border-right: 1px solid #777;
  }

  #warning {
    color: #222;
  }

  #warning span {
    background-color: #888;
  }

  #country_selection a {
    border-color: #777;
    color: #bbb;
  }

  #country_selection a:hover {
    background-color: #555;
  }

  #country_selection .box {
    border-color: #505050;
  }

  #country_selection .add img {
    filter: invert();
  }

  #country_selection .preset {
    color: #888;
  }

  #preset_selector .pulldown {
    background-color: black;
    color: #888;
  }

  #preset_selector li:hover {
    background-color: #333;
  }

  #time_slider_row span, #time_slider_row a {
    color: #888;
  }

  #search {
    border-right-color: #555;
    border-bottom-color: #444;
  }

  #search img {
    filter: invert();
  }

  #list {
    border-right-color: #555;
  }

  #list li a {
    border-bottom-color: #444;
    color: #eee;
  }

  #list li a:hover {
    background-color: #555;
  }

  #list li a.selected {
    background-color: hsl(215, 70%, 40%);
  }

  #list li a .counter {
    color: #999;
  }

  #ranking_table th, #ranking_table td {
    color: #eee;
  }

  #ranking_table .arrow.up, #ranking_table .arrow.down {
    filter: invert();
  }

  #help_button img {
    filter: invert();
  }

  #help_overlay {
    background-color: rgba(0, 0, 0, 0.5);
  }

  #help_container {
    border-color: #444;
  }

  footer {
    color: #888;
  }

  footer a {
    color: #888;
  }
}


/* iPad customizations */

@media only screen and (max-width: 1220px) {
  body {
    padding-left: 275px;
  }

  #sidebar {
    width: 275px;
  }

  #search {
    height: 44px;
  }

  #list {
    height: calc(100vh - 44px);
  }

  #search, #list {
    border-right: 1px solid #ccc;
  }

  #help_button {
    top: 23px;
    right: 20px;
  }

  #help_container {
    top: 12%;
    height: 65%;
    margin-left: 80px;
    margin-right: 80px;
  }

  #help_container .content {
    padding: 10px 40px;
  }

  #help_container .close {
    top: 14px;
    right: 16px;
  }

  nav.table {
    padding-right: 30px;
  }

  #checkboxes input[type=checkbox] {
    bottom: 0px;
  }

  #extra_panel {
    margin-left: 5px;
  }

  #current_mode {
    margin-left: 75px;
  }

  nav.compare #current_mode {
    margin-left: 70px;
  }

  #ranking_sets {
    margin-left: 100px;
  }

  #country_selection input[type=text] {
    width: 110px;
  }

  #country_selection .separator {
    display: none;
  }

  #country_selection .can-hide {
    display: none;
  }

  #country_selection .mobile {
    display: inline;
  }

  #ranking_table th, #ranking_table td {
    font-size: 10pt;
  }
}

@media only screen and (max-width: 1050px) {
  #current_mode {
    margin-left: 0px;
  }

  #ranking_sets {
    margin-left: 0;
  }

  nav.compare {
    padding-right: 30px;
  }

  nav.compare #settings_button {
    display: inline;
    top: 22px;
    right: 65px;
  }

  nav.compare #settings_button img {
    width: 24px;
    margin-top: 1px;
  }

  nav.compare #extra_panel {
    display: none;
    position: absolute;
    top: 45px;
    left: 0px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  nav.compare #extra_panel.visible {
    display: block;
  }

  nav.compare #extra_panel .panel-content {
    padding: 30px 25px 35px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: white;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.2);
  }
}


/* iPhone customizations */

@media only screen and (max-device-width: 480px) {
  body {
    padding-left: 250px;
  }

  #chart_container {
    padding-bottom: 10px;
  }

  #sidebar {
    width: 250px;
  }

  #settings_button img {
    width: 26px;
    margin-top: 0px;
  }

  #country_selection {
    height: 36px;
  }

  #country_selection .box {
    border: 0px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  #time_slider_row {
    margin-bottom: -10px;
  }

  #checkboxes.shows3 {
    margin-top: -23px;
  }

  #checkboxes input[type=checkbox] {
    bottom: -1px;
    margin-right: 2px;
  }

  footer {
    width: calc(100vw - 250px);
    font-size: 7pt;
    bottom: 5px;
  }
}

@media only screen and (max-device-width: 600px) and (orientation: portrait) {
}


/* iPad dark */

@media only screen and (max-width: 1050px) and (prefers-color-scheme: dark) {
  #settings_button img {
    filter: invert();
  }

  nav.compare #extra_panel .panel-content {
    border-color: #666;
    background: #333;
  }
}

/* iPhone dark */

@media only screen and (max-device-width: 600px) and (orientation: portrait) and (prefers-color-scheme: dark) {
}

@media (hover: none) {
  html {
    touch-action: manipulation;
  }
}
