/* Lists, numbered steps and tables. */
/* ---------- Lists, steps, tables ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-3);
  align-items: start;
}

.steps li::before {
  content: counter(step);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  color: var(--color-muted);
  font-weight: 600;
}

/* Table caption: left aligned above the table. */
.table-caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-3) var(--space-4);
}

/* Bookings page: the list of the user's requests. */
.booking-list li {
  align-items: center;
}

.booking-meta {
  display: block;
}

/* The room editor opens as a row of its own, right under the room being edited. */
.rooms-edit-row > td {
  padding: var(--space-3) 0;
  border-bottom: 0;
}

/* On a narrow screen the table scrolls sideways: the editor stays in view, as wide as the screen. */
.rooms-edit-row .card {
  position: sticky;
  left: 0;
  width: min(100%, calc(100vw - var(--space-7)));
}
