/* The concierge portal (js/portal.js): Send trips, Trips, My trips, one trip, Receipts and changes, and People > Import. */

/* ---------- Send trips: the grid ---------- */
/* The grid fits its column instead of scrolling, so the airport and people lists can open below a box. */
.sendsheet-wrap { overflow: visible; }
table.sendsheet { table-layout: fixed; border-collapse: collapse; }
table.sendsheet th { padding: 8px 6px; white-space: normal; }
table.sendsheet th:first-child { inline-size: 34px; }
table.sendsheet th:nth-child(2) { inline-size: 12%; }
table.sendsheet th:nth-child(3) { inline-size: 15%; }
table.sendsheet th:nth-child(4), table.sendsheet th:nth-child(5) { inline-size: 12%; }
table.sendsheet th:nth-child(6) { inline-size: 23%; }
table.sendsheet th:nth-child(7) { inline-size: 11%; }
table.sendsheet th:last-child { inline-size: 36px; }
table.sendsheet td { padding: 4px; border-block-end: 0; vertical-align: top; }
table.sendsheet tr.grow td { border-block-start: 1px solid var(--line); }
table.sendsheet td input { min-height: 40px; padding: 8px 10px; font-size: 15px; }
table.sendsheet td.gc-destination { padding-block-end: 20px; }
table.sendsheet .rownum { padding-block-start: 12px; color: var(--ink-muted); font-size: 12px; font-weight: 600; }
table.sendsheet tr.bad .rownum { color: var(--critical); }
table.sendsheet input[aria-invalid="true"], .chipbox.bad { border-color: var(--critical); box-shadow: inset 0 0 0 1px var(--critical); }
table.sendsheet tr.gres td { padding: 0 3px 10px; }
table.sendsheet .x { inline-size: 30px; block-size: 36px; border: 0; background: none; color: var(--ink-muted); cursor: pointer; font-size: 20px; line-height: 1; }
table.sendsheet .x:hover { background: var(--band); color: var(--ink); }
.chipbox { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 40px; padding: 3px 4px; background: var(--field); border: 1px solid var(--line-strong); }
.chipbox:focus-within { outline: 2px solid var(--red); outline-offset: 1px; }
.chipbox .who-wrap { position: relative; flex: 1 1 90px; min-inline-size: 90px; }
.chipbox input { border: 0; min-height: 28px; padding: 2px 4px; }
.chipbox input:focus-visible { outline: 0; }
.pchip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 8px; background: var(--band); font-size: 13px; font-weight: 600; white-space: nowrap; max-inline-size: 100%; }
.pchip.unknown { background: var(--field); box-shadow: inset 0 0 0 1px var(--critical); color: var(--critical); }
.pchip button { border: 0; background: none; color: inherit; cursor: pointer; inline-size: 22px; block-size: 22px; font-size: 16px; line-height: 1; }
.pchip button:hover { background: var(--line-strong); }
.who-list { inset-block-start: 32px; }
.who-list li { grid-template-columns: 1fr; }
.send-actions { padding-block-start: 6px; }
.send-grid .actions .btn.link { margin-inline-start: 6px; }

/* ---------- lists of trips ---------- */
.week-table .cell-status, .trip-list .cell-status { min-inline-size: 170px; }
.batch-table td { vertical-align: top; }
.ptrip-filters .find { flex: 1 1 220px; max-inline-size: 340px; }
.ptrip-row { display: grid; gap: 10px; padding-block: 14px 26px; }
.ptrip-row table.ptravelers tr:last-child td { border-block-end: 0; }
.ptrip-row:first-of-type { padding-block-start: 0; }
.ptrip-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 24px; align-items: center; }
.ptrip-name { font-size: 16px; font-weight: 600; text-decoration: none; color: var(--ink); }
.ptrip-name:hover { text-decoration: underline; }
table.ptravelers { table-layout: fixed; }
table.ptravelers th:first-child { inline-size: 22%; }
table.ptravelers th:nth-child(2) { inline-size: 46%; }
table.ptravelers td { vertical-align: top; padding-block: 8px; }

