* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

.vertical-align {
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

div.container,
#wnyc-header {
  background-color: #eee;
}

div#election-results {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
/* Races */
div#results-tables {
  padding: 20px 20px 30px 20px;
  clear: both;
}

div.raceHeader {
  display: block;
  padding: 0px 10px;
}

div.raceHeader h3 {
  font-size: 18px;
  text-align: left;
  text-transform: none;
  font-weight: normal;
  color: #666;
  border-top: 1px solid #ccc;
  padding: 10px 0;
}

div.raceHeader h3 i {
  float: left;
  width: 20px;
  height: 20px;
  margin: 1px 10px 0 0;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
}

h3.seat-type {
  font-weight: normal;
  font-size: 14px;
  margin: 20px 10px 10px 10px;
  clear: both;
  color: #999;
  letter-spacing: 0.05em;
}

div.seat {
  margin-bottom: 30px;
}

div.races-section {
  clear: both;
  padding-bottom: 36px;
}

.raceContainer {
  padding-right: 200px;
  padding-left: 10px;
  position: relative;
}

.close-race {
  color: #333;
  background: #fff;
  font-size: 18px;
  line-height: 1.5em;
  padding: 10px 10px 10px 20px;
  position: relative;
  overflow: hidden;
  -webkit-border-bottom-right-radius: 2px;
  -moz-border-bottom-right-radius: 2px;
  border-bottom-right-radius: 2px;
  -webkit-border-bottom-left-radius: 2px;
  -moz-border-bottom-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.close-race .inner {
  padding-right: 150px;
  padding-top: 10px;
  padding-bottom: 10px;
  background-position: right top;
  background-repeat: no-repeat;
  background-size: 140px 140px;
  min-height: 140px;
}

.close-race span.red {
  font-weight: bold;
  /*color: #e51133;*/;
}

.close-race p {
  font-family: georgia, times, serif;
  margin-bottom: 10px;
}

.close-race p em {
  display: block;
  margin-top: 10px;
}

.close-race p em a {
  color: #e51133;
}

.close-race p em a:hover {
  color: #e51133;
  text-decoration: underline;
}

.close-race a.tweetthis {
  background: #e51133;
  color: #fff;
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  font-size: 14px;
  padding: 5px 8px;
  margin: 10px 20px;
}

.close-race a.tweetthis:hover {
  text-decoration: none;
  background: #000;
}

.contest-header {
  width: 100%;
  color: #999;
  background: #fff;
  border-bottom: 1px solid #eee;
  -webkit-border-top-right-radius: 2px;
  -moz-border-top-right-radius: 2px;
  border-top-right-radius: 2px;
  -webkit-border-top-left-radius: 2px;
  -moz-border-top-left-radius: 2px;
  border-top-left-radius: 2px;
}

.percent-reporting {
  font-size: 12px;
  position: relative;
  padding: 10px 20px;
  margin-left: 0px;
}

.candidate {
  background-color: #fff;
  position: relative;
  padding: 13px 216px 13px 20px;
  border-bottom: 1px solid #eee;
  z-index: 900;
}

.no-parties .candidate {
  padding-right: 175px;
}

.incumbent {
  background-image: url("../img/icon_incumb.png");
  background-repeat: no-repeat;
}

.candidate-name span {
  padding: 0;
}

.candidate-name,
.candidate-vote-percent {
  font-size: 18px;
}

.candidate-name b,
.candidate-vote-percent {
  font-weight: 900;
}

.candidate-votes,
.candidate-party,
.candidate-vote-percent {
  text-align: right;
  position: absolute;
  height: 100%;
  top: 0;
  bottom: 0;
}

.candidate-votes {
  right: 90px;
  font-size: 14px;
  width: 80px;
}

.candidate-party {
  right: 175px;
  font-size: 14px;
  width: 36px;
}

.candidate-vote-percent {
  right: 20px;
  width: 65px;
}

.candidate-party div.table,
.candidate-votes div.table,
.candidate-vote-percent div.table {
  display: table;
  height: 100%;
}

.candidate-party div.table div,
.candidate-votes div.table div,
.candidate-vote-percent div.table div {
  display: table-cell;
  vertical-align: middle;
}

div.winner {
  background-color: #fc0;
}
/* Duplicate markers for mobile */
.legend-mobile {
  font-size: 12px;
  float: right;
  font-weight: normal;
  color: #999;
  height: 16px;
  position: relative;
  top: 2px;
  display: none;
}

.legend-mobile.winner {
  padding-right: 21px;
  background: url('../img/icon_winner.png') no-repeat right center;
  background-size: 16px 16px;
  margin-left: 4px;
}

.legend-mobile.incumb {
  padding-right: 21px;
  background: url('../img/icon_incumb.png') no-repeat right center;
  background-size: 16px 16px;
}
/* Minimap */
.minimap {
  background-repeat: no-repeat;
  background-position: top center;
  width: 180px;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}
/* For polls closure */
div.hidden {
  display: none;
}
/* filtering */
div.no-close-races {
  padding: 10px;
  color: #e51133;
  font-size: 14px;
  display: none;
}

body.NY div.races-section.NJ {
  display: none;
}

body.NJ div.races-section.NY {
  display: none;
}

body.NY .shortcuts.NJ {
  display: none;
}

body.NJ .shortcuts.NY {
  display: none;
}

div.controls-group.mobile {
  display: none;
}

body.close div.seat.all {
  display: none;
}

body.close div.races-section.none-close.but-some-close {
  display: none;
}

body.close div.races-section.none-close div.no-close-races {
  display: block;
}
/* Popup styles */
div.popup {
  position: fixed;
  bottom: 0px;
  right: 10px;
  max-width: 300px;
  background-color: #fc0;
  color: #000;
  font-size: 12px;
  padding: 12px;
  z-index: 999;
  display: none;
}

div.popup:hover {
  color: #fff;
  background: #e51133;
  cursor: pointer;
}

div.popup:hover p a {
  color: #fff;
}

div.popup:hover a.popup-close:hover {
  color: #fc0;
}

div.popup h1 {
  font-size: 18px;
  font-weight: normal;
  margin-bottom: 10px;
}

div.popup p {
  line-height: 1.4em;
}

div.popup p a {
  color: #000;
  text-decoration: underline;
}

div.popup a.popup-close {
  text-decoration: none;
  display: block;
  color: #fff;
  position: absolute;
  top: 0px;
  right: 0px;
  width: 28px;
  height: 24px;
  text-align: center;
  line-height: 24px;
}

div.popup a.popup-close:hover {
  color: #e51133;
}
/* Credits styles */
#credits {
  margin: 25px 30px;
  color: #999;
  font-size: 12px;
  text-align: left;
  padding-bottom: 30px;
}

#credits p {
  margin: 0 0 10px 0;
}

#credits a {
  color: #999;
  text-decoration: underline;
}

#credits a:hover {
  color: #e11837;
}

#credits .ap {
  max-width: 450px;
  min-height: 50px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

#credits .ap img {
  position: absolute;
  top: 0;
  left: 0;
}

#credits .ap span {
  float: left;
  padding: 15px 10px 15px 55px;
}
