/* Custom CSS */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

table {
  width: 100%;
}

td {
  padding: 0.25rem 0rem;
}

#heading {
  height: 100vh;
  background-color: #ececec;
  margin-bottom: 4rem;
}

/*
  General Graph CSS
*/

.container {
  margin: 2rem;
  display: flex;
  justify-content: space-around;
  padding: 2rem 0rem;
}

.line-scrolly {
  display: flex;
  margin: 0 50px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.graphic-container {
  width: 66.666667%;
}

.centered-graphic-container {
  width: 80%;
  max-width: 1300px;
}

.graphic-prose-container {
  width: 33.333333%;
}

.graphic {
  display: flex;
  padding: 1rem;
  flex-direction: column;
}

.line-scrolly-chart {
  flex: 2;
  order: 1;
  flex-wrap: wrap;
  transform: translate3d(0,0,0);
}

.graphic-prose {
  height: 100%;
  display: flex;
  flex: 1;
  flex-grow: 1;
  order: 0;
  padding: 1rem;
  flex-direction: column;
}

.graphic-title {
  font-weight: 600;
  margin: 0;
  padding: 1.2rem 0rem 0.2rem 0rem;
}

.graphic-subtitle {
  margin-top: 0;
  padding-bottom: 1rem;
  font-size: 15px;
}

.prose-subtitle {
  font-weight: 600;
  font-size: 22px;
  padding-top: 1rem;
}

.tooltip {
  position: absolute;
  width: 200px;
  height: 100px;
  padding: 10px;
  /*background-color: #1b3c59;*/
  background-color: #666;
  opacity: 0.7;
  /*background-color: rgba(0, 0, 0, 0.7);*/
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
  -webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4);
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.tooltip-heading {
  margin: 0px 0px 8px 0px;
  font-weight: bold;
  font-size: 15px;
  color: white;
  text-align: center;
}

.tooltip-data {
  margin: 0;
  font-size: 13px;
  color: white;
}

.hidden {
  display: none;
}

/* Scrolly slides CSS */

.spacer {
  height: 200px;
  width: 100%;
}

.slide-wrapper {
  padding: 6rem 0rem;
}

.last-slide {
  padding-bottom: 16rem;
}

.slide {
  background: #eee;
  opacity: 0.3;
  border-left: 4px solid #f67280;
  padding: 1rem 1.5rem;
  font-size: 15px;
  line-height: 1.5;
}

.slide-right {
  border-left: none;
  border-right: 4px solid #36d7b7;
}

.active {
  opacity: 1;
}

.co2-slide {
  border-left: 0;
  border-right: 4px solid #f67280;
}

#energy-per-capita {
  padding-bottom: 0rem;
}

#energy-per-capita-graphic {
  width: 75%;
}

#energy-per-capita-graphic-prose {
  width: 25%;
}

.legend {
  font-size: 12px;
  font-weight: 400;
  font-family: sans-serif;
  text-anchor: end;
}

.electricity-generator text {
  font-size: 10px;
  font-weight: 400;
  font-family: sans-serif;
}

/*
  Fuel-sankey specific CSS
*/

#fuel-flow-title {
  justify-content: center;
  text-align: center;
  margin: 0;
  padding-bottom: 0;
}

#fuel-flow-title h2 {
  margin: 0;
}

#fuel-flow-chart {
  padding-bottom: 0;
  padding-top: 0;
}

#fuel-flow-chart text{
  font-size: 11px;
  font-weight: 600;
}

#fuel-flow-prose-container {
  display: flex;
  justify-content: space-between;
  /*width: 66.6666667%;*/
  width: 45%;
  padding: 0rem 1rem;
  border: 1px solid #ddd;
}

#fuel-flow-prose-arrows {
  display: flex;
  width: 10%;
  padding: 0rem 0.75rem;
  justify-content: space-between;
}

.fuel-arrow {
  margin: 1.5rem 0rem;
  cursor: pointer;
  width: 300px;
}

.fuel-spacer {
  width: 30%;
}

#fuel-flow-calc {
  display: flex;
  width: 45%;
  /*padding: 0.5rem 1rem;*/
  align-items: flex-start;
  background-color: rgba(246, 114, 128, 0.1);
  /*font-size: 14px;*/
  border-left: 4px solid #f67280;
  border-right: 4px solid #f67280;
}

#fuel-flow-calc h3 {
  /*margin-bottom: 0.5rem;
  margin-top: 0.5rem;*/
  font-weight: 500;
  /*font-size: 22px;*/
  text-decoration: underline;
}

#fuel-flow-calc p {
  align-self: flex-start;
  margin: 0.5rem 0rem;
}

