@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;500;600;700;800&display=swap");

/* Settings Area */

:root {
  --font-family: "Source Sans Pro";

  --margin: 8px;
  --border: 1px solid #DFDFDF;
  --border-radius: 6px;
  --flex-basis-left: 320px;
  --flex-basis-right: 386px;

  --table-header-color: #000000;
  --table-header-opacity: 0.5;
  --table-scroll-height: 320px;
  --table-scroll-behavior: smooth;
  --row-bar-width: 4px;
  --cell-padding-v: 12px;
  --cell-padding-h: 12px;

  --map-min-color: #b0c6ff;
  --map-max-color: #365ab8;
  --map-disabled-area-color: #ffffff;
  --map-disabled-area-stroke: #eeeeee;
  --map-not-selected-area: #eeeeee;

  --map-stroke-color: #fff;
  --map-stroke-width: 1;
  --map-selected-stroke-color: darkred;
  --map-selected-stroke-width: 2;

  --zoomed-map-background: rgba(255, 255, 255, 0.8);
  --zoomed-map-stroke-color: #000;
  --zoomed-map-stroke-width: 1;
  --zoomed-map-selected-stroke-color: #fff;
  --zoomed-map-selected-stroke-width: 2;

  --static-icon-rule-tint: #224D74;

  --last7days-color-1: #f7f0bd;
  --last7days-color-2: #ebe370;
  --last7days-color-3: #d49b3a;
  --last7days-color-4: #b2303a;
  --last7days-color-5: #6b1412;
  --last7days-color-6: #1d2325;
  --last7days-color-7: #1d2325;
}

/*====================================
=               Header               =
====================================*/

.d2v-header {
  overflow: hidden;
}

.d2v-header-content {
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
  z-index: 1;
  margin-bottom: 5px;
}

.d2v-headline {
  margin: 0;
  color: #000000;
  font-size: 24px;
  font-weight: 500;
}

.d2v-subline {
  color: #a5a5a5;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 0;
}

/*====================================
=            Option Picker           =
====================================*/

.d2v-option-picker {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1000;
}

.d2v-option-picker ul {
  display: none;
  position: absolute;
  right: 50%;
  bottom: 0;
  transform: translate(50%, 3px);
  z-index: 10;
  margin: 0;
  border-radius: 4px;
  box-shadow: 0 0 1px black;
  background: white;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.d2v-option-picker.active ul {
  display: block;
}

.d2v-option-picker li {
  padding: .25rem .5rem;
  white-space: nowrap;
}

.d2v-option-picker li:hover {
  background: lightblue;
}

/*====================================
=               Footer               =
====================================*/

.afp-footer {
  display: flex;
  flex-direction: column;
  transition: opacity 1s;
  animation-fill-mode: forwards;
  width: 100%;
  box-sizing: border-box;
}

.afp-footer .main-row {
  display: flex;
  align-items: center;
  transition: opacity 1s;
  padding: 1rem 1.5rem;
  animation-fill-mode: forwards;
}

.footer-spacer {
  flex-grow: 1;
}

.footer-divider {
  background: black;
  margin: 0 5px;
  width: 1px;
  align-self: stretch;
}

.afp-footer a {
  color: #000;
  text-decoration: none;
  display: flex;
  justify-content: center;
}

.afp-footer .button,
.d2v-option-picker > span {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  cursor: pointer;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
}

.afp-footer .info-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  width: 16px;
  height: 16px;
}

.afp-footer .info-button img {
  max-width: 28px;
  max-height: 28px;
}

.afp-footer .source {
  margin-left: 6px;
  font-size: 13px;
}

.afp-footer .feedback-button {
  text-decoration: underline;
  color: #757575;
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
}

.afp-footer .company-icon {
  height: 20px;
}

.afp-footer .source-row {
  padding: 1rem 1.5rem;
  padding-top: 0;
}

/*====================================
=               Credits              =
====================================*/

.credits {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  line-height: 1.15em;
  padding: 1rem 1.5rem;
  z-index: 100;
}

.credits a {
  color: #148bcb;
  text-decoration: none;
  background-color: transparent;
}

