/* The table of the students of the run.
 *
 * The rows of the table have a fixed height: the window of the table is a
 * number of rows, 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.
 */

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

.the-students .the-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: end;
  margin: 1.25rem 0 0.5rem;
}

.the-students .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-students .the-toolbar input,
.the-students .the-toolbar select {
  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-students .the-toolbar .note {
  margin: 0;
}

/* The window of the table */

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

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

.the-students .the-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--quiet);
}

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

.the-students .the-table tbody td {
  height: var(--the-height-of-a-row);
  padding: 0.2rem 0.8rem;
  border-bottom: 1px solid var(--line);
  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-students .the-table tbody tr.the-space td {
  padding: 0;
  border-bottom: none;
}

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

.the-students .the-table .the-student:hover {
  text-decoration: underline;
}

.the-students .the-table code {
  margin-left: 0.4rem;
}

.the-state {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

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

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