/* start */
.in-county-mode .q0-9 {
  fill: rgba(247, 251, 255, .5);
}

.in-county-mode .q1-9 {
  fill: rgba(222, 235, 247, .5);
}

.in-county-mode .q2-9 {
  fill: rgba(198, 219, 239, .5);
}

.in-county-mode .q3-9 {
  fill: rgba(158, 202, 225, .5);
}

.in-county-mode .q4-9 {
  fill: rgba(107, 174, 214, .5);
}

.in-county-mode .q5-9 {
  fill: rgba(66, 146, 198, .5);
}

.in-county-mode .q6-9 {
  fill: rgba(33, 113, 181, .5);
}

.in-county-mode .q7-9 {
  fill: rgba(8, 81, 156, .5);
}

.in-county-mode .q8-9 {
  fill: rgba(8, 48, 107, .5);
}

body.lean [data-lean="D"] {
  fill: #0a5395;
  opacity: .75;
  transition: .3s all;
}

body.lean [data-lean="R"] {
  fill: #ee384c;
  opacity: .75;
  transition: .3s all;
}

body.lean [data-lean="R"]:hover {
  opacity: 1;
}

body.lean [data-lean="D"]:hover {
  opacity: 1;
}

.redistrict-container {
  display: flex;
  font-family: century-gothic !important;
  padding: 40px;
  position: relative;
}

.redistrict-container.main-map {
  flex-flow: row wrap;
}

.redistrict-container.greenmap {
  flex-flow: row wrap;
}

.redistrict-container span {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
}

.redistrict-container h1 {
  font-family: serifa;
}

#state-container {
  font-family: serifa;
}

#bouncer {
  flex-basis: 50%;
  transition: .3s all;
  z-index: 2;
}

@media screen and (max-width: 768px) {
  .redistrict-container {
    flex-direction: column-reverse;
    flex-wrap: wrap;
  }

  #bouncer, #bouncertwo, #redistrict-sidebar {
    flex-basis: 100% !important;
    width: 100%;
  }
}

@media screen and (max-width: 650px) {
  #bouncer>svg {
    height: 450px !important;
    width: 100% !important;
  }

  #bouncer>svg>g>g {
    transform: translate(0, 0)scale(.5) !important;
  }
}

#bouncertwo {
  display: block;
  height: 100%;
  position: absolute;
  right: 0;
  width: 50%;
  z-index: 1;
}

[data-class="county-setup"] {
  stroke: white;
  stroke-width: 1px;
  fill: coral;
}

.in-county-mode [data-class="county-setup"] {
  stroke: coral;
}

.textblock {
  display: block;
}

[data-class="county-setup"]:hover {
  stroke: coral;
  stroke-width: 1px;
  fill: #CCC;
}

.in-county-mode .individual-district {
  fill: transparent;
  stroke: black;
  stroke-width: 2;
}

#redistrict-sidebar {
  flex-basis: 50%;
}

#block-aplicmapblock {
  background: white;
  border: 1px solid #ccc;
  margin-bottom: 4rem;
  margin-top: 1rem;
  padding: 50px;
  width: 100%;
}

#select-container {
  margin-bottom: 25px;
  position: relative;
  width: 300px;
}

.redistrict-title::after {
  background: #0a5395;
  content: "";
  display: block;
  height: 2px;
  margin-top: 25px;
  width: 80px;
}

.district-label, .county-label {
  color: black;
  display: inline;
  font-size: 18px;
  font-weight: bold;
}

.districts {
  position: relative;
  z-index: 2;
}

.in-county-mode .districts {
  pointer-events: none;
  z-index: 1;
}

#cloro {
  background: #f1f1f1;
  border: 1px solid #ccc;
  cursor: pointer;
  display: block;
  margin-bottom: 10px;
  margin-top: 10px;
  padding-bottom: 5px;
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 5px;
  width: max-content;
}

#dem {
  display: block;
  height: 0;
  overflow: hidden;
  transition: .3s all;
}

