@import url('https://use.typekit.net/xcj1vcp.css');

@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-global.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-darkest.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-lightest.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-dark.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-light.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-medium.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/vars/spectrum-large.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/icon/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/statuslight/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/link/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/page/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/site/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/typography/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/button/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/buttongroup/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/site/index-vars.css";
@import "../node_modules/@adobe/spectrum-css/dist/components/sidenav/index-vars.css";

@import "./colors.css";
@import "./icons/style.css";

:root {
  --cds-editor-header-background-color: var(--spectrum-global-color-gray-500);
}

.spectrum--light {
  /* Reassign spectrum color variables with our own generated colors */
  --spectrum-global-color-gray-50: var(--Gray33);
  --spectrum-global-color-gray-75: var(--Gray67);
  --spectrum-global-color-gray-100: var(--Gray100);
  --spectrum-global-color-gray-200: var(--Gray200);
  --spectrum-global-color-gray-300: var(--Gray300);
  --spectrum-global-color-gray-400: var(--Gray400);
  --spectrum-global-color-gray-500: var(--Gray500);
  --spectrum-global-color-gray-500: var(--Gray500);
  --spectrum-global-color-gray-700: var(--Gray700);
  --spectrum-global-color-gray-800: var(--Gray800);
  --spectrum-global-color-gray-900: var(--Gray900);

  --spectrum-global-color-blue-400: var(--Blue100);
  --spectrum-global-color-blue-500: var(--Blue200);
  --spectrum-global-color-blue-600: var(--Blue300);
  --spectrum-global-color-blue-700: var(--Blue400);

  --spectrum-semantic-cta-color-background-default: var(--spectrum-global-color-blue-600);
  --spectrum-semantic-cta-color-background-hover: var(--spectrum-global-color-blue-700);
  --spectrum-semantic-cta-color-background-down: var(--spectrum-global-color-blue-700);
  --spectrum-semantic-cta-color-background-key-focus: var(--spectrum-global-color-blue-600);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
}

[hidden] {
  display: none !important;
}

.cds-Editor {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cds-Editor-header {
  position: relative;
  display: flex;
  flex-direction: row;

  background-color: var(--cds-editor-header-background-color);
}
.cds-Editor-content {
  flex: 1;
  overflow-x: auto;
}
.cds-Editor-header {
  background: var(--spectrum-global-color-gray-75);
}
.cds-Editor-header:after {
  content: '';
  position: absolute;
  bottom: 0;
  display: block;
  width: 100%;
  height: 1px;
  background: var(--spectrum-global-color-gray-200);
}

.cds-Editor-JSON {
  padding: 8px 24px;
}

.cds-Editor-title,
.cds-Editor-actions {
  padding: 8px 12px;
}

.cds-Editor-title {
  flex: 1;
  padding-left: 16px;
}

.cds-Logo {
  height: 56px;
}

.cds-Logo-Type {
  fill: #21385E;
}

.spectrum-Site-title {
  font-size: 48px;
  margin-left: 12px;
}

.cds-Ribbon {
  position: fixed;
  top: 0;
  right: 0;
}

.cds-Footer {
  margin-top: 120px;
}

.cds-Sidebar {
  z-index: 1000;
  min-width: 235px;
  border-right: 1px solid var(--spectrum-global-color-gray-200);
}

.spectrum-ActionButton .icon {
  font-size: 24px;
}

.spectrum-Button--cta {

}

.spectrum-Button .icon {
  font-size: 18px;
  margin-right: 8px;
}

.cds-Editor-menuToggle {
  display: none;
}

.spectrum-Site-overlay {
  z-index: 999;
}

.cds-Error {
  display: inline-block;
  margin: 24px;
  padding: 8px 16px;
  background: var(--spectrum-semantic-notice-color-background);
  border-radius: var(--spectrum-alias-border-radius-medium);
  color: white;
}

.spectrum-Heading {
  font-family: aglet-slab, sans-serif;
  font-weight: 500;
  color: var(--spectrum-global-color-blue-500);
}
.spectrum-SideNav-itemLink {
  font-family: aglet-slab, sans-serif;
  font-weight: 500;
}
.spectrum-Body {
  font-family: aglet-sans, sans-serif;
}

.spectrum-Site-hero .spectrum-Heading--L {
  margin-top: calc( 2.5 * var(--spectrum-heading-l-margin-top, var(--spectrum-alias-heading-l-margin-top)));
}

.spectrum-Link {
  text-decoration: underline;
}

.spectrum-Link--silent {
  text-decoration: none;
}

div.spectrum-SideNav-itemLink {
  cursor: default;
}

div.spectrum-SideNav-itemLink:hover {
  background: transparent;
}

.cds-Sources-list {
  padding: 0;
  margin: 48px 24px 0 24px;
}

/* Ratings */
.cds-ReportCard {
  display: flex;
  flex-direction: row;
  margin: 16px 0 32px 0;
}

.cds-ReportCard h2.spectrum-Heading--L {
  margin-top: 0;
}

.cds-ReportCard-grade {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;

  width: 78px;
  height: 78px;

  margin-right: 16px;

  border: 4px solid transparent;
  border-radius: 100%;

  font-family: aglet-slab, sans-serif;
  font-size: 48px;

  --b-color: rgb(131, 154, 20);
}
.cds-ReportCard-grade--A {
  color: green;
  border-color: green;
}
.cds-ReportCard-grade--B {
  color: var(--b-color);
  border-color: var(--b-color);
}
.cds-ReportCard-grade--C {
  color: orange;
  border-color: orange;
}
.cds-ReportCard-grade--D,
.cds-ReportCard-grade--F {
  color: red;
  border-color: red;
}
.cds-ReportCard-criteria {
  margin-top: 12px;
}

.cds-ReportCard-plusMinus {
  position: absolute;
  right: 4px;
  top: 6px;
  font-size: 36px;
}

.cds-ReportCard-contributorName {
  margin-bottom: 0 !important;
}

/* Map */
#map {
  height: 100%;
  width: 100%;
}

