/************

Election/Sandbox design:
- buttons to the left
- caption to the right

************/

#left,
#center,
#right {
  float: left;
  height: 320px;
}
body {
  overflow-x: hidden;
}
#left {
  width: 220px;
  padding-right: 20px;
}
#center {
  width: 320px;
}
#right {
  width: 220px;
  padding-left: 20px;
  overflow-x: hidden;
  overflow-y: auto;
}
#caption {
  text-align: left;
  font-size: 23px;
  line-height: 1em;
}
#caption .small {
  font-size: 15px;
  line-height: 1em;
}

#right img {
  height: 1em;
  position: relative;
  top: 2px;
}

.button-group {
  overflow: hidden;
  margin-bottom: 10px;
}
.button-group-label {
  font-weight: bold;
  font-size: 19px;
  margin-bottom: 5px;
  line-height: 1.1em;
}
.button {
  float: left;
  cursor: pointer;
  background: #bbb;
  color: #555;
  font-size: 18px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 5px;
  padding: 2px 0;

  position: relative;
  top: 0;

  -webkit-transition: all 0.1s;
  -moz-transition: all 0.1s;
  -o-transition: all 0.1s;
  transition: all 0.1s;
}
.button:hover {
  background: #ddd;
}
.button:active {
  background: #aaa;
}
.button[on="yes"] {
  background: #333;
  color: #fff;
}
.button[on="yes"]:hover {
  background: #555;
}
.button[on="yes"]:active {
  background: #111;
}

::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 7px;
}
::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

#ohno {
  font-size: 2em;
  position: relative;
  top: 10px;
}

/* Row of seats won (results), shown above the round-by-round count */
#caption .seats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin: 6px 0 12px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #ddd;
  line-height: 1.6em;
}
#caption .seats img {
  height: 30px;
  width: 30px;
  top: 0;
  margin: 0;
}
#caption .seats .cdot,
#caption .seats .cicon {
  width: 30px;
  height: 30px;
  margin: 0;
}

/* Proportional seat bar (Party List) */
#caption .seatbar {
  display: flex;
  width: 100%;
  height: 26px;
  margin-top: 12px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
#caption .seats .seatbar {
  flex-basis: 100%;
  margin: 5px 0 0 0;
}
#caption .partylist-result .seatbar:first-child {
  margin-top: 0;
}
#caption .seatbar span {
  display: block;
  height: 100%;
}
#caption .pl-seat-counts {
  column-count: 2;
  column-gap: 10px;
  margin-top: 2px;
}
#caption .pl-seat-count {
  break-inside: avoid;
  line-height: 1.25em;
  white-space: nowrap;
}
#caption .spav-round {
  margin-bottom: 10px;
}
#caption .spav-scores {
  margin-top: 4px;
}
#caption .spav-score-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 44px;
  gap: 4px;
  align-items: center;
  min-height: 18px;
  box-sizing: border-box;
}
body.wide-results #caption .spav-score-row {
  grid-template-columns: 22px minmax(0, 1fr) 58px;
  gap: 6px;
}
body.wide-results #caption .spav-score-bar {
  height: 10px;
}
body.wide-results #caption .spav-round {
  margin-bottom: 12px;
}
#caption .spav-score-row.winning {
  font-weight: bold;
}
#caption .spav-score-icon {
  line-height: 1;
}
#caption .spav-score-bar {
  display: block;
  height: 8px;
  background: #e1e1e1;
  border-radius: 2px;
  overflow: hidden;
}
#caption .spav-score-bar span {
  display: block;
  height: 100%;
}
#caption .spav-score-num {
  text-align: right;
  white-space: nowrap;
}
#caption .spav-note,
#caption .spav-more {
  color: #666;
  font-size: 13px;
  line-height: 1.1em;
  margin-top: 3px;
}
#caption .stv-sankey {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid #ddd;
}
#caption .stv-sankey-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 6px;
}
#caption .stv-flow-step {
  display: grid;
  grid-template-columns: 112px 170px 86px;
  gap: 4px;
  align-items: center;
  margin-bottom: 8px;
}
#caption .stv-flow-from {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  color: #555;
  font-size: 12px;
  line-height: 1.05em;
}
#caption .stv-flow-from img,
#caption .stv-flow-from .cicon {
  width: 22px;
  height: 22px;
}
#caption .stv-flow-svg {
  display: block;
  width: 170px;
  overflow: visible;
}
#caption .stv-flow-svg path {
  fill: none;
  stroke-linecap: round;
  opacity: 0.7;
}
#caption .stv-flow-to {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
#caption .stv-flow-target {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 20px;
  font-size: 13px;
}
#caption .stv-flow-target img,
#caption .stv-flow-target .cicon {
  width: 20px;
  height: 20px;
}
#caption .stv-seat,
#caption .stv-exhausted {
  display: inline-flex;
  width: 22px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: #fff;
  background: #999;
  font-size: 9px;
  font-weight: bold;
  line-height: 1;
}
#caption .stv-exhausted {
  background: #bbb;
  color: #555;
}

/* Coloured dot / SVG shape for generated candidates (instead of a hand-drawn icon) */
.cdot {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  vertical-align: middle;
  position: relative;
  top: -1px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.cicon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
