/* The board of the cases: two tables, and the cases that move between them.
 *
 * The tables are windowed: the rows have a fixed height, the window of a
 * table follows the scroll of it, and the space around the window is made of
 * rows too. The height of a row is a variable of the page, and the server
 * counts the rows and not the pixels.
 */

body.the-board {
  padding: 0.6rem 1.1rem 0.8rem;
  height: 100vh;
  overflow: hidden;
}

.the-board {
  --the-height-of-a-row: 2.25rem;
}

.the-board .the-head h1 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}

.the-board .the-head .lead {
  max-width: none;
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.the-board .the-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: end;
  margin: 0.9rem 0 0.6rem;
}

.the-board .the-toolbar label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.the-board .the-toolbar input {
  min-width: 18rem;
  padding: 0.45rem 0.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.the-board .the-toolbar .note {
  flex: 1 1 20rem;
  margin: 0;
}

.the-board .the-toolbar .number {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* The two tables of the board */

.the-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  height: calc(100vh - 12.5rem);
}

.the-table {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.the-table h2 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.the-table h2 .number {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* The window of a table */

.the-board .the-window {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}

.the-board .the-window table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: none;
  border-radius: 0;
}

.the-board .the-window thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--quiet);
  text-align: left;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.the-board .the-window tbody tr {
  height: var(--the-height-of-a-row);
}

.the-board .the-window tbody td {
  height: var(--the-height-of-a-row);
  padding: 0.2rem 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The space of the rows that are not on the screen: it is made of rows too,
 * and the server counts them. */
.the-board .the-window tbody tr.the-space td {
  padding: 0;
  border-bottom: none;
}

.the-board .the-window .the-student {
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.the-board .the-window .the-student:hover {
  text-decoration: underline;
}

.the-board .the-window code {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.the-board .the-window .the-number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* The facts of a case: the buckets of them, and nothing else. */

.the-board .the-window .the-facts {
  white-space: normal;
}

.the-board .the-window .the-fact {
  display: inline-block;
  margin-right: 0.3rem;
  padding: 0.05rem 0.4rem;
  background: var(--quiet);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

/* The state of a case: the verdict of it, and the answer of a person. */

.the-board .the-window .the-state {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.the-board .the-window .the-state.fits {
  color: var(--fits);
  background: #1c2c26;
}

.the-board .the-window .the-state.review {
  color: var(--review);
  background: #2e2818;
}

.the-board .the-window .the-state.blocked {
  color: var(--blocked);
  background: #2e1e1e;
}

.the-board .the-window .the-state.not_settled {
  color: var(--muted);
  background: var(--quiet);
}

.the-board .the-window .empty {
  color: var(--muted);
  font-style: italic;
}