.cds-Popup {
  margin: -10px 0;
}

.cds-Popup-table {
  margin: auto;
  border-collapse: collapse;
}

.cds-Popup-table th {
  text-align: right;
  padding-right: 8px;
}

#mapLegend {
  position: absolute;
  background: #ffffff;
  padding: 2px 8px 2px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  z-index: 1;
  bottom: 36px;
  left: 12px;
}

.mapLegend-scaleLabels {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.mapLegend-scaleLabels .spectrum-Body--XS {
  margin: 0;
}

#mapLegend canvas {
  border-radius: 4px;
  overflow: hidden;
}

/* Graph */
#graph-elements {
  z-index: 3;
  display: block;
  position: fixed;
  width: calc(100% - 235px);
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
  visibility: hidden;
}

#graph-container {
  position: relative;
  display: block;
  animation: animatetop 0.4s;
  top: 5%;
  width: 80%;
  height: 80%;
  margin: auto;
  padding: 0;
  outline: 0;
}

#graph-close {
  font-size: 50px;
  position: absolute;
  right: 2%;
  top: 5%;
  background-color: #FFFFFF;
  border-radius: 61px;
  height: 50px;
  width: 50px;
  text-align: center;
  line-height: 42px;
  cursor: pointer;
}

#graph {
  background-color: #fff;
  border-radius: 1em;
}

.cds-Map-content {
  position: relative;
}

.cds-Map-controls {
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 2px 10px;
}

.cds-Map-dateSlider {
  width: 100%;
  box-sizing: border-box;
}

.cds-MapControl {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-style: solid;
  border-width: 1px;
  border-color: var(--spectrum-global-color-gray-50);
  border-radius: 4px;
  padding: 4px;

  &,
  input {
    font-family: Helvetica;
    font-size: 16px;
  }

}

/* Reports */
.cds-CrossCheckReports-list {
  list-style: none;
}

.cds-SourceComparison {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.cds-SourceComparison-metric {
  padding: 0 4px;
}
.cds-SourceComparison-source {
  padding-right: 12px;
  text-align: right;
}
.cds-SourceComparison-value {
  text-align: center;
}

.cds-SourceComparison-discrepancyMetric {
  color: var(--spectrum-global-color-static-white);
  background: var(--spectrum-global-color-red-400);
}

.cds-SourceComparison-agreedMetric {
  color: var(--spectrum-global-color-static-white);
  background: var(--spectrum-global-color-green-400);
}

@media screen and (max-width: 960px) {
  .is-editing .cds-SiteHeader {
    display: none;
  }
  .cds-Editor-menuToggle {
    display: block;
  }
  .cds-Sources-list {
    margin: 48px 12px 0 12px;
  }
  .spectrum-Site-content {
    /* fix: header scrolls off */
    max-height: calc(100% - 48px);
  }
  .is-editing .spectrum-Site-content {
    max-height: 100%;
  }
  #graph-elements {
    width: 100%;
  }
}
