@import url("applications.css");

.result-count, .empty-state {
  color: var(--muted);
}

.review-table, .review-table tbody {
  display: block;
}

.review-table {
  width: 100%;
  font-size: 0.91rem;
}

.review-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.review-table tbody tr {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  margin-bottom: 0.8rem;
}

.review-table td {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cell-vacancy {
  order: -1;
}

.cell-mark {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.cell-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.vacancy-title {
  display: block;
  font-weight: 730;
}

.marker {
  display: inline-block;
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 0.4rem;
  padding: 0.05rem 0.38rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.booking-confirmed, .tier-A {
  color: var(--good);
  background: var(--good-bg);
}

.booking-conditional, .booking-possible {
  color: var(--caution);
  background: var(--caution-bg);
}

.booking-possible, .tier-hidden {
  border-style: dashed;
}

.booking-denied {
  color: var(--danger);
  background: var(--danger-bg);
}

.tier-B {
  color: var(--link);
  background: var(--soft);
}

.warnings {
  padding-left: 1.15rem;
  margin-block: 0.4rem 0;
  color: var(--caution);
  font-size: 0.87rem;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.9rem;
  color: var(--muted);
}

.pagination a {
  padding: 0.45rem 0.15rem;
}

@media (min-width: 42rem) {
  .review-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cell-vacancy, .cell-mark {
    grid-column: 1 / -1;
  }
}

@media (min-width: 76rem) {
  .table-container {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .review-table {
    display: table;
    border-collapse: collapse;
  }

  .review-table thead {
    display: table-header-group;
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    white-space: normal;
    background: var(--soft);
  }

  .review-table tbody {
    display: table-row-group;
  }

  .review-table tbody tr {
    display: table-row;
    border: 0;
  }

  .review-table th, .review-table td {
    display: table-cell;
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0.5rem;
  }

  .review-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .review-table .cell-label {
    display: none;
  }

  .cell-vacancy, .cell-why, .cell-excerpt {
    min-width: 8rem;
  }

  .cell-mark {
    min-width: 10rem;
    border-top: 0;
  }
}
