/* =========================================================================
   41 Moorgate - requests.css
   The occupier's surface (WP-W9).

   Built on portal.css tokens, and on almost nothing else. work.css is the
   board's stylesheet: rails, lanes, grids, column widths, scroll shadows.
   None of that exists here and importing it to use four rules would mean
   every future change to the board's layout arriving on a page occupiers
   use.

   One column throughout, at every width. A wide screen gets more room per
   field rather than a second column, because this page is read a few times
   a year by somebody in a hurry and a layout that reflows into something
   unfamiliar between the office monitor and the phone is a layout they have
   to learn twice.
   ========================================================================= */

.rq-gate,
.rq-shell {
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
}

.rq-gate {
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
}

/* -------------------------------------------------------------- the top */

.rq-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.rq-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 18px;
}

.rq-top h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rq-top p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}

.rq-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 18px 60px;
  display: grid;
  gap: 22px;
}

/* ------------------------------------------------------------- the form */

.rq-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
}

.rq-card h2,
.rq-list-h h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.rq-hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

.rq-card > .rq-hint {
  display: block;
  margin: 0 0 16px;
}

.rq-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  min-width: 0;
}

.rq-field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.rq-field input[type='text'],
.rq-field select,
.rq-field textarea {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.rq-field textarea {
  resize: vertical;
  min-height: 74px;
}

.rq-field input:focus-visible,
.rq-field select:focus-visible,
.rq-field textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

/* Two per row where there is room, one per row on a phone. Not a grid with
   fixed tracks: `how urgent` and `which floor` are short, and a 50/50 split
   on a narrow screen truncates the labels rather than the inputs. */
.rq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}

.rq-row .rq-field {
  flex: 1 1 220px;
}

.rq-photo-l {
  cursor: pointer;
}

.rq-field input[type='file'] {
  font-size: 14px;
}

.rq-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.rq-actions .rq-hint {
  flex: 1 1 200px;
}

/* ------------------------------------------------------------- the list */

.rq-list-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rq-item {
  width: 100%;
  display: block;
  text-align: left;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.rq-item:hover,
.rq-item:focus-visible {
  border-color: var(--brass);
}

.rq-item-h {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.rq-ref {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* Both of these are spans inside a button, so they inline by default and
   the meta line runs straight into the last word of the name. */
.rq-name {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}

.rq-meta {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.rq-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
  background: var(--paper);
  color: var(--text-soft);
  border-color: var(--line);
}

.rq-pill.is-open {
  background: #e6eef6;
  color: #2f5b86;
  border-color: #cfe0ee;
}

.rq-pill.is-going {
  background: #fbf0e2;
  color: #8a5a17;
  border-color: #f0ddbe;
}

.rq-pill.is-waiting {
  background: #f0ebf7;
  color: #5b4785;
  border-color: #ded3ee;
}

.rq-pill.is-done {
  background: #e7f1ea;
  color: #38664a;
  border-color: #cfe3d6;
}

.rq-empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--r);
}

/* ------------------------------------------------------------ the sheet */

/* A sheet rather than a modal: it comes up from the bottom on a phone,
   which is where a thumb is, and it is the same component on a desk. */
.rq-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(14 17 22 / 42%);
}

.rq-sheet-in {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--r) var(--r) 0 0;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
}

@media (width >= 720px) {
  .rq-sheet {
    align-items: center;
  }

  .rq-sheet-in {
    border-radius: var(--r);
    max-height: 86vh;
  }
}

.rq-sheet-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

.rq-sheet-h h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.rq-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.rq-sub {
  margin: 14px 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rq-msg {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.rq-msg-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.rq-msg-h b {
  color: var(--text);
  font-weight: 600;
}

.rq-msg p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-line;
}

.rq-mine {
  background: #fbf7ee;
  border-color: #ece0c6;
}

.rq-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.rq-person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 12.5px;
}

.rq-person button {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.rq-fixed {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.rq-fixed .rq-hint {
  flex: 1 1 200px;
}
