/* ADR Prompter Chase in Chrome: DESIGN.md's tokens, both looks (the
   computer's own choice: the page keeps nothing to remember one by). */
:root {
  color-scheme: dark;
  --bg: #15161A; --panel: #1C1E23; --raised: #262930; --hover: #383D47; --raised2: #30343C; --raised3: #3A3F48;
  --line: #2E323A; --text: #E9EAEC; --text2: #9BA1AB; --text3: #5F6570; --head: #7D848F;
  --accent: #5B9BFF; --accentbg: #22385C; --rec: #FF4D4D; --play: #3DD68C; --warn: #FFB547; --bad: #E5484D;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #E3E5E4; --panel: #D7DAD9; --raised: #F1F2F2; --hover: #F8F8F8; --raised2: #EAECEB; --raised3: #C9CDCD;
    --line: #C3C8C8; --text: #232728; --text2: #464C4E; --text3: #767C7D; --head: #61676F;
    --accent: #1F66D6; --accentbg: #CBDAF2; --rec: #C42338; --play: #0F7643; --warn: #9C5100; --bad: #C42828;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 28px; }
h1 { font-size: 20px; font-weight: 600; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
/* the top: the title, the code and Connect in the middle; Listen On and Talkback In at the right */
.top { display: grid; grid-template-columns: 1fr minmax(0, 520px) 1fr; gap: 16px; align-items: start; margin-bottom: 14px; }
.top .centre { grid-column: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.top .prompt { margin: 10px 0 10px; color: var(--text2); }
.top .e2e { margin: 8px 0 0; font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 5px; }
.devices { grid-column: 3; justify-self: end; display: flex; flex-direction: column; gap: 6px; width: 230px; }
.devices select { width: 100%; }
.devices .meter { width: 100%; margin-bottom: 10px; }
.devices .caps { margin-top: 2px; }
@media (max-width: 860px) {
  .top { grid-template-columns: 1fr; }
  .top .centre, .devices { grid-column: 1; }
  .devices { justify-self: center; width: min(320px, 100%); }
}
.status { justify-content: center; }
.status[hidden] { display: none; }
.centred { text-align: center; }
.picture-block .head { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 18px; }
.under { margin-top: 8px; }
.check { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.talk-block { display: flex; flex-direction: column; align-items: center; text-align: center; }
.talk-block .head { font-size: 14px; font-weight: 600; color: var(--text); }
.caps { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--head); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.block { margin-top: 22px; }
.block .head { margin-bottom: 8px; }
.small { font-size: 12.5px; color: var(--text2); }
.grow { flex: 1; }
.hint { color: var(--text2); font-size: 12.5px; }
.note { margin: 8px 0 0; font-size: 13px; color: var(--text2); }
.note.warn, .alert.warn { color: var(--warn); }
.note.bad, .alert.bad { color: var(--bad); }
.alert { padding: 10px 12px; border: 1px solid currentColor; border-radius: 6px; }

button, select, input { font: inherit; color: var(--text); }
button {
  background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px; cursor: pointer;
}
button:hover { background: var(--hover); }
button:active { background: var(--raised3); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { filter: brightness(1.08); }
button.icon { background: none; border: none; font-size: 17px; color: var(--text2); padding: 2px 6px; }
button.icon:hover { color: var(--text); }
button:disabled { opacity: .45; cursor: default; }
select, input {
  background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; outline: none;
}
select:focus, input:focus { border-color: var(--accent); }
input.code { font: 600 20px/1.2 var(--mono); letter-spacing: .1em; width: 22ch; text-transform: uppercase; }
input.tc { font-family: var(--mono); width: calc(11ch + 20px); }
select#output { min-width: 260px; max-width: 100%; }

.status { display: flex; align-items: center; gap: 8px; margin: 12px 0 18px; color: var(--text2); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); flex: none; }
.status.on .dot { background: var(--play); }
.status.on { color: var(--text); }
.status.wait .dot { background: var(--accent); }
.status.bad .dot { background: var(--bad); }
.status.bad { color: var(--bad); }

.meter { width: 120px; height: 6px; border-radius: 3px; background: var(--raised3); overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--play); transition: width 80ms linear; }
.meter div.hot { background: var(--warn); }

/* the talkback's latch: lit while they hear you */
button.talk { min-width: 15em; padding: 9px 16px; font-weight: 600; user-select: none; }
.hint.latch { margin: 6px 0 0; }
button.talk[aria-pressed="true"] { background: var(--rec); border-color: var(--rec); color: #fff; }
button.talk:disabled { opacity: .45; cursor: default; }

.picture {
  position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.picture:fullscreen { border: 0; border-radius: 0; }
.picture.over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.picture video { width: 100%; height: 100%; object-fit: contain; display: none; }
.picture.loaded video { display: block; }
.picture.loaded .dropWords { display: none; }
.picture canvas { width: 100%; height: 100%; object-fit: contain; display: none; }
.picture.theirs canvas { display: block; }
.picture.theirs video, .picture.theirs .dropWords { display: none; }
.dropWords { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #9BA1AB; text-align: center; padding: 16px; }
#pictureLine { margin-top: 8px; }
.fileName { color: var(--text); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 10px; }
.foot { margin: 0; color: var(--text2); font-size: 12.5px; min-height: 1.45em; }
.foot.small { margin-top: 4px; color: var(--text3); }
.foot .warn { color: var(--warn); }
.foot .bad { color: var(--bad); }
a { color: var(--accent); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 20px; max-width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .53); }
dialog p { margin: 0 0 10px; }
.field { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.field span { min-width: 9em; color: var(--text2); }
.field input[type=number] { width: 7ch; }
.buttons { display: flex; justify-content: flex-end; margin-top: 16px; }

@media (max-width: 520px) {
  select#output { min-width: 0; width: 100%; }
  .meter { width: 100%; }
}
