/* Custom properties */
.rslt-dashboard,
.tooltip-container {
  --color-primary: #8176ff;
  --color-secondary: #6b5eff;
  --color-impact: #534d9f;
  --fill-opacity: 0.6;
  --font-family: "Montserrat", sans-serif;
}

/* Base */
.rslt-dashboard {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.03125em;
  color: rgba(0, 0, 0, 0.87);
  background-color: #fff;
}

.rslt-dashboard *,
.rslt-dashboard :after,
.rslt-dashboard :before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.rslt-dashboard input,
.rslt-dashboard select,
.rslt-dashboard button {
  font-family: var(--font-family);
}

/* Layout */
.rslt-dashboard.container {
  max-width: 1000px;
  margin: auto;
}

.rslt-dashboard.container .row {
  --gutter-x: 1rem;
  flex-wrap: wrap;
  margin-right: calc(var(--gutter-x) / -2);
  margin-left: calc(var(--gutter-x) / -2);
}

.rslt-dashboard.container .row + .row {
  margin-top: 1rem;
}

.rslt-dashboard.container .col {
  flex: 1 0 0%;
  max-width: 100%;
  padding-right: calc(var(--gutter-x) / 2);
  padding-left: calc(var(--gutter-x) / 2);
}

@media (min-width: 800px) {
  .rslt-dashboard.container .row {
    display: flex;
  }

  .rslt-dashboard.container .col-40 {
    flex: 0 0 auto;
    width: 40%;
  }

  .rslt-dashboard.container .col-60 {
    flex: 0 0 auto;
    width: 60%;
  }
}

/* Title */
.rslt-dashboard .title-container .title {
  font-size: 2.125rem;
  line-height: 2.5rem;
  letter-spacing: 0.0073529412em;
  color: var(--color-primary);
}

.rslt-dashboard .title-container .title .impact {
  color: var(--color-impact);
}

.rslt-dashboard .title-container p {
  margin: 1rem 0;
}

/* Vis */
.rslt-dashboard .summary-vis-container,
.rslt-dashboard .summary-vis-container {
  display: flex;
  align-items: center;
}

.rslt-dashboard svg text {
  font-size: 0.875rem;
  letter-spacing: 0.0178571429em;
  line-height: 1.25rem;
}

.rslt-dashboard .summary-vis-container .hover-circle,
.rslt-dashboard .geo-vis-container circle {
  fill: var(--color-secondary);
  fill-opacity: var(--fill-opacity);
  stroke: #fff;
  transition: stroke 0.15s, stroke-width 0.15s;
}

.rslt-dashboard .summary-vis-container .hover-circle:hover,
.rslt-dashboard .geo-vis-container circle:hover {
  stroke: var(--color-impact);
  stroke-width: 2px;
}

.rslt-dashboard .summary-vis-container .hover-circle.muted {
  fill: #ccc;
}

.rslt-dashboard .summary-vis-container .bg-circle {
  fill: #fff;
  pointer-events: none;
}

.rslt-dashboard .summary-vis-container image {
  pointer-events: none;
}

.rslt-dashboard .geo-vis-container path {
  fill: #eee;
  stroke: #fff;
}

/* Legend */
.rslt-dashboard .size-legend circle {
  stroke: var(--color-secondary);
  stroke-dasharray: 2;
  fill: none;
}

.rslt-dashboard .size-legend line {
  stroke: currentColor;
  stroke-dasharray: 2;
}

.rslt-dashboard .size-legend text {
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0.0178571429em;
}

/* Controls */
.rslt-dashboard .control-container + .control-container {
  margin-top: 1rem;
}

.rslt-dashboard .control-container label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.rslt-dashboard .control-container input {
  font-size: 1rem;
}

.rslt-dashboard .control-container select {
  display: block;
  width: 100%;
  padding: 0.375rem 1.75rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  vertical-align: middle;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.rslt-dashboard .control-container .inline-check {
  display: inline-block;
  margin-right: 1rem;
  min-height: 1.5rem;
  padding-left: 1.5em;
  margin-bottom: 0.125rem;
}

.rslt-dashboard .control-container .inline-check input {
  float: left;
  margin-left: -1.5em;
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid rgba(0, 0, 0, 0.25);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-print-color-adjust: exact;
  transition: background-color 0.15s ease-in-out,
    background-position 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.rslt-dashboard .control-container .inline-check input[type="radio"] {
  border-radius: 50%;
}

.rslt-dashboard .control-container .inline-check input:checked[type="radio"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.rslt-dashboard .control-container .inline-check input:checked {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.rslt-dashboard .control-container .inline-check input:focus {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgb(91 91 91 / 25%);
}

.rslt-dashboard .control-container .inline-check label {
  display: inline-block;
}

/* Tooltip */
.tooltip-container {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  letter-spacing: 0.0178571429em;
  color: rgba(0, 0, 0, 0.87);
  background-color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  text-align: center;
  border-radius: 0.25rem;
  box-shadow: 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.14),
    0 1px 8px 0 rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0.75rem;
}

.tooltip-container.show {
  opacity: 1;
}

.tooltip-container .metric {
  color: var(--color-primary);
  font-weight: 700;
}

.tooltip-container .impact {
  color: var(--color-impact);
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: normal;
}
