/*
 * NextSure v64 — small, isolated workflow fixes.
 * ------------------------------------------------------------
 * This file intentionally contains only the changes requested after v63:
 * 1) Agency Directory uses the view itself as the vertical scroll container.
 * 2) Passport-first fields have room for Name / Passport / Phone / DOB.
 * 3) Branch bill modal calculation summary is easier to read.
 */

/* Agency Directory ---------------------------------------------------------
   The previous version made #peopleGrid its own 100%-high scroll area. In a
   flex column that could trap the bottom cards. Let #peopleView own the scroll
   and allow the grid to grow naturally so every agency remains reachable. */
#peopleView {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 26px !important;
}
#peopleView .ns-management-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #eef6fb 0%, rgba(238,246,251,.96) 86%, rgba(238,246,251,0) 100%);
  padding-bottom: 10px;
}
#peopleGrid.ns-people-grid {
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: max-content !important;
  overflow: visible !important;
  align-content: start !important;
  padding-bottom: 42px !important;
}

/* Passport-first Travel form ---------------------------------------------- */
.ns-passport-manual-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
@media (max-width: 1120px) {
  .ns-passport-manual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  #peopleView { overflow: visible !important; }
  #peopleView .ns-management-toolbar { position: static; }
  #peopleGrid.ns-people-grid { min-height: 0 !important; }
  .ns-passport-manual-grid { grid-template-columns: 1fr !important; }
}

/* Branch bill preview ------------------------------------------------------ */
.ns-branch-bill-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce9ef;
  border-radius: 14px;
  background: #f7fbfd;
}
.ns-branch-bill-preview > div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid #e4edf2;
}
.ns-branch-bill-preview span {
  display: block;
  margin-bottom: 4px;
  color: #6a7c8f;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ns-branch-bill-preview b { color: #10243d; font-size: 14px; }
@media (max-width: 850px) {
  .ns-branch-bill-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
