/* Missed answers tab (src/e2e/missed-answers.ts). Builds on session-viewer.css:
   the panel also carries `.sv`, so its cards, buttons, chips and tables apply. */

.ma .ma-head {
  margin-bottom: 14px;
}
.ma .ma-lede {
  margin: 4px 0 0;
  max-width: 72ch;
  font-size: 13px;
  color: var(--muted);
}
.ma .ma-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.ma .ma-days {
  display: inline-flex;
  gap: 6px;
}
.ma .ma-email {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 320px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font: inherit;
  font-size: 13px;
}
.ma .ma-email:focus {
  outline: none;
  box-shadow: var(--sv-ring);
}
.ma .ma-when {
  font-size: 12px;
  color: var(--muted);
}

.ma .ma-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.ma .ma-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--sv-radius-sm);
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.ma .ma-stat b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.ma .ma-stat span {
  font-size: 12px;
  color: var(--muted);
}
.ma .ma-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.ma .ma-card {
  padding: 14px 0 6px;
  margin-bottom: 14px;
}
.ma .ma-h {
  margin: 0 18px 10px;
  font-size: 15px;
  font-weight: 800;
}
.ma .ma-sub {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ma .ma-tablewrap {
  overflow-x: auto;
}
.ma .ma-table td {
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.ma .ma-table th {
  white-space: nowrap;
}

/* "on → 1": the word STT wrote, then the number the count waited on as a
   round badge, so the three numeric columns never read alike. */
.ma .ma-slip {
  white-space: nowrap;
}
.ma .ma-arrow {
  margin: 0 8px;
  color: var(--muted);
  font-weight: 700;
}
.ma .ma-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b8def, #8f79e3);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Times heard: a bar against the most-heard slip, then the count. */
.ma .ma-times {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
}
.ma .ma-bar {
  flex: 1 1 90px;
  max-width: 120px;
  height: 8px;
  border-radius: 999px;
  background: var(--sv-grey-bg);
  overflow: hidden;
}
.ma .ma-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sv-amber-ink);
  opacity: 0.75;
}
.ma .ma-times-n {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* People: an icon and the word, not a bare number. */
.ma .ma-people {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sv-grey-ink);
  white-space: nowrap;
}
.ma .ma-ic {
  flex: none;
}

/* A slip group's answers, opened in place under its row. */
.ma .ma-group.is-open td {
  background: var(--sv-soft);
}
.ma .ma-toggle-cell {
  text-align: right;
}
.ma .ma-toggle {
  min-width: 132px;
  justify-content: flex-start;
}
.ma .ma-table tr.ma-sub td {
  border-top: 0;
  padding: 0 18px 12px 18px;
  background: var(--sv-soft);
}
.ma .ma-subtable {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--sv-radius-sm);
  overflow: hidden;
}
.ma .ma-subtable td {
  padding: 7px 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.ma .ma-subtable tr:first-child td {
  border-top: 0;
}
.ma .ma-when-cell,
.ma .ma-conf {
  white-space: nowrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ma .ma-word {
  font-family: var(--sv-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--sv-blue-bg);
  color: var(--sv-blue-ink);
}
.ma .ma-heard {
  font-family: var(--sv-mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.ma .ma-user {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma .ma-conflict {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sv-red-bg);
  color: var(--sv-red-ink);
  white-space: nowrap;
}
/* Add slip: the button, its confirm in place under the row, and what it did. */
.ma .ma-lex {
  white-space: nowrap;
}
.ma .ma-addbtn {
  font-weight: 700;
}
.ma .ma-table tr.ma-confirm td {
  border-top: 0;
  padding: 0 18px 12px 18px;
  background: var(--sv-soft);
}
.ma .ma-confirmbox {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--sv-radius-sm);
  background: var(--surface);
}
.ma .ma-confirmbox p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
}
.ma .ma-confirm-actions {
  display: flex;
  gap: 8px;
}
.ma .ma-adderr {
  color: var(--sv-red-ink);
  font-weight: 600;
}
.ma .ma-localwarn {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--sv-amber-bg);
  color: var(--sv-amber-ink);
  font-weight: 600;
}
.ma .ma-added {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sv-green-bg);
  color: var(--sv-green-ink);
  white-space: nowrap;
}
.ma .ma-addwarn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sv-amber-bg);
  color: var(--sv-amber-ink);
  white-space: nowrap;
  cursor: help;
}
.ma .ma-kind {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--sv-grey-bg);
  color: var(--sv-grey-ink);
}
.ma .ma-kind-possible_slip {
  background: var(--sv-amber-bg);
  color: var(--sv-amber-ink);
}
.ma .ma-kind-credited_now {
  background: var(--sv-green-bg);
  color: var(--sv-green-ink);
}
.ma .ma-now {
  font-size: 11.5px;
  color: var(--sv-green-ink);
}
.ma .ma-noaudio {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.ma .ma-open {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.ma .ma-open:hover {
  text-decoration: underline;
}
.ma .ma-empty,
.ma .ma-foot {
  margin: 4px 18px 10px;
  font-size: 12.5px;
  color: var(--muted);
}
/* Loading: a card with a spinner; on a rescan the last answer stays behind it,
   faded and inert, so nothing can be clicked until the new one lands. */
.ma .ma-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}
.ma .ma-loading p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.ma .ma-spinner {
  width: 26px;
  height: 26px;
  border-width: 3px;
}
.ma .ma-busywrap {
  position: relative;
  min-height: 160px;
}
.ma .ma-busy {
  opacity: 0.35;
  filter: grayscale(0.4);
  pointer-events: none;
  user-select: none;
}
.ma .ma-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 72px;
  cursor: progress;
}
.ma .ma-overlay .ma-loading {
  box-shadow: var(--sv-shadow-hover);
}
.ma[aria-busy='true'] .ma-toolbar {
  cursor: progress;
}

/* Sortable headers: the whole label is the button. */
.ma .ma-sortbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}
.ma .ma-sortbtn:hover,
.ma .ma-sortbtn.is-on {
  color: var(--blue);
}
.ma .ma-sortbtn:focus-visible {
  outline: none;
  box-shadow: var(--sv-ring);
  border-radius: 4px;
}
.ma .ma-sortic {
  font-size: 9px;
  opacity: 0.7;
}