.in-county-mode #dem {
  background: #f1f1f1;
  border: 1px solid #ccc;
  cursor: pointer;
  display: block;
  height: auto;
  margin-bottom: 10px;
  margin-top: 10px;
  padding-bottom: 5px;
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 5px;
  width: max-content;
}

#cloro:hover, #dem:hover {
  background: #1b8bf7;
  color: white;
}

.counties {
  position: relative;
  z-index: 1;
}

.in-county-mode .counties {
  z-index: 2;
}

#HoverDistrict, #HoverCounty {
  font-size: 18px;
  font-weight: bold;
  transition: .3s all;
}

.in-county-mode #HoverDistrict, .in-county-mode .district-label {
  display: none;
}

#HoverDistrict, .district-label {
  display: inline;
}

.in-county-mode #HoverCounty, .in-county-mode .county-label {
  display: inline;
}

#HoverCounty, .county-label {
  display: none;
}

.districtmode {
  color: black;
  font-weight: bold;
  margin-bottom: 5px;
}

.in-county-mode .districtmode {
  display: none;
}

.in-county-mode .countymode {
  color: black;
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.countymode {
  display: none;
}

#gotostate {
  display: block;
  margin-bottom: 18px;
}

#select-container select {
  -moz-appearance: none !important;
  -webkit-appearance: none !important;
  appearance: none;
  border: 1px solid #0a5395;
  color: #ccc;
  display: -webkit-box;
  font-size: 14px;
  height: 40px;
  margin: 0 !important;
  padding: 10px !important;
  width: 100% !important;
}

#select-container select option {
  color: black;
}

#select-container::after {
  background-color: #fff;
  background-image: url("/themes/custom/cookpolitical/images/down-blue.svg");
  background-repeat: no-repeat;
  background-size: contain;
  bottom: 5px;
  color: #fff;
  content: "";
  font-size: 40px;
  height: 22px;
  pointer-events: none;
  position: absolute;
  right: 14px;
  width: 15px;
  z-index: 5;
}

path#land {
  stroke: black;
  stroke-width: 5px;
  display: block;
}

path {
  stroke-linejoin: round;
  stroke-linecap: round;
}

.fade-out {
  opacity: 0;
}

.individual-district {
  fill: #FFF;
  stroke: black;
  stroke-width: 1px;
  border: 0;
  cursor: pointer;
  outline: none;
  transition: all .3s;
}

path.district-boundaries {
  display: none;
}

.individual-district:hover {
  fill: rgba(440, 440, 440, .4) !important;
}

.state-boundaries {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5px;
  pointer-events: none;
}

.loading #doorman path {
  pointer-events: none;
}

path.mesh {
  display: none;
}

path.state-boundaries {
  display: none;
}

path#land {
  fill: #FFF;
  display: block;
}

#dataset1, #dataset2 {
  display: none;
}

.in-county-mode #dataset2 {
  display: block;
}

.in-county-mode.lean #dataset2 {
  display: none;
}

.in-county-mode.lean #dataset1 {
  display: block;
}

#doorman {
  align-items: center;
  border-top: 1px solid #ccc;
  display: flex;
  flex-basis: 100%;
  justify-content: center;
  margin-top: 25px;
  min-height: 600px;
  opacity: 0;
  padding-top: 21px;
  transition: opacity;
  transition-duration: 1s;
  width: 100%;
}

#doorman path {
  fill: #CCC;
  stroke: #FFF;
  stroke-width: 1px;
}

#land {
  pointer-events: none;
}

.greenmap #doorman path[data-seatchange="None"] {
  fill: whitesmoke;
  pointer-events: none;
}

.greenmap #doorman path[data-published="Click state to learn more"]:hover {
  cursor: pointer;
  opacity: 1;
}

.greenmap #doorman path[data-state="inactive"]:hover {
  pointer-events: none;
}
.greenmap #doorman [data-seatchange="-1"], .greenmap #doorman [data-seatchange="-2"], .greenmap #doorman [data-seatchange="-3"] {
  opacity: .8;
  fill: #F5F5DC;
}

