/*! HTML5 Boilerplate v6.1.0 | MIT License | https://html5boilerplate.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #262e34;
  font-size: 14px;
  line-height: 1.4;
  height: 100%;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  border: 0;
  border-top: 1px solid hsla(0, 0%, 12%, 0.2);
  margin: 1.5em 0 0.75em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap; /* 1 */
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
  white-space: inherit;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
  content: ' '; /* 1 */
  display: table; /* 2 */
}

.clearfix:after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important; /* Black prints faster */
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: ' (' attr(href) ')';
  }

  abbr[title]:after {
    content: ' (' attr(title) ')';
  }

  /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */

  a[href^='#']:after,
  a[href^='javascript:']:after {
    content: '';
  }

  pre {
    white-space: pre-wrap !important;
  }
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
    sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  color: #666;
  min-width: 800px;
  height: 100%;
  font-weight: 400;
  font-size: 14px;
  background-color: #fafafa;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
    sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  line-height: 1.2;
  font-weight: 700;
  color: #262e34;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  margin-top: 0;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 10px;
}

.mapboxgl-popup-content {
  padding: 10px;
  color: #262e34;
}

.mapboxgl-popup-anchor-left {
  position: relative;
  left: 15px;
}

.mapboxgl-popup-anchor-right {
  position: relative;
  left: -15px;
}

.mapboxgl-popup-anchor-bottom {
  margin-top: -15px;
}

.mapboxgl-popup-anchor-top {
  margin-top: 15px;
}

.mapboxgl-map {
  font-family: inherit;
}

.bp3-spinner {
  position: absolute;
  z-index: 100;
  height: 100%;
  width: 100%;
}

.tooltip-heading {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
  color: #262e34;
}

.tooltip-subheading {
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 6px;
  color: #262e34;
}

table {
  font-size: 13px;
  width: 100%;
  border-radius: 2px;
  border: 1px solid #d8d8d8;
  border-collapse: collapse;
}

tr:nth-child(2n) {
  background: #f5f5f5;
}

td,
th {
  padding: 2px 5px;
}

td:last-child {
  text-align: right;
}

th {
  font-weight: 500;
}

a {
  color: #326cb1;
  text-decoration: none;
}

p.large {
  font-size: 18px;
  font-weight: 500;
  /*color: #262E34;*/
}

.header {
  background-color: #3e3e3e;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.header .logo {
  flex: 1;
}

.header nav a {
  color: #fff;
  margin-left: 15px;
}

.sidebar {
  position: absolute;
  top: 48px;
  left: 0;
  width: 400px;
  bottom: 0;
  padding: 20px 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-content {
  flex: 1 1;
}

#model-version {
  font-style: italic;
  margin-top: -0.5em;
}

.sidebar-button-panel {
  margin-bottom: 1em;
}

.options-container {
  padding: 0 10px;
}

.content > :first-child {
  margin-top: 0;
}

.visualization {
  position: absolute;
  top: 48px;
  left: calc(400px - 10px);
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: #f8f8f8;
}

.map-container {
  flex: 1;
  width: 100%;
  padding: 10px;
  position: relative;
}

.map {
  width: 100%;
  height: 100%;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
}

.map button {
  border-radius: 0;
}

button,
.button {
  font-weight: 500;
  background: none;
  box-shadow: none;
  font-size: inherit;
  text-align: center;
  display: inline-block;
  padding: 10px;
  border-radius: 100px;
}

button.primary,
.button.primary {
  margin-top: 10px;
  display: block;
  width: 100%;
  background-color: #326cb1;
  color: #fff;
}

.button.download {
}

.primary-options {
  display: flex;
}

.button-options {
  margin: 1em 1em 5px 1em;
  display: flex;
  width: 40%;
}

.agg-selector {
  align-items: center;
  width: 100%;
  height: 10px;
  min-width: 150px;
  margin: auto;
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  margin-right: 10px;
}

.agg-selector button {
  width: 50%;
}

.capita-selector {
  align-items: center;
  width: 50%;
  height: 10px;
  min-width: 175px;
  margin: auto;
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.capita-selector button {
  width: 50%;
}

#per-capita-button > span {
  flex: 0 0 auto;
}

.date-controls-container {
  margin: 1em 1em 5px 1em;
  width: 100%;
  display: flex;
}

.date-controls button {
  height: 5px;
}

.date-picker {
  margin: auto;
  display: flex;
  min-width: 150px;
}

#date-picker button {
  background-color: transparent;
}

#date-picker button.bp3-active {
  background-color: #fff;
  border: 2px solid #d6d6d6;
}

#date-slider .bp3-slider {
  height: auto;
  width: 100%;
  min-width: 150px;
  margin-right: 10px;
  margin-left: 10px;
  top: 8px;
  position: relative;
  outline: none;
  cursor: default;
  user-select: none;
}

