/* The ballot's own look (block B3, from the mockup v4 without its sliders and score bars): the top row, the three
   columns on a computer - places, teams, the selected team's card -, the phone's strip, tabs, bar and sheet, the
   save status and the screens after a send. The colours come from the tokens of /static/shared/base.css. */
.jv-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jv-banner { margin: 0; min-height: 42px; padding: 10px 16px; background: var(--jv-gold-soft); color: var(--jv-gold-ink); font-size: 15px;
  font-weight: 600; text-align: center; }

/* ------------------------------------------------------------------ the frame and the top row */
.jv-ballot { display: flex; flex-direction: column; gap: 18px; padding: 24px 28px; }
.jv-desk .jv-ballot { height: 100vh; min-height: 640px; }
.jv-banner ~ .jv-desk .jv-ballot { height: calc(100vh - 42px); }
.jv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.jv-q h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; margin: 6px 0; }
.jv-q p { margin: 0; font-size: 16px; color: var(--jv-ink2); }
.jv-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 420px; }
/* the round's bar (REQ-11): the state, and while the vote is open the time left, largest at its right end */
.jv-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'label time' 'sub time';
  align-items: center; column-gap: 16px; border-radius: 18px; padding: 12px 20px; background: var(--jv-mist);
  color: var(--jv-ink); }
.jv-bar p { margin: 0; }
.jv-bar1 { display: contents; }
.jv-bar-label { grid-area: label; font-size: 18px; font-weight: 800; line-height: 1.25; }
.jv-bar-time { grid-area: time; font-size: 30px; font-weight: 800; line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.jv-bar-time small { font-size: 16px; font-weight: 700; }
.jv-bar2 { grid-area: sub; font-size: 14px; margin-top: 2px; opacity: .85; }
.jv-bar.jv-live { background: var(--jv-ok-soft); color: var(--jv-ok-ink); }
.jv-bar.jv-live .jv-bar-label::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #1F9D60; margin-right: 8px; vertical-align: 2px; }
.jv-bar.jv-alert { background: #FDE8E6; color: #8C1D13; }
.jv-bar.jv-alert .jv-bar-label::before { background: #C4291C; }
.jv-bar.jv-practice { background: var(--jv-gold-soft); color: #5C4100; }
.jv-bar.jv-shut { background: var(--jv-off); color: var(--jv-off-ink); }
.jv-prelim { font-size: 13px; font-weight: 600; color: var(--jv-warn-ink); background: var(--jv-warn-soft);
  border-radius: 999px; padding: 4px 12px; }

/* the save status: one state, shown in each place */
.jv-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--jv-ink3);
  min-height: 24px; }
.jv-save.jv-amber { background: var(--jv-warn-soft); color: var(--jv-warn-ink); border-radius: 12px; padding: 6px 12px;
  font-weight: 600; }
.jv-save .jv-link { font-size: 13px; color: var(--jv-warn-ink); min-height: 32px; }

/* ------------------------------------------------------------------ the three columns */
.jv-cols { flex: 1; min-height: 0; display: grid; gap: 20px;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.35fr) minmax(320px, 1.15fr); }
.jv-col { min-height: 0; display: flex; flex-direction: column; background: var(--jv-mist); border-radius: 24px;
  padding: 18px; }
.jv-col h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; display: flex; justify-content: space-between;
  align-items: baseline; gap: 8px; }
.jv-col h2 span { font-weight: 500; color: var(--jv-ink3); font-size: 13px; }

/* the places 1 to N */
.jv-rank { list-style: none; margin: 0; padding: 2px; display: flex; flex-direction: column; gap: 6px; overflow: auto;
  min-height: 0; flex: 1; }
