/* Agent · Travelers: cards, list, families, profile drawer. Builds on flight.css + pages.css. */

/* Passport warning above the list */
.tv-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border: 1px solid #f6d3c6;
  border-radius: 14px;
  background: #fff6f3;
  color: var(--ink-2);
  font-size: 13px;
}
.tv-alert > .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--bad);
}
.tv-alert span {
  min-width: 0;
  flex: 1;
}
.tv-alert b {
  color: var(--ink);
  font-weight: 600;
}
.tv-alert .btn {
  flex: none;
}
.tabs button span.is-late {
  background: var(--bad);
  color: #fff;
}
.tv-view {
  flex: none;
}
.tv-view button {
  display: grid;
  width: 38px;
  padding: 0;
  place-items: center;
}
.tv-view .icon {
  width: 16px;
  height: 16px;
}

/* Avatars */
.tv-av {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--av) 26%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--av) 40%, transparent);
  color: color-mix(in srgb, var(--av) 55%, #101010);
  font: 600 16px 'Poppins', sans-serif;
  letter-spacing: 0.02em;
}
.tv-av--sm {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.tv-av--xs {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.tv-av--lg {
  width: 56px;
  height: 56px;
  font-size: 19px;
}

/* Cards */
.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.tv-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  animation: rise 0.6s var(--ease) backwards;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.tv-card:hover,
.tv-card:focus-visible {
  box-shadow: 0 18px 36px -18px rgba(16, 23, 48, 0.26);
  transform: translateY(-2px);
}
.tv-card__top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tv-card__who {
  min-width: 0;
  flex: 1;
}
.tv-card__who h3 {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.tv-card__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tv-card__meta .icon {
  width: 13px;
  height: 13px;
}
.tv-flag {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.08);
}
.tv-type {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.tv-type--adult {
  background: var(--primary-soft);
  color: #2443b5;
}
.tv-type--child {
  background: #fff3df;
  color: #b26a00;
}
.tv-type--infant {
  background: #fde2ea;
  color: #b4285a;
}
.tv-fam {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  color: var(--ink-2);
  font-size: 12.5px;
}
.tv-fam .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.tv-fam span {
  font-weight: 600;
}
.tv-fam em {
  color: var(--muted);
  font-style: normal;
}
/* Passport strip: the thing that blocks a booking, so it gets its own colour */
.tv-pass {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--page);
}
.tv-pass__ic {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line);
}
.tv-pass__ic .icon {
  width: 17px;
  height: 17px;
}
.tv-pass > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.tv-pass > div span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.tv-pass > div > b {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tv-pass__st {
  flex: none;
  text-align: right;
}
.tv-pass__st b {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.tv-pass__st span {
  margin-top: 3px;
}
.tv-pass.is-ok .tv-pass__st b {
  background: #e6f6ee;
  color: var(--ok);
}
.tv-pass.is-warn {
  background: #fffaf0;
}
.tv-pass.is-warn .tv-pass__st b {
  background: #fff3df;
  color: #b26a00;
}
.tv-pass.is-bad {
  background: #fff6f3;
  box-shadow: inset 0 0 0 1px #f6d3c6;
}
.tv-pass.is-bad .tv-pass__ic {
  color: var(--bad);
  box-shadow: 0 0 0 1px #f6d3c6;
}
.tv-pass.is-bad .tv-pass__st b {
  background: var(--bad);
  color: #fff;
}
.tv-pass.is-bad .tv-pass__st span {
  color: var(--bad);
}
.tv-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}
.tv-facts > div {
  min-width: 0;
}
.tv-facts dt {
  color: var(--muted);
  font-size: 11px;
}
.tv-facts dd {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-none {
  color: var(--muted);
  font-weight: 400;
}
.tv-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.tv-trips {
  min-width: 0;
}
.tv-trips b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.tv-trips span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-card__foot .btn {
  flex: none;
}
.tv-card:hover .tv-card__foot .btn {
  border-color: var(--ink);
}

/* Small passport pill (list, families) */
.tv-pill {
  display: inline-block;
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tv-table .tv-pill {
  margin-left: 8px;
}
.tv-pill.is-ok {
  background: #e6f6ee;
  color: var(--ok);
}
.tv-pill.is-warn {
  background: #fff3df;
  color: #b26a00;
}
.tv-pill.is-bad {
  background: #fde2e1;
  color: var(--bad);
}

/* Families */
.tv-grid--fam {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.tv-famcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}
.tv-famcard__h {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tv-famcard__h h3 {
  font-size: 16px;
  font-weight: 600;
}
.tv-famcard__h span {
  color: var(--muted);
  font-size: 12.5px;
}
.tv-stack {
  display: flex;
  flex: none;
}
.tv-stack .tv-av {
  box-shadow: 0 0 0 2px #fff;
}
.tv-stack .tv-av + .tv-av {
  margin-left: -10px;
}
.tv-members {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tv-members li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}
.tv-members li:hover,
.tv-members li:focus-visible {
  background: var(--page);
}
.tv-members li > div {
  min-width: 0;
  flex: 1;
}
.tv-members b {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-members li > div span {
  color: var(--muted);
  font-size: 11.5px;
}
.tv-famcard__warn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff6f3;
  color: var(--bad);
  font-size: 12.5px;
  font-weight: 500;
}
.tv-famcard__warn .icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.tv-famcard__f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.tv-famcard__f .btn {
  flex: none;
}

/* Profile drawer */
.tv-pf__h {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tv-pass--lg {
  padding: 14px;
}
.tv-pf__foot {
  flex-wrap: wrap;
}
.tv-pf__foot .btn--primary {
  margin-left: auto;
}
.tv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
}

@media (max-width: 720px) {
  .tv-toolbar .search {
    min-width: 0;
    flex: 1 1 100%;
  }
  .tv-toolbar .select {
    flex: 1;
  }
  .tv-grid,
  .tv-grid--fam {
    grid-template-columns: minmax(0, 1fr);
  }
  .tv-alert {
    flex-wrap: wrap;
  }
  .tv-alert .btn {
    margin-left: 30px;
  }
  .tv-pf__foot .btn {
    flex: 1;
  }
}
/* Family name sits in the details line, so every card has the same height */
.tv-card__meta .tv-fam {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}
.tv-table .ag-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tv-table .ag-cell strong {
  display: block;
  white-space: nowrap;
}
.tv-table td:nth-child(3) {
  white-space: nowrap;
}
.tv-table th,
.tv-table td:nth-child(2),
.tv-table td:nth-child(5) .sub {
  white-space: nowrap;
}
@media (max-width: 720px) {
  .tv-alert span {
    flex: 1 1 calc(100% - 40px);
  }
}

/* Document uploads (passport copy, visa copy) */
.tv-ups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tv-up {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1.5px dashed #cfd5e3;
  border-radius: 12px;
  background: #fff;
}
.tv-up.is-set {
  border-style: solid;
  border-color: #b7e4c7;
  background: #f5fbf7;
}
.tv-up__ic {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.tv-up.is-set .tv-up__ic {
  background: var(--ok);
  color: #fff;
}
.tv-up__ic .icon {
  width: 16px;
  height: 16px;
}
.tv-up > div {
  min-width: 0;
  flex: 1;
}
.tv-up b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.tv-up > div > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-up .btn,
.tv-up .link {
  flex: none;
}
.tv-up label.btn {
  cursor: pointer;
}

/* ---------- Saved-traveler picker (booking forms) ---------- */
.tvp {
  position: fixed;
  z-index: 80;
  display: flex;
  max-height: min(460px, calc(100vh - 24px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(16, 23, 48, 0.35);
  animation: rise 0.25s var(--ease);
}
.tvp__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
}
.tvp__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--page);
}
.tvp__search .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.tvp__search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 14px;
  outline: 0;
}
.tvp__seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tvp__list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.tvp__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: left;
  transition: background-color 0.2s var(--ease);
}
.tvp__item:hover:not([disabled]),
.tvp__item:focus-visible {
  background: var(--page);
}
.tvp__item[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}
.tvp__who {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.tvp__who b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tvp__who > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tvp .tv-pill:not(.is-ok):not(.is-bad):not(.is-warn) {
  background: var(--surface);
  color: var(--ink-2);
}
.tvp__none {
  padding: 22px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.tvp__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.tvp__foot .icon,
.tvp-btn .icon {
  width: 15px;
  height: 15px;
}
.tvp-btn .icon:last-child {
  width: 13px;
  height: 13px;
  margin-left: -2px;
  color: var(--muted);
}
/* Filled from Travelers: a small note on the passenger card */
.tvp-from {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: var(--page);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}
.tvp-from .tv-av {
  width: 22px;
  height: 22px;
  font-size: 9px;
}
.tvp-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6f3;
  color: var(--bad);
  font-size: 13px;
}
.tvp-warn .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.tvp-save {
  margin-top: 12px;
}
.scan-hint__acts {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
}
.va-trav__tools {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 760px) {
  .va-trav__tools {
    width: 100%;
  }
  .va-trav__tools .btn {
    flex: 1;
  }
}
/* Phones: header buttons (Saved travelers, Fill sample data) drop under the title */
@media (max-width: 640px) {
  .card__head:has(> .scan-hint__acts),
  .card__head:has(> .tvp-btn) {
    flex-wrap: wrap;
  }
  .card__head > .scan-hint__acts {
    width: 100%;
  }
  .scan-hint:has(.scan-hint__acts) {
    flex-wrap: wrap;
  }
  .scan-hint__acts .btn {
    flex: 1;
  }
}
.va-trav__head > .va-trav__tools {
  min-width: auto;
  flex: none;
}
@media (max-width: 760px) {
  .va-trav__head > .va-trav__tools {
    width: 100%;
  }
}

/* Profile: what the traveler owes */
.tv-owe {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  transition: border-color 0.25s var(--ease);
}
.tv-owe:hover {
  border-color: var(--ink);
}
.tv-owe.is-due {
  border-color: #f6d3c6;
  background: #fff6f3;
}
.tv-owe > .icon:first-child {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}
.tv-owe.is-due > .icon:first-child {
  color: var(--bad);
}
.tv-owe span {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 12.5px;
}
.tv-owe b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.tv-owe > .icon:last-child {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