.credits .no-bullets {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.credits li {
  margin-bottom: 13px;
}

.credit-label {
  margin: 0 5px 0 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.credit-value {
  color: #575e62;
}

.credits-info-text {
  color: #1c2022;
  margin: 22px 0 0;
  font-size: 14px;
  line-height: 1.15em;
}

.credits-last-updated {
  color: #575e62;
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 1.15em;
}

/*====================================
=              Scaffold              =
====================================*/

.afp-scaffold {
  position: relative;
}

:root {
  --search-bar-background: #f6f6f6;
  --search-bar-color: #727272;
  --table-background: #ffffff;
  --table-border-color: #eeeeee;
  --table-border-radius: 6px;
  --table-row-selected-color: rgb(231, 231, 231);
}

.d2v-table {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  border: 1px solid var(--table-border-color);
  border-radius: var(--table-border-radius);
  background: var(--table-background);
  overflow: hidden;
}

.d2v-table th,
.d2v-table td {
  vertical-align: middle;
}

.search-bar-wrapper {
  background-color: var(--search-bar-background);
}

.search-bar {
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid var(--search-bar-background);
  padding: 16px;
  width: 100%;
  color: var(--search-bar-color);
  font-weight: 400;
}

.table-wrapper {
  display: flex;
  position: relative;
  flex-direction: column;
  flex-grow: 1;
}

.table-header {
  position: absolute;
  background: var(--table-background);
  width: 100%;
}

.table-header th {
  box-sizing: border-box;
}

.header-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.header-row.invisible {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.table-scroll-area {
  display: flex;
  flex-grow: 1;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

.table-content {
  flex-grow: 1;
  width: 100%;
  border-collapse: collapse;
}

.row.selectable {
  cursor: pointer;
}

.row.selected {
  background: var(--table-row-selected-color);
}

.row.filtered-out {
  line-height: 0;
}

.row.filtered-out td {
  visibility: hidden;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
  line-height: 0;
}

/* X Icon */

.icon-x-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-x-cell .value {
  flex-grow: 1;
}

.icon-x {
  opacity: 0;
  margin: 0 5px;
  width: 10px;
  height: 10px;
}

tr.row.selected .icon-x {
  opacity: 1;
}

.row.filtered-out .icon-x {
  display: none;
}

.fill-whitespace-row {
  height: 100%;
}

/* Sort */

.sort {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
}

.sort-arrow {
  opacity: 0.2;
  cursor: pointer;
  width: 12px;
  height: 12px;
}

.sort-arrow-up {
  transform: rotate(180deg);
}

.sort-arrow.active {
  opacity: 0.5;
}

/* Develooper Area */

body {
  font-family: var(--font-family);
  max-width: 1000px;
  margin: auto;
}

/* Helper Classes */

.flex-basis.left {
  flex-basis: var(--flex-basis-left);
}

.flex-basis.right {
  flex-basis: var(--flex-basis-right);
}

/* Tabbar */

.tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 55px;
}

.tabbar .tab {
  padding: 0 1rem;
  height: 100%;
  opacity: 0.5;
  color: #003b57;
  font-size: 17px;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.tabbar .tab.active {
  opacity: 1;
  font-weight: 700;
  border-bottom: 2px solid #003b57;
}

.tabbar-info {
  opacity: 0.3;
  color: #000000;
  font-size: 14px;
  font-weight: 300;
}

.content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: calc(var(--margin) / 2);
}

.bordered {
  border-radius: var(--border-radius);
  border: var(--border);
}

.box {
  flex-grow: 1;
  margin: calc(var(--margin) / 2);
}

.box.top {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.top-box-item {
  flex: 1;
}

.location-info {
  padding: 1rem 0;
  min-width: 160px;
  flex-basis: 200px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.location-flag {
  height: 100px;
  margin: 5px;
}

.last7daysIncidence {
  margin-top: 1rem;
}

.regulations {
  margin: auto;
}

.regulation {
  display: flex;
  align-items: center;
  padding: 5px 0;
  opacity: 0.2;
}

.regulation.active {
  opacity: 1;
}

.regulation-icon {
  min-width: 28px;
  min-height: 28px;
  margin: 0px 10px;
}

.static-icon-rules {
  padding: 0.5em 0;
  flex-basis: 380px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.static-icon-rule {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  border: var(--border);
  border-radius: 10px;
  box-sizing: border-box;
  width: 110px;
  height: 80px;
  margin: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  flex-basis: calc(31% - 0.5em);
  flex-grow: 1;
}

.static-icon-rule.active {
  border: 2px solid var(--static-icon-rule-tint);
}

.static-icon-rule-img {
  max-width: 60%;
  max-height: 60%;
}

.static-icon-rule-label {
  font-size: 10pt;
  padding: 0.5em;
  padding-bottom: 0;
  text-align: center;
}

.static-icon-rules-details {
  padding: 1rem 0.5rem;
  font-size: 1.3em;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  flex-basis: 250px;
}

.no-static-icon-rule-selected {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--static-icon-rule-tint);
}

.no-static-icon-rule-selected:hover {
  animation: blinking 1.5s infinite;
}

.static-icon-rules-details-headline {
  color: var(--static-icon-rule-tint);
  font-weight: bold;
  margin-bottom: 0.5em;
}

.special-rules {
  width: 100%;
  flex-basis: 100%;
}

.special-rules-line {
  margin: 0.5rem;
}

.special-rules-line:first-child {
  font-weight: bold;
  font-size: 1.1rem;
}

.special-rules-line-break {
  margin: 0.5rem;
}

.md-bold {
  font-weight: bold;
}

.map-wrapper {
  flex-grow: 1;
  margin: calc(var(--margin) / 2);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 8px;
  box-sizing: border-box;
}

/* SVG Map */

.svg-map-stack {
  position: relative;
}

.svg-map {
  stroke-width: var(--map-stroke-width);
  animation: fadeIn ease 0.5s;
}

.svg-map path, .svg-map polygon {
  stroke: var(--map-stroke-color);
}

.svg-map path:not(.enabled), .svg-map polygon:not(.enabled) {
  fill: var(--map-disabled-area-color);
  stroke: var(--map-disabled-area-stroke);
}

.svg-map path.enabled, .svg-map polygon.enabled {
  fill: var(--map-not-selected-area);
  cursor: pointer;
}

.svg-map.zoomed path, .svg-map.zoomed polygon {
  stroke: var(--zoomed-map-stroke-color);
}

.svg-map.zoomed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--zoomed-map-background);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity ease 0.5s;
}

.svg-map.zoomed::before {
  margin-bottom: 20px;
  line-height: 26px;
  color: #224D74;
  font-size: 22px;
  font-weight: 500;
  content: attr(data-state);
}

.svg-map.zoomed.fade-out {
  opacity: 0;
}

.svg-map.zoomed svg {
  width: fit-content;
}

code.error {
  display: block;
  color: darkred;
  text-align: center;
}

/* Right Box */

.box.right {
  display: flex;
  flex-direction: column;
  border: none;
}

/* Select */

div.viewby-select {
  margin-bottom: var(--margin);
  z-index: 2;
}

div.viewby-select__control {
  border-radius: var(--border-radius);
  border: var(--border);
  cursor: pointer;
}

div.viewby-select__single-value {
  color: #003b57;
  font-size: 14px;
  font-weight: 500;
}

div.viewby-select__single-value:before {
  content: attr(label) ': ';
  color: #8c8c8c;
  font-size: 14px;
  font-weight: 400;
}

div.viewby-select__option {
  cursor: pointer;
}

/* Search Table */

.d2v-table {
  flex-grow: 1;
  border-radius: var(--border-radius);
  border: var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-scroll-area {
  height: var(--table-scroll-height);
  scroll-behavior: var(--table-scroll-behavior);
  flex-grow: 1;
}

/* Table Row */

.table-header {
  z-index: 1;
}

.sort {
  margin: 0;
  margin-left: 4px;
}

th,
td {
  padding: var(--cell-padding-v) var(--cell-padding-h);
  font-size: 14px;
  color: #000000;
  font-weight: 400;
}

th:first-child,
td:first-child {
  padding-right: 0;
}

th {
  color: var(--table-header-color);
  opacity: var(--table-header-opacity);
}

td.value {
  color: #003b57;
  font-weight: 500;
  text-align: right;
}

.row.selected,
.row.selectable:hover {
  background-color: #0dbee4;
}

.row.selected td,
.row.selectable:hover td {
  color: white;
}

/* Table Details Row */

.row-details {
  background-color: #f0f2f5;
}

.details-cell {
  padding: calc(var(--cell-padding-v) / 2) var(--cell-padding-h);
}

.row-details.first .details-cell {
  padding-top: var(--cell-padding-v);
}

.row-details.last .details-cell {
  padding-bottom: var(--cell-padding-v);
}

.colored-row td:first-child {
  position: relative;
}

.colored-row .color-bar {
  position: absolute;
  display: block;
  width: var(--row-bar-width);
  height: 100%;
  left: 0;
  top: 0;
}

/* Legend */

.legend {
  margin: var(--margin);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.legend-entry {
  margin: 4px 6px;
  display: flex;
  align-items: center;
}

.color-dot {
  margin: 4px;
  border: var(--border);
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

.color-rate {
  line-height: 21px;
}

@keyframes blinking {
  60% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