#doorman [data-seatchange="0"] {
  fill: #8abaae;
  opacity: .8;
}

.greenmap #doorman [data-seatchange="+1"] {
  fill: #5ca08e;
  opacity: .8;
}

.greenmap #doorman [data-seatchange="+2"] {
  fill: #2e856e;
  opacity: .8;
}

.greenmap #doorman [data-seatchange="+3"] {
  fill: #006a4e;
  opacity: .8;
}

.greenmap .d3-tip {
  transition: 0;
}

.d3-tip {
  background-color: #FFF;
  border: 1px solid #0a5395;
  box-shadow: 0 0 5px 0px #999;
  color: #000;
  display: flex;
  flex-flow: column;
  font-size: 14px;
  margin: 0 !important;
  max-width: 300px;
  min-width: 250px;
  padding: 10px !important;
  transition: top, left, right, bottom, opacity;
  transition-duration: .3s;
}

.d3-tip .tip-name {
  color: #0a5395;
  font-size: 16px;
  font-weight: bold;
  text-transform: capitalize;
}

.d3-tip .tip-label {
  font-weight: bold;
}

.d3-tip p {
  margin: 0;
}

.d3-tip .tip-desc {}

.greenmap .d3-tip .tip-desc {
  display: none;
}

.d3-tip .tip-blurb {
  color: #ccc;
  font-style: italic;
  font-weight: 300;
}

#legend-container {
  border: 1px solid #0a5395;
  flex-basis: 30%;
}

.map-body-copy {
  color: black;
  font-size: 14px;
  margin-bottom: 15px;
  max-width: 600px;
}

.map-body-copy br {
  margin-bottom: 5px;
}

#doorman-legend {
  align-items: flex-start;
  display: flex;
  flex-flow: row wrap;
  max-width: 400px;
  padding: 15px;
}

#doorman-legend.main-l {
  max-width: 800px;
}

.greenmap #doorman-legend.main-l {
  display: none !important;
}

#doorman-legend .leg-item {
  display: flex;
  flex-basis: 50%;
  margin-bottom: 5px;
}

#doorman-legend .leg-item:last-child {
  margin-bottom: 0;
}

#doorman-legend div p {
  font-size: 12px;
  margin-bottom: 0;
  margin-left: 10px;
}

#doorman-legend h2 {
  color: #000;
  flex-basis: 100%;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

#doorman-legend h2::after {
  background: black;
  content: "";
  display: block;
  height: 2px;
  margin-top: 15px;
  width: 40px;
}

.greenmap #doorman path {
  stroke: #ccc;
}

#doorman-legend .doorman-legend-box {
  display: inline-block;
  height: 20px;
  opacity: .8;
  width: 20px;
}

.zzero {
  background-color: #8abaae;
}

.zone {
  background-color: #5ca08e;
}

.ztwo {
  background-color: #2e856e;
}

.zthree {
  background-color: #006a4e;
}

.usa-map-header {
  margin-bottom: 0;
}

.main-map #doorman [data-lean="Commission"], .main-map #doorman [data-lean="Dem/Commission"], .main-map #doorman [data-lean="GOP/Commission"] {
  /* commission */
  fill: #f7ca18;
  opacity: .95;
}

.letmetrythis.main-map #doorman [data-lean="Commission"], .letmetrythis.main-map #doorman [data-lean="Dem/Commission"], .letmetrythis.main-map #doorman [data-lean="GOP/Commission"] {
  fill: rgb(95, 158, 160);
}

.main-map #doorman [data-flags="GOP"] {
  fill: url("#diagonalr") !important;
  opacity: .95;
}

.main-map #doorman [data-flags="DEM"] {
  fill: url("#diagonald") !important;
  opacity: .95;
}

.main-map #doorman [data-lean="Democrat"] {
  /* democrat */
  fill: #0a5395;
  opacity: .95;
}

.main-map #doorman [data-lean="Republican"] {
  /* republican */
  fill: #ee384c;
  opacity: .95;
}

.main-map #doorman [data-lean="Split"] {
  fill: #5E2D79;
  opacity: .95;
}