.jv-slot { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; border-radius: 14px;
  padding: 6px 8px 6px 6px; background: #fff; border: 1.5px solid transparent; }
.jv-slot[draggable='true'] { cursor: grab; }
.jv-slot.jv-empty { background: transparent; border: 1.5px dashed #9EA3B3; color: var(--jv-ink3); }
.jv-slot.jv-empty.jv-next { border-color: var(--jv-act); color: var(--jv-act); background: #fff; }
.jv-slot.jv-drop-before::before, .jv-slot.jv-drop-after::after { content: ''; position: absolute; left: 6px; right: 6px;
  height: 4px; border-radius: 2px; background: var(--jv-act); }
.jv-slot.jv-drop-before::before { top: -5px; }
.jv-slot.jv-drop-after::after { bottom: -5px; }
.jv-slot.jv-over { border-color: var(--jv-act); background: var(--jv-act-soft); }
.jv-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  font-size: 15px; background: var(--jv-mist); color: var(--jv-ink2); }
.jv-slot[data-i='0'] .jv-num, .jv-pod:nth-child(1) .jv-num { background: var(--jv-gold); color: var(--jv-gold-ink); }
.jv-slot[data-i='1'] .jv-num, .jv-pod:nth-child(2) .jv-num { background: var(--jv-silver); color: #fff; }
.jv-slot[data-i='2'] .jv-num, .jv-pod:nth-child(3) .jv-num { background: var(--jv-bronze); color: #fff; }
.jv-slot[data-i='0']:not(.jv-empty), .jv-pod:nth-child(1) { background: var(--jv-gold-soft); }
.jv-slot[data-i='1']:not(.jv-empty), .jv-pod:nth-child(2) { background: var(--jv-silver-soft); }
.jv-slot[data-i='2']:not(.jv-empty), .jv-pod:nth-child(3) { background: var(--jv-bronze-soft); }
.jv-slot-main { flex: 1; min-width: 0; }
.jv-slot-t { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.jv-slot-a { display: block; font-size: 13px; color: var(--jv-ink2); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.jv-pts { flex: none; font-size: 12px; font-weight: 700; color: var(--jv-ink2); }
.jv-tools { flex: none; display: flex; gap: 2px; }
.jv-ico { width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--jv-ink2);
  display: grid; place-items: center; padding: 0; }
.jv-ico:hover { background: rgba(20, 27, 52, .07); }
.jv-ico[disabled] { opacity: .3; cursor: default; }
.jv-cut { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--jv-ink3);
  margin: 6px 2px; }
.jv-cut::before, .jv-cut::after { content: ''; flex: 1; border-top: 1.5px dashed #9EA3B3; }
.jv-send { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.jv-send .jv-pill, .jv-mbar .jv-pill { width: 100%; }
.jv-send small, .jv-mbar small { font-size: 13px; color: var(--jv-ink3); text-align: center; line-height: 1.4; }

/* the team tiles */
.jv-teams { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: max-content; gap: 10px; overflow: auto;
  min-height: 0; flex: 1; align-content: start; padding: 2px; }
.jv-tc { position: relative; text-align: left; border: 1.5px solid transparent; background: #fff; border-radius: 18px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 104px; cursor: pointer;
  line-height: 1.3; transition: border-color .15s, box-shadow .15s; }
.jv-tc[draggable='true'] { cursor: grab; }
.jv-tc:hover { box-shadow: 0 4px 16px rgba(20, 27, 52, .08); }
.jv-tc.jv-sel { border-color: var(--jv-act); box-shadow: 0 0 0 3px var(--jv-act-soft); }
.jv-tc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.jv-order { font-size: 12px; font-weight: 700; color: var(--jv-ink3); }
.jv-chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--jv-mist);
  color: var(--jv-ink2); white-space: nowrap; }
.jv-tc .jv-chip { background: var(--jv-mist); }
.jv-chip.jv-c1 { background: var(--jv-gold); color: var(--jv-gold-ink); }
.jv-chip.jv-c2 { background: var(--jv-silver); color: #fff; }
.jv-chip.jv-c3 { background: var(--jv-bronze); color: #fff; }
.jv-tc-t { font-weight: 700; font-size: 16px; line-height: 1.2; }
.jv-tc-a { font-size: 14px; color: var(--jv-ink2); }
.jv-dragging { opacity: .45; }

/* the selected team's card */
.jv-card { overflow: auto; min-height: 0; flex: 1; background: #fff; border-radius: 18px; padding: 16px 18px; }
.jv-card h3 { font-size: 22px; line-height: 1.15; letter-spacing: -.01em; font-weight: 800; margin: 6px 0 2px; }
.jv-agent { font-size: 15px; font-weight: 600; color: var(--jv-ink2); margin: 0 0 10px; }
.jv-what { font-size: 15px; line-height: 1.45; margin: 0 0 12px; }
.jv-who { font-size: 14px; line-height: 1.45; color: var(--jv-ink2); margin: 10px 0 0; }
.jv-who b { color: var(--jv-ink); }
.jv-place-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.jv-place-row span { flex-basis: 100%; font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.jv-pbtn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #7F8597; background: #fff; font-weight: 700;
  color: var(--jv-ink); padding: 0; }
.jv-pbtn:hover { border-color: var(--jv-act); color: var(--jv-act); }
.jv-pbtn.jv-on { background: var(--jv-act); border-color: var(--jv-act); color: #fff; }
.jv-take { font-size: 14px; margin: 2px 0 4px; min-height: 32px; }

/* ------------------------------------------------------------------ the phone */
.jv-phone .jv-ballot { padding: 16px 16px calc(132px + env(safe-area-inset-bottom)); gap: 12px; }
.jv-phone .jv-top { flex-direction: column; gap: 10px; }
.jv-phone .jv-q h1 { font-size: 26px; }
.jv-phone .jv-q p { font-size: 15px; }
.jv-phone .jv-side { align-items: flex-start; text-align: left; max-width: none; }
.jv-phone .jv-bar { padding: 8px 12px; border-radius: 14px; margin-bottom: 8px; column-gap: 10px; }
.jv-phone .jv-bar-label { font-size: 15px; }
.jv-phone .jv-bar-time { font-size: 23px; }
.jv-phone .jv-bar-time small { font-size: 13px; }
.jv-phone .jv-bar2 { font-size: 12px; }
.jv-stick { position: sticky; top: 0; z-index: 5; background: #fff; margin: 0 -16px; padding: 8px 16px 6px;
  box-shadow: 0 6px 12px -10px rgba(20, 27, 52, .25); }
.jv-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.jv-strip div { border-radius: 12px; padding: 6px 8px; font-size: 13px; line-height: 1.25; min-height: 44px; }
.jv-strip div b { display: block; font-size: 12px; }
.jv-strip div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jv-strip div:nth-child(1) { background: var(--jv-gold-soft); }
.jv-strip div:nth-child(2) { background: var(--jv-silver-soft); }
.jv-strip div:nth-child(3) { background: var(--jv-bronze-soft); }
.jv-strip .jv-dash { color: var(--jv-ink3); }
.jv-stick .jv-save { margin-top: 6px; }
.jv-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--jv-mist); border-radius: 999px; padding: 4px; }
.jv-tabs button { border: 0; background: transparent; border-radius: 999px; min-height: 44px; font-weight: 700;
  color: var(--jv-ink2); }
.jv-tabs button.jv-on { background: #fff; color: var(--jv-ink); box-shadow: 0 1px 3px rgba(20, 27, 52, .12); }
.jv-mlist { display: flex; flex-direction: column; gap: 10px; }
.jv-mlist .jv-tc { min-height: 0; border-color: var(--jv-line); }
.jv-phone .jv-rank { overflow: visible; }
.jv-phone .jv-ico { width: 44px; height: 44px; }
.jv-phone .jv-tools { gap: 0; }
.jv-phone .jv-slot { padding-right: 2px; gap: 8px; }
.jv-phone .jv-slot:not(.jv-empty) .jv-pts { display: none; }
.jv-phone .jv-slot[data-i='0'] .jv-slot-a::before { content: '3 points - '; font-weight: 700; }
.jv-phone .jv-slot[data-i='1'] .jv-slot-a::before { content: '2 points - '; font-weight: 700; }
.jv-phone .jv-slot[data-i='2'] .jv-slot-a::before { content: '1 point - '; font-weight: 700; }
.jv-phone .jv-pbtn { width: 44px; height: 44px; }
.jv-phone .jv-take { min-height: 44px; }
.jv-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(20, 27, 52, .10); }
.jv-mbar small { display: block; margin-top: 6px; }
.jv-sheet { position: fixed; inset: 0; z-index: 40; background: rgba(20, 27, 52, .45); display: flex;
  align-items: flex-end; cursor: pointer; }
.jv-sheet-open.jv-send-off .jv-mbar { display: none; }
.jv-sheet-open.jv-send-off .jv-sheet-in { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.jv-sheet-in { cursor: auto; width: 100%; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overflow-x: hidden; background: #fff;
  border-radius: 24px 24px 0 0; padding: 6px 18px calc(124px + env(safe-area-inset-bottom)); }
.jv-sheet-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  background: #fff; padding-top: 4px; }
.jv-grab { width: 44px; height: 5px; border-radius: 3px; background: #C9CCD8; }
.jv-close { position: absolute; right: -6px; top: 0; }
.jv-sheet .jv-card { padding: 0; border-radius: 0; overflow: visible; }
.jv-save-sheet { margin: 4px 0 8px; }
body.jv-still { overflow: hidden; }

/* ------------------------------------------------------------------ after a send, and after the close */
.jv-done { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh;
  padding: 24px 16px; text-align: center; }
.jv-done h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; margin: 18px 0 10px; }
.jv-done p { font-size: 17px; line-height: 1.5; color: var(--jv-ink2); margin: 0 auto 22px; max-width: 560px; }
.jv-done .jv-msg { max-width: 560px; text-align: left; }
.jv-tick { width: 84px; height: 84px; border-radius: 50%; background: var(--jv-ok-soft); display: grid;
  place-items: center; margin-top: 26px; }
.jv-podium { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; width: min(520px, 100%);
  margin: 0 auto 26px; text-align: left; }
.jv-pod { display: flex; align-items: center; gap: 14px; border-radius: 16px; padding: 12px 16px; }
.jv-pod b { display: block; font-size: 17px; }
.jv-pod span { font-size: 14px; color: var(--jv-ink2); }
.jv-pod .jv-num { width: 40px; height: 40px; font-size: 17px; }
.jv-pod em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--jv-ink2);
  white-space: nowrap; }
.jv-acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) {
  .jv-done { justify-content: flex-start; min-height: 0; padding: 16px; }
  .jv-done h1 { font-size: 28px; }
  .jv-done p { font-size: 15px; }
  .jv-acts { flex-direction: column; align-items: stretch; width: 100%; }
}