/* ---------- one trip, and My trips ---------- */
.pfacts { grid-template-columns: max-content minmax(0, 1fr); }
.pnext .next-name a { color: inherit; text-decoration: none; }
.pnext .next-name a:hover { text-decoration: underline; }
.bk { display: grid; gap: 0; }
.bk-item { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding-block: 12px; border-block-start: 1px solid var(--line); }
.bk-kind { font: 500 12px/1.6 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-muted); padding-block-start: 2px; }
.bk-body { display: grid; gap: 4px; min-inline-size: 0; }
.legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legs li { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; }
.leg-day { font-weight: 600; min-inline-size: 104px; }
.leg-time { font-weight: 600; }
.leg-no { color: var(--ink-muted); font-size: 14px; }
.conf-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-block-start: 4px; }
.conf-line .mono { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.pperson { display: grid; gap: 4px; }
.pperson + .pperson { margin-block-start: 18px; }
.pperson h3 { font-size: 15px; }

/* ---------- Receipts and changes ---------- */
.asks-table td { vertical-align: top; }

/* ---------- People > Import ---------- */
.import-people textarea { font-family: var(--mono); font-size: 13px; }
.imp-table tr.bad td:first-child { color: var(--critical); font-weight: 600; }

@media (max-width: 900px) {
  .ptrip-head { grid-template-columns: minmax(0, 1fr); }
}
/* On a phone each grid row is a card with the column names over its boxes. */
@media (max-width: 720px) {
  table.sendsheet, table.sendsheet tbody { display: block; }
  table.sendsheet thead { display: none; }
  table.sendsheet tr.grow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 10px; padding: 14px 0 10px; border-block-start: 1px solid var(--line-strong); position: relative; }
  table.sendsheet tr.grow td { display: grid; gap: 4px; padding: 0; border: 0; }
  table.sendsheet tr.grow td.gc::before { content: attr(data-label); font: 500 12px/1.3 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-muted); }
  table.sendsheet tr.grow td.gc-caseNumber { grid-column: 1 / -1; padding-inline-end: 44px; }
  table.sendsheet td.gc-destination, table.sendsheet td.gc-travelers, table.sendsheet td.gc-notes { grid-column: 1 / -1; }
  table.sendsheet tr.grow td.rownum { display: none; }
  table.sendsheet tr.grow td.gc-x { display: block; position: absolute; inset-block-start: 10px; inset-inline-end: 0; }
  table.sendsheet tr.gres { display: block; }
  table.sendsheet tr.gres td { display: block; padding: 0 0 12px; }
  table.sendsheet tr.gres td:first-child { display: none; }
  .bk-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .legs { gap: 10px; }
  .legs li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; }
  table.ptravelers td:has(> .dash:only-child) { display: none; }
  table.ptravelers td.cell-name .small { font-weight: 500; }
  .leg-day { min-inline-size: 0; }
  table.ptravelers, table.ptravelers tbody { display: block; }
  table.ptravelers thead { display: none; }
  table.ptravelers tr { display: grid; gap: 4px; padding-block: 10px; border-block-end: 1px solid var(--line); }
  table.ptravelers td { display: block; padding: 0; border: 0; }
  table.ptravelers td.cell-name { font-weight: 600; }
  .ptrip-head .actions .btn { flex: 1 1 auto; }
}

/* ---------- printing a trip ---------- */
@media print {
  header.top, .sheet, .demo-strip, .strip, footer.powered, .page-head .actions, a.back, .actions, .tipwrap, #ft-guide, .profile-banner, [data-find="trip-changes"], [data-find="trip-receipts"] { display: none !important; }
  body, main { background: #ffffff; color: #000000; }
  main { padding: 0; max-inline-size: none; }
  .conf-line .mono { font-size: 16px; }
}