#date-slider .bp3-slider-label {
  visibility: hidden;
}

#date-slider .bp3-slider-axis {
  visibility: collapse;
}

.bp3-input-group input {
  text-align: center;
}

.date-slider {
  width: 100%;
  padding: 0px 10px 0px 10px;
}

.primary-options .menu {
  margin-right: 10px;
}

.primary-options .menu b {
  margin-right: 5px;
}

.menu b {
  color: #262e34;
}

.menu button {
  cursor: pointer;
  border: none;
  text-align: left;
  border-radius: 100px;
  padding: 5px 5px;
}

.app {
  min-width: 980px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
}

.sidebar-button-group-container {
  width: 100%;
  margin: auto;
  margin-bottom: 0.5em;
  text-align: center;
}

.sidebar-button-group {
  width: 100%;
}

.bound-selector-button-group {
  width: 100%;
  display: inline-block;
  text-align: center;
}

#sidebar-option-buttons button {
  /*     display: flex; */
  /*     box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); */
  /*     background-color: transparent; */
  /* } */

  /* #indicator button { */
  border-radius: 0;
  padding: 12px 8px 12px 6px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  background-color: transparent;
}

.sidebar-button-panel .icon-dot-circled,
.sidebar-button-panel .icon-circle-empty {
  display: none;
}

.sidebar-button-panel button.active .icon-dot-circled {
  display: block;
}

.sidebar-button-panel button:not(.active) .icon-circle-empty {
  display: block;
}

.sidebar-button-panel button.active {
  background-color: #d6d6d6;
}

.sidebar-button-panel button:not(.active) {
  background-color: #fff;
}

#sidebar-option-buttons button.bp3-active {
  background-color: #fff;
  border: 2px solid #d6d6d6;
}

.two-selector-button {
  width: 50%;
}

.three-selector-button {
  width: 33%;
}

.menu button.active {
  background-color: #d6d6d6;
}

.menu button:not(.active) {
  background-color: #fff;
}

.menu .icon-dot-circled,
.menu .icon-circle-empty {
  display: none;
}

.menu button.active .icon-dot-circled {
  display: block;
}

.menu button:not(.active) .icon-circle-empty {
  display: block;
  color: #ccc;
}

#number.disabled {
  opacity: 0.5;
  pointer-events: none;
}

#indicator button {
  width: 100%;
  border-radius: 0;
  padding: 12px 8px 12px 6px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
  margin-bottom: 10px;
  display: flex;
  background-color: transparent;
}

#indicator button.active {
  background-color: #fff;
}

#indicator button div {
  pointer-events: none;
}

.button-icon {
  padding-right: 10px;
  align-self: center;
  font-size: 16px;
}

.button-label {
  font-weight: 600;
}

.button-description {
  font-weight: 400;
  margin-top: 6px;
  color: #666;
}

.legend-container {
  display: flex;
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: center;
}

#legend {
  font-size: 14px;
  padding: 2px 4px;
  z-index: 5000;
  background: white;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
}

.legend-color {
  display: inline-block;
  height: 14px;
  width: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
  top: 2px;
  margin-right: 4px;
}

.legend-numbers {
  display: inline-block;
  margin-right: 10px;
}

.legend-numbers:last-child {
  margin-right: 0;
}

#colors {
  width: 100px;
  background-color: #fff;
  margin: 2px 8px;
  flex-shrink: 0;
}

.link {
  display: flex;
  margin-bottom: 6px;
}

.icon {
  margin-right: 6px;
  position: relative;
  top: -1px;
}

.mapboxgl-popup {
  z-index: 4000;
  max-width: 320px !important;
}

.mapboxgl-popup-tip,
.mapboxgl-popup-content {
  pointer-events: none;
}

/*.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:%23E3E4E4;' d='M 10 6 C 9.446 6 9 6.4459904 9 7 L 9 9 L 7 9 C 6.446 9 6 9.446 6 10 C 6 10.554 6.446 11 7 11 L 9 11 L 9 13 C 9 13.55401 9.446 14 10 14 C 10.554 14 11 13.55401 11 13 L 11 11 L 13 11 C 13.554 11 14 10.554 14 10 C 14 9.446 13.554 9 13 9 L 11 9 L 11 7 C 11 6.4459904 10.554 6 10 6 z'/%3E %3C/svg%3E");
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:%23E3E4E4;' d='m 7,9 c -0.554,0 -1,0.446 -1,1 0,0.554 0.446,1 1,1 l 6,0 c 0.554,0 1,-0.446 1,-1 0,-0.554 -0.446,-1 -1,-1 z'/%3E %3C/svg%3E");
}
*/

body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) input:focus,
body:not(.user-is-tabbing) select:focus,
body:not(.user-is-tabbing) textarea:focus {
  outline: none;
}

.octicon {
  color: #fff;
  fill: #fff;
}