.main-map #doorman [data-lean="N/A"] {
  fill: whitesmoke;
  opacity: .95;
}

#doorman path {
  transition: .1s all;
}

.main-map #doorman path[data-published="Click state to learn more"]:hover {
  cursor: pointer;
  opacity: 1;
}

.main-map .green {
  display: none !important;
}

.green-map .main-l {
  display: none !important;
}

.d-box {
  background-color: #0a5395;
  border: 1px solid black;
  opacity: .95;
}

.r-box {
  background-color: #ee384c;
  border: 1px solid black;
  opacity: .95;
}

.c-r-cont-box {
  background-image: linear-gradient(45deg, #f7ca18 25%, #ee384c 25%, #ee384c 50%, #f7ca18 50%, #f7ca18 75%, #ee384c 75%, #ee384c 100%);
  background-size: 56.57px 56.57px;
  border: 1px solid black;
  opacity: .95;
}

.c-d-cont-box {
  background-image: linear-gradient(45deg, #f7ca18 25%, #0a5395 25%, #0a5395 50%, #f7ca18 50%, #f7ca18 75%, #0a5395 75%, #0a5395 100%);
  background-size: 56.57px 56.57px;
  border: 1px solid black;
  opacity: .95;
}

.c-box {
  background-color: #f7ca18;
  border: 1px solid black;
  opacity: .95;
}

.s-box {
  background-color: #5E2D79;
  border: 1px solid black;
  opacity: .95;
}

.n-box {
  background-color: whitesmoke;
  border: 1px solid black;
  opacity: .95;
}

.switcher-container {
  display: inline-block;
}

.switcher, .switcher-active {
  background-color: white;
  border: 1px solid #ccc;
  cursor: pointer;
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  margin-top: 10px;
  padding-bottom: 5px;
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 5px;
  transition: color, background-color;
  transition-duration: .3s;
  width: max-content;
}

.switcher:hover, .switcher-active:hover, .greenmap .switcher, .only-active .switcher-active {
  background: #0a5395;
  color: white;
}

.usa-map-subheader {
  color: #0a5395;
  margin-bottom: 0;
}

.title-box {
  flex-basis: 70%;
}

.loading .usa-loading-animation {
  align-items: center;
  display: flex;
  height: 80%;
  justify-content: center;
  opacity: 100;
  pointer-events: none;
  position: absolute;
  transition: opacity;
  transition-duration: 1s;
  width: 100%;
  z-index: 4;
}

.loading .usa-loading-animation img {
  width: 40px;
}

.usa-loading-animation {
  display: none;
}

.redistricting-alert {
  background: #1b8bf7;
  color: #FFF;
  padding: 10px 20px;
  transition: .3s all;
  width: calc(100%);
}

.redistricting-alert.closed {
  height: 0;
  padding: 0;
}

.redistricting-alert .alert-box {
  align-items: center;
  display: flex;
  margin-left: auto;
  margin-right: auto;
  max-width: 1240px;
  width: 100%;
}

.redistricting-alert .alert-box div:first-child {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: space-between;
}

.redistricting-alert p {
  display: flex;
  font-family: georgia;
  font-size: 14px;
  font-style: italic;
  font-weight: lighter;
  margin: 0;
}

.redistricting-alert a {
  align-items: center;
  all: unset;
  color: #FFF;
  cursor: pointer;
  display: flex;
  justify-content: center;
  padding: 5px;
  text-decoration: underline;
  transition: all .3s ease-in;
}

.redistricting-alert a:hover {
  opacity: .8;
}

.redistricting-alert .alert-box div:first-child p::before {
  background-image: url("/themes/custom/cookpolitical/images/bell.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 25px 25px;
  content: "";
  display: inline-block;
  font-size: 0;
  height: 20px;
  margin-right: 15px;
  text-decoration: none !important;
  transition: .3s all ease-in;
  transition: .3s all;
  width: 20px;
}

.only-active #doorman path[data-state="inactive"] {
  fill: whitesmoke !important;
  pointer-events: none !important;
}

#table-container-usa {
  border-top: 1px solid #ccc;
  flex-basis: 100%;
  height: 600px;
  margin-top: 10px;
  overflow: scroll;
}

#table-container-usa>div {
  border: 1px solid #ccc;
  height: 920px;
  overflow: scroll;
  width: 100%;
}