#fuel-summary-stats {
  width: 50%;
  padding-right: 0.25rem;
}

#fuel-sector-breakdown-stats {
  width: 50%;
  padding-left: 0.25rem;
}

@media only screen and (min-width: 1380px) {
  .line-scrolly {
    margin-left: auto;
    margin-right: auto;
    max-width: 1300px;
  }

  #fuel-sankey {
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    margin-top: 4rem;
    max-width: 1300px; /* Otherwise it gets way too wide on large desktops*/
  }

  #fuel-flow-info-container {
    display: flex;
    justify-content: space-between;
    padding: 0rem 1rem;
    position: relative;
    bottom: 110px;
  }

  #fuel-flow-calc {
    padding: 0.5rem 1rem;
    font-size: 14px;
  }

  #fuel-flow-calc h3 {
    margin: 0.5rem 0rem;
    font-size: 22px;
  }

  #fuel-sector-breakdown-title {
    font-size: 16px;
    margin-top: 0.75rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
  }
}

@media only screen and (min-width: 1150px) and (max-width: 1379px) {
  .line-scrolly {
    margin: 0 50px;
  }

  #fuel-sankey {
    flex-direction: column;
    margin-left: 50px;
    margin-right: 50px;
    margin-bottom: 0;
    margin-top: 4rem;
  }

  #fuel-flow-info-container {
    display: flex;
    justify-content: space-between;
    padding: 0rem 1rem;
    position: relative;
    bottom: 110px;
  }

  #fuel-flow-calc {
    padding: 0.5rem 1rem;
    font-size: 14px;
  }

  #fuel-flow-calc h3 {
    margin: 0.5rem 0rem;
    font-size: 21px;
  }

  #fuel-sector-breakdown-title {
    font-size: 15px;
    margin-top: 0.75rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
  }
}

@media only screen and (min-width: 980px) and (max-width: 1149px) {
  .line-scrolly {
    margin: 0 32px;
  }

  #fuel-sankey {
    flex-direction: column;
    margin-left: 32px;
    margin-right: 32px;
    margin-bottom: 0;
    margin-top: 4rem;
  }

  #fuel-flow-info-container {
    display: flex;
    justify-content: space-between;
    padding: 0rem 1rem;
    position: relative;
    bottom: 90px;
  }

  #fuel-flow-calc {
    padding: 0.5rem 0.5rem;
    font-size: 14px;
  }

  #fuel-flow-calc h3 {
    margin: 0.25rem 0rem;
    font-size: 18px;
  }

  #fuel-sector-breakdown-title {
    font-size: 14px;
    margin-top: 0.5rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
  }

  #fuel-flow-prose p {
    font-size: 15px;
  }
}

@media only screen and (max-width: 979px) {
  .line-scrolly {
    margin: 0 32px;
  }

  #fuel-sankey {
    flex-direction: column;
    margin-left: 32px;
    margin-right: 32px;
    margin-bottom: 0;
    margin-top: 4rem;
  }

  #fuel-flow-info-container {
    display: flex;
    justify-content: space-between;
    padding: 0rem 1rem;
    position: relative;
    bottom: 70px;
  }

  #fuel-flow-calc {
    padding: 0.5rem 0.5rem;
    font-size: 14px;
  }

  #fuel-flow-calc h3 {
    margin: 0.25rem 0rem;
    font-size: 17px;
  }

  #fuel-sector-breakdown-title {
    font-size: 13px;
    margin-top: 0.5rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
  }

  td {
      font-size: 13px;
  }

  #fuel-flow-prose p {
    font-size: 15px;
  }
}

#co2-ppm-title {
  padding-left: 20px;
}

#co2-ppm-subtitle {
  padding-left: 20px;
}

#last-para {
  margin-bottom: 5rem;
}

/*
    Custom line chart CSS to ensure all line charts follow my beautiful custom
    design.
*/
.line-chart-x-axis path {
  stroke: black;
  stroke-width: 1.5;
  opacity: 0.5;
  shape-rendering: crispEdges;
}

.line-chart-x-axis .tick line {
  stroke: black;
  stroke-width: 1.5;
  opacity: 0.5;
}

.line-chart-x-axis .tick text {
  font-size: 12px;
  font-weight: 400;
}

.line-chart-y-axis .tick line {
  stroke: #bbb;
  opacity: 0.5;
}

.line-chart-y-axis path {
  stroke: #bbb;
  shape-rendering: crispEdges;
  opacity: 0;
}

.line-chart-y-axis .tick text {
  font-size: 12px;
  font-weight: 400;
}

.dot {
  fill: white;
  stroke: grey;
  stroke-width: 1.5px;
  cursor: pointer;
}
