/* Everybody Votes (js/host/votes/). Sized from the game's picture (--sw). */

#s-votes {
  font-size: calc(var(--sw) * 0.0118);
}

/* what shows when (the section's data-state) */
.ev-titlecard,
.ev-results,
.ev-qcard,
.ev-opt,
.ev-prompt,
.ev-banner,
.ev-bar,
.ev-actions {
  display: none;
}
#s-votes[data-state='title'] .ev-titlecard,
#s-votes[data-state='results'] .ev-results {
  display: flex;
}
#s-votes:is([data-state='vote'], [data-state='predict'], [data-state='reveal'], [data-state='revealed']) :is(.ev-qcard, .ev-opt, .ev-prompt, .ev-banner, .ev-bar, .ev-actions) {
  display: flex;
}
.ev-skip,
.ev-next {
  display: none;
}
#s-votes:is([data-state='vote'], [data-state='predict']) .ev-skip,
#s-votes[data-state='revealed'] .ev-next {
  display: inline-block;
}

.ev-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ev-tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  min-width: 2.2em;
  padding: 0.25em 0.75em 0.3em;
  border-radius: 999px;
  background: #fff;
  border: 0.16em solid var(--pc);
  box-shadow: 0 0.2em 0.6em rgba(30, 45, 65, 0.22);
  font-size: 1.25em;
  font-weight: 900;
  color: #4a5058;
  text-align: center;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.ev-tag.hide {
  opacity: 0;
}
.ev-tag.waiting {
  color: #a3aab2;
  animation: pulse 1.4s ease-in-out infinite;
}
.ev-tag.done {
  background: #22a776;
  border-color: #fff;
  color: #fff;
  animation: ev-pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.ev-tag.right {
  background: #ffd21f;
  border-color: #fff;
  color: #6b4a00;
  animation: ev-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.ev-tag.wrong {
  color: #b0b7bf;
}
@keyframes ev-pop {
  from {
    transform: translate(-50%, -100%) scale(0.5);
  }
}

/* the cards (title, results) */
.ev-card {
  position: absolute;
  left: 4%;
  top: 8%;
  width: 47%;
  padding: 1.6em 2.2em 1.8em;
  border-radius: 1.8em;
  background: rgba(255, 255, 255, 0.95);
  border: 0.2em solid #dfe4ea;
  box-shadow: var(--shadow);
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ev-logo {
  font-size: 3.4em;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 0.09em #3a4a5c;
  paint-order: stroke fill;
  text-shadow: 0 0.06em 0 #3a4a5c;
  line-height: 1.1;
}
.ev-logo b {
  color: #ffd76a;
}
.ev-logo.small {
  font-size: 1.8em;
}
.ev-card p {
  margin: 0.6em 0 0;
  font-size: 1.15em;
  font-weight: 700;
  color: #5f666f;
  line-height: 1.45;
}
.ev-card .ev-need {
  color: #b5541c;
}
.ev-card .ev-need[hidden] {
  display: none;
}
.ev-count-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1em;
  font-weight: 900;
  color: #6b737c;
}
.wbtn.ev-chip {
  padding: 0.35em 1.2em;
  border-radius: 999px;
  font-size: 1em;
}
.wbtn.ev-chip.on {
  border-color: #22a776;
  color: #157f59;
  background: linear-gradient(180deg, #ffffff, #e2f7ef);
}
.ev-buttons {
  display: flex;
  gap: 1em;
  margin-top: 1.3em;
}

/* a question */
.ev-qcard {
  position: absolute;
  left: 50%;
  top: 3.5%;
  transform: translateX(-50%);
  width: 62%;
  padding: 0.7em 1.4em 0.85em;
  border-radius: 1.4em;
  background: #fff;
  border: 0.18em solid #dfe4ea;
  box-shadow: var(--shadow);
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ev-qnum {
  font-size: 0.9em;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ev-qtext {
  margin-top: 0.1em;
  font-size: 2.3em;
  font-weight: 900;
  color: #3b4049;
  line-height: 1.15;
}
.wbtn.ev-opt {
  position: absolute;
  top: 20%;
  width: 30%;
  min-height: 19%;
  padding: 0.8em 1em 0.9em;
  border-radius: 1.5em;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  color: #fff;
  transition: transform 0.25s, opacity 0.3s, box-shadow 0.3s, filter 0.3s;
}
.wbtn.ev-opt.a {
  left: 3%;
  border-color: #1f78c4;
  background: linear-gradient(180deg, #7cc7f7 0%, #3d9be9 48%, #2b8ad9 52%, #227ccb 100%);
}
.wbtn.ev-opt.b {
  right: 3%;
  border-color: #c96a10;
  background: linear-gradient(180deg, #ffc57a 0%, #f6a23c 48%, #f0911f 52%, #e5850f 100%);
}
.ev-opt i {
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  font-style: normal;
  font-weight: 900;
  font-size: 1em;
  line-height: 1.9em;
}
.ev-opt.a i {
  color: #2b8ad9;
}
.ev-opt.b i {
  color: #e5850f;
}
.ev-opt b {
  font-size: 2.1em;
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 0 0.06em 0.1em rgba(0, 0, 0, 0.25);
}
.ev-faces {
  display: flex;
  gap: 0.3em;
  min-height: 0;
}
.ev-faces img {
  width: 3em;
  height: 3em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 0.16em solid var(--pc);
  animation: ev-pop-in 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.ev-faces img:nth-child(2) {
  animation-delay: 0.08s;
}
.ev-faces img:nth-child(3) {
  animation-delay: 0.16s;
}
.ev-faces img:nth-child(4) {
  animation-delay: 0.24s;
}
@keyframes ev-pop-in {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
}
.ev-opt em {
  font-style: normal;
  font-size: 0.95em;
  font-weight: 800;
  opacity: 0.92;
}
.ev-opt em:empty {
  display: none;
}
.wbtn.ev-opt.won {
  transform: scale(1.06);
  box-shadow: 0 0 0 0.3em rgba(255, 215, 80, 0.85), 0 0.6em 1.6em rgba(0, 0, 0, 0.25);
}
.wbtn.ev-opt.lost {
  filter: saturate(0.5) brightness(0.95);
  opacity: 0.85;
}
.wbtn.ev-opt.focused {
  box-shadow: 0 0 0 0.25em rgba(255, 255, 255, 0.9), 0 0.6em 1.4em rgba(0, 0, 0, 0.25);
}

.ev-prompt {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  max-width: 34%;
  justify-content: center;
  text-align: center;
  font-size: 1.45em;
  font-weight: 900;
  color: #4a5058;
  text-shadow: 0 0.06em 0 #fff, 0 0 0.5em #fff;
}
.ev-prompt {
  flex-direction: column;
  align-items: center;
}
.ev-prompt small {
  margin-top: 0.3em;
  font-size: 0.62em;
  font-weight: 800;
  color: #7a818a;
}
.ev-banner {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%) scale(0.6);
  padding: 0.3em 1.2em 0.4em;
  border-radius: 999px;
  background: #fff;
  border: 0.18em solid #ffd21f;
  box-shadow: 0 0.4em 1.2em rgba(0, 0, 0, 0.2);
  font-size: 2.1em;
  font-weight: 900;
  color: #3b4049;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 1.5, 0.4, 1);
  pointer-events: none;
}
.ev-banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.ev-banner.a {
  border-color: #3d9be9;
  color: #1f6fb8;
}
.ev-banner.b {
  border-color: #f39a2c;
  color: #b8600c;
}

/* everyone who's ever answered, on this TV */
.ev-bar {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 12.5%;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  opacity: 0;
  transform: translateY(30%);
  transition: opacity 0.3s, transform 0.4s;
}
.ev-bar.show {
  opacity: 1;
  transform: none;
}
.ev-bar-label {
  font-size: 0.95em;
  font-weight: 900;
  color: #5f666f;
  text-shadow: 0 0.05em 0 #fff;
}
.ev-bar-track {
  display: flex;
  width: 100%;
  height: 2.2em;
  border-radius: 999px;
  overflow: hidden;
  background: #e3e7eb;
  border: 0.16em solid #fff;
  box-shadow: 0 0.2em 0.6em rgba(30, 45, 65, 0.2);
}
.ev-bar-track i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  font-style: normal;
  font-weight: 900;
  color: #fff;
  font-size: 1em;
  transition: width 1s cubic-bezier(0.25, 0.8, 0.3, 1);
  white-space: nowrap;
  overflow: hidden;
}
.ev-bar-track .a {
  background: linear-gradient(180deg, #6ab8f2, #2b8ad9);
}
.ev-bar-track .b {
  background: linear-gradient(180deg, #ffbe6b, #ec8a15);
}

.ev-actions {
  position: absolute;
  left: 2.4%;
  right: 2.4%;
  bottom: 3.2%;
  justify-content: space-between;
  align-items: center;
}
.ev-actions .ev-goon {
  margin-left: auto;
  margin-right: 1em;
}
.ev-actions .ev-goon + .ev-skip {
  margin-left: 0;
}
.ev-actions .ev-skip {
  margin-left: auto;
}

/* the results */
.ev-results h2 {
  margin: 0.3em 0 0.6em;
  font-size: 2.2em;
  font-weight: 900;
  color: #3b4049;
}
.ev-res-list {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  width: 100%;
}
.ev-res-row {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.35em 1em 0.35em 0.35em;
  border-radius: 999px;
  background: #f3f6f9;
  border: 0.15em solid #e2e7ec;
  font-weight: 900;
  font-size: 1.15em;
}
.ev-res-row.first {
  background: #fff7d6;
  border-color: #f0c419;
}
.ev-res-row img {
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: #fff;
  border: 0.15em solid var(--pc);
}
.ev-res-name {
  flex: 1;
  text-align: left;
}
.ev-res-score {
  color: #6b737c;
  font-size: 0.85em;
}
.ev-results .ev-res-alike {
  margin-top: 0.9em;
  font-weight: 800;
  color: #4a5058;
}
.ev-results .ev-res-alike[hidden] {
  display: none;
}