#table-container-usa p {
  display: none;
}

#table-container-usa table {
  border-collapse: unset;
  height: 900px;
  margin: 0;
  overflow: scroll;
  padding: 0;
  position: relative;
  width: 100%;
  width: auto;
}

#table-container-usa table thead {
  border: none;
  font-family: 'proxima-nova';
  font-size: initial;
  height: auto;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  table-layout: auto;
  text-align: initial;
  width: auto;
}

#table-container-usa table thead>tr {
  font-weight: bold;
  position: relative;
  top: 0;
  z-index: 5;
}

#table-container-usa table thead td, #table-container-usa table thead tr {
  border: none;
}

#table-container-usa table tbody {
  font-family: 'proxima-nova';
  font-size: initial;
  height: 400px;
  height: auto;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  overflow: auto;
  table-layout: auto;
  text-align: center;
  text-align: initial;
  width: auto;
}

#table-container-usa table tbody tr {
  background-color: #fff;
}

#table-container-usa table tbody tr:hover td {
  background-color: #f9f9f9;
}

#table-container-usa table td {
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  border-left: 0;
  border-right: 1px solid transparent;
  font-size: 14px;
  font-weight: inherit;
  height: 50px;
  padding: 5px;
}
#table-container-usa table td:nth-child(3) {
    font-weight: bold;
}



#table-container-usa tr:first-child td {
  background-color: #ececec;
  border-bottom: 1px solid white;
  border-left: 0;
  border-right: solid 1px #fff;
  border-top: 0;
  color: #000;
  font-size: 0;
  font-weight: inherit;
  height: 50px;
  padding: 0;
  padding: 5px;
  position: sticky;
  top: 0;
  z-index: 6;
}
#table-container-usa table tbody tr:nth-child(2) {

}
#table-container-usa table tbody tr:nth-child(2) td {
  background-color: #FFF;
  box-shadow: 5px 0px 4px #ccc;
  border-left: 0;
  border-right: solid 1px #fff;
  border-top: 0;
  color: #000;
  height: 50px;
  padding: 0;
  padding: 5px;
  position: sticky;
  top: 59px;
  z-index: 5;
}
#table-container-usa table tbody tr:nth-child(2) td:nth-child(3)::before{
  background-image: url("/modules/custom/popularvotetracker/meta/flag.svg");
background-size: cover;
content: "";
display: flex;
height: 20px;
left: 45px;
position: absolute;
width: 20px;
}

#table-container-usa tr:first-child td::before {
  font-size: 16px;
  font-weight: bold
}
#table-container-usa table td:first-child {
  display: none;
}
#table-container-usa td:nth-child(2) {
  display: none;
}
#table-container-usa tr:first-child td:nth-child(3)::before {
  content: "State"
}
#table-container-usa table td:nth-child(4) {
  display: none;
}
#table-container-usa tr:first-child td:nth-child(5)::before {
  content: "Projected # Seats"
}
#table-container-usa tr:first-child td:nth-child(6)::before {
  content: "Projected Change in Seats"
}
#table-container-usa tr:first-child td:nth-child(7)::before {
  content: "Redistricting Control Details"
}
#table-container-usa td:nth-child(7) {
  text-align: left;
}
#table-container-usa tr:first-child td:nth-child(8)::before {
  content: "Redistricting Control"
}
#table-container-usa td:nth-child(9) {
  display: none;
}
#table-container-usa td:nth-child(10) {
  display: none;
}
#table-container-usa tr:first-child td:nth-child(11)::before {
  content: "Est. Dem Change"
}
#table-container-usa tr:first-child td:nth-child(12)::before {
  content: "Est. GOP Change"
}
.scorecard {
  flex-flow: column;
  padding: 40px;
}
