* {
  box-sizing: border-box;
}

html {
  font-size: 12px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (min-width: 640px) {
  html {
    font-size: 16px;
  }
}

.body {
  margin: .5em 1em;
}

@media (min-width: 640px) {
  .body {
    margin-left: 2em;
    margin-right: 2em;
  }
}

/* Pattern: avatar { */
.avatar {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  background-size: cover;
  background-position: center center;
  border: 1px solid #eeeeee; /* Material Grey 200 */
}

.avatar__party {
  position: absolute;
  width: 1.5625em;
  height: 1.5625em;
  right: -.25em;
  bottom: -.25em;
}
/* Pattern: avatar } */

/* Pattern: social icons { */
.social-icon--facebook {
  color: #3b5998;
}

.social-icon--github {
  color: #333333;
}

.social-icon--instagram {
  color: #d93174;
}

.social-icon--twitter {
  color: #1da1f2;
}

.social-icon--youtube {
  color: #ff0000;
}

.social-icon--website {
  color: #607d8b; /* Material Blue Grey 500 */
}
/* Pattern: social icons } */

/* Pattern: link { */
.link {
  color: #2196F3; /* Material Blue 500 */
  text-decoration: none;
}

.link--underline:hover {
  text-decoration: underline;
}
/* Pattern: link } */

/* Utility: clearfix { */
.clearfix:before, .clearfix:after {
  display: table;
  content: " ";
}

.clearfix:after {
  clear: both;
}
/* Utility: clearfix } */

.list--unstyled {
  list-style-type: none;
  padding-left: 0;
}

.list__item {
  margin-bottom: .5em;
}

.heading--1, .heading--2, .heading--3 {
  font-family: "Merriweather", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.breadcrumbs {
  list-style-type: none;
  padding-left: 0;
}

.breadcrumbs__item {
  display: inline;
}

.breadcrumbs__item:after {
  content: " » ";
  color: #b0bec5; /* Material Blue Grey 200 */
}

.breadcrumbs__item:last-child:after {
  content: none;
}

.breadcrumbs__link {
  text-decoration: none;
}

.breadcrumbs__link:hover {
  text-decoration: underline;
}

.breadcrumbs__link, .breadcrumbs__link:hover, .breadcrumbs__link:visited, .breadcrumbs__link:active {
  color: #607d8b; /* Material Blue Grey 500 */
}

.summary {
  font-size: 1.25em;
  line-height: 1.5em;
}

.party-breakdown {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 2em;
}

.party-count {
  display: inline-block;
  color: #000000;
  border: 1px solid #000000;
  margin-right: .5em;
  margin-bottom: .5em;
  padding: .375em .6875em;
  min-width: 6em;
  text-align: center;
  cursor: pointer;
}

.party-count--selected {
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .75);
}

.candidate-list {
  list-style-type: none;
  padding-left: 0;
}

.candidate {
  padding: 0 .75em;
  margin-bottom: 1em;
}

@media (min-width: 720px) {
  .candidate {
    display: inline-block;
    float: left;
    height: 9em;
    width: 50%;
    margin-bottom: 0;
  }
}

@media (min-width: 1040px) {
  .candidate {
    width: 33.3%;
  }
}

@media (min-width: 1480px) {
  .candidate {
    width: 25%;
  }
}

.candidate__avatar-container {
  display: table-cell;
  vertical-align: top;
}

.candidate__avatar {
  width: 4em;
  height: 4em;
  margin-right: 1em;
}

.candidate__info {
  display: table-cell;
  vertical-align: top;
}

.candidate__name {
  margin-top: 0;
  margin-bottom: .25em;
}

.candidate__position {
  margin-top: 0;
  margin-bottom: .25em;
}

.candidate__social-link, .candidate__confirmation {
  display: inline-block;
}

.candidate__social-link {
  font-size: 1.5em;
  padding: .25em .125em;
  text-decoration: none;
}

@media (min-width: 720px) {
  .candidate__social-link {
    padding-left: 0;
    padding-right: 0;
  }
}

.candidate__confirmation {
  vertical-align: text-bottom;
  background-color: white;
  color: #4caf50; /* Material Green 500 */
  border: 1px solid #4caf50; /* Material Green 500 */
  text-decoration: none;
  font-size: .75em;
  line-height: 1.875em;
  margin-top: .5em;
  margin-right: .5em;
  padding: 0 .5em;
}

.political-party-history__logo {
  vertical-align: middle;
  margin-right: .25em;
}

.footer {
  font-family: Georgia, Times, "Times New Roman", serif;
  text-align: center;
  margin: 1em 0 2em;
}

.footer__hr {
  z-index: 1;
  position: relative;
  display: block;
  margin: 0;
  top: 1.5em;
  border: 0;
  border-top: 1px dotted #e0e0e0; /* Material Grey 300 */
}

.brand {
  position: relative;
  z-index: 2;
  background-color: #4dd0e1; /* Material Cyan 400 */
  color: #007c91; /* Material Cyan 600 - Dark */
  width: 3em;
  height: 3em;
  border-radius: 50%;
  margin: auto;
  overflow: hidden;
}

.brand__inner {
  font-size: 2em;
  line-height: 1.325em;
  font-weight: bold;
}

.footer__social {
  list-style-type: none;
  padding-left: 0;
  margin: 3em 0;
  font-family: "Merriweather", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: bold;
}

.footer__social-item {
  display: inline;
  margin-left: .25em;
  font-size: 1.75em;
}

.footer__social-item:first-child {
  margin-left: 0;
}

.footer__social-item--handle {
  margin-left: .5em;
}

.footer__social-link {
  text-decoration: none;
}

.hide {
  display: none !important;
}

/* Profile styles */
.profile__name {
  margin-bottom: .25em;
}

.profile__avatar {
  width: 6em;
  height: 6em;
  float: left;
}

.profile__header {
  margin-left: 7.5em;
}

.profile__description {
  font-weight: normal;
  margin-top: 0;
}

.profile__social-item {
  font-size: 1.125em;
  margin-right: 1em;
  padding: .25em .25em .25em 0;
}

@media (min-width: 640px) {
  .profile__social-item {
    display: inline-block;
  }
}

.profile__social-item:last-child {
  margin-right: 0;
}

.profile__social-icon {
  margin-right: .125em;
}

.section__icon {
  background-color: #4dd0e1; /* Material Cyan 400 */
  color: #007c91; /* Material Cyan 600 - Dark */
  display: inline-block; /* Keeping it for the <IE8 crowd ¯\_(ツ)_/¯ */
  display: inline-table;
  box-sizing: content-box;
  margin-right: .5em;
  width: 2.25em;
  height: 2.25em;
  line-height: 2.25em;
  border-radius: 50%;
  text-align: center;
}

.section__left {
  float: left;
  text-align: right;
  width: 6em;
}

.section__right {
  margin-left: 7.5em; /* +1.5em */
}

.period {
  color: #90a4ae; /* Material Blue Grey 300 */
}

.chart {
  position: relative;
  margin-top: 1em;
}

.chart__svg-root {
  z-index: 2;
}

.chart__circle {
  fill: none;
  stroke-width: 9px;
}

.chart__circle--back {
  stroke: #eeeeee; /* Material Grey 200 */
}

/* Because the SVG chart uses px, we also use them here. Might change later. */
.chart__result {
  position: absolute;
  top: 15px;
  left: 14px;
  z-index: 1;
  color: #9e9e9e; /* Material Grey 500 */
  font-size: 16px;
}

.election-info__p {
  margin: 0 0 1em 0;
}

@media (min-width: 480px) {
  .chart, .election-info {
    display: inline-block;
    vertical-align: top;
  }

  .chart {
    float: left;
    margin-top: 0;
  }

  .election-info {
    margin-left: 1em;
    width: 80%; /* Ugly fallback it for the <IE9 crowd ¯\_(ツ)_/¯ */
    width: calc(100% - 5em); /* Kinda ugly, expensive fix before the refactor. 4em (chart) + 1em (margin) */
  }
}

/* Infographic-specific styles, width 840px */
.infographic.body {
  margin-top: 2em;
  margin-left: 1em;
  margin-right: 1em;
}

.infographic .h-infographic-hide {
  display: none;
}

.infographic .candidate {
  height: 7em;
}

.infographic.page-0 .infographic-page-1, .infographic.page-1 .infographic-page-0 {
  display: none;
}

.infographic .footer {
  margin-bottom: 1px;
}

.infographic .footer__social {
  margin: 1.5em 0;
}
