.client-portal-page #reviewSummary [data-document-summary-edit] {
  color: #183a38 !important;
  background: #fff;
  border: 1px solid #aabfba;
}
.client-portal-page #guidedWizard .document-flow-progress {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.client-portal-page #guidedWizard .document-flow-progress button {
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.client-portal-page #guidedWizard [data-flow-continue="3"],
.client-portal-page #guidedWizard [data-flow-continue="4"] {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Shared document review renderer.
   Keep these rules inside the component so the same summary can be used by
   traveller review and staff workspaces without changing their surrounding UI. */
.document-summary {
  --ds-ink: #183a38;
  --ds-muted: #607775;
  --ds-line: #d3dfdc;
  --ds-paper: #f6f9f7;
  --ds-white: #fff;
  --ds-accent: #286c64;
  --ds-warning: #8b5a1d;
  --ds-danger: #9a3d43;
  --ds-good: #28644f;
  display: grid;
  min-width: 0;
  gap: 18px;
  color: var(--ds-ink);
  font-family: "DM Sans", sans-serif;
}

.document-summary *,
.document-summary *::before,
.document-summary *::after {
  box-sizing: border-box;
}

.document-summary .document-traveller {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--ds-line);
  border-radius: 7px;
  background: var(--ds-paper);
}

.document-summary .document-traveller > h3 {
  margin: 0 0 12px;
  color: var(--ds-ink);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.document-summary .document-slot {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--ds-line);
  border-radius: 5px;
  background: var(--ds-white);
}

.document-summary .document-slot + .document-slot {
  margin-top: 9px;
}

.document-summary .document-slot-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.document-summary .document-slot-heading h4 {
  min-width: 0;
  margin: 0;
  color: var(--ds-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-summary .document-status {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #bdd5cb;
  border-radius: 3px;
  background: #edf6f1;
  color: var(--ds-good);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .045em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.document-summary .document-status[data-status="skipped"] {
  border-color: #dfd3ba;
  background: #f7f2e8;
  color: var(--ds-warning);
}

.document-summary .document-status[data-status="missing"] {
  border-color: #e5c7c7;
  background: #fbefed;
  color: var(--ds-danger);
}

.document-summary .document-status[data-status="needs-look"] {
  border-color: #e5d4ac;
  background: #fbf5e7;
  color: #775b1e;
}

.document-summary .document-requirement,
.document-summary .document-skip-note {
  margin: 7px 0 0;
  color: var(--ds-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.document-summary .document-files {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.document-summary .document-files > li {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 12px;
  padding: 9px 10px;
  border: 1px solid #e2eae6;
  border-radius: 4px;
  background: #f8faf9;
  color: var(--ds-ink);
  font-size: 12px;
  line-height: 1.35;
}

.document-summary .document-files :is(a, [data-document-view]) {
  color: var(--ds-accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.document-summary .document-files :is(time, .document-date, .document-quality) {
  color: var(--ds-muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-summary .document-files .document-quality {
  grid-column: 1 / -1;
}

.document-summary .document-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
}

.document-summary .document-actions button,
.document-summary [data-document-summary-edit] {
  display: inline-flex;
  min-height: 38px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid #a9c5bb;
  border-radius: 4px;
  background: #f4f8f6;
  color: var(--ds-ink);
  cursor: pointer;
  font: 700 12px/1.25 "DM Sans", sans-serif;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.document-summary .document-actions button:hover,
.document-summary [data-document-summary-edit]:hover {
  border-color: var(--ds-accent);
  background: #eaf3ef;
}

.document-summary .document-actions button:focus-visible,
.document-summary [data-document-summary-edit]:focus-visible,
.document-summary .document-files a:focus-visible {
  outline: 3px solid #286c64;
  outline-offset: 2px;
}

/* Compact Step 7 treatment is deliberately limited to the client wizard. */
.client-portal-page.vpc-compact-wizard #reviewSummary {
  min-width: 0;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 10px;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d3dfdc;
  border-top: 3px solid #286c64;
  border-radius: 4px;
  background: #f5f8f6;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article > span {
  color: #607775;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.25;
  text-transform: uppercase;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article > b {
  min-width: 0;
  color: #183a38;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary {
  margin: 0 0 9px;
  padding: 11px 13px;
  border: 1px solid #cbdad5;
  border-radius: 5px;
  background: #f3f7f5;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary > h3 {
  margin: 0 0 7px;
  color: #183a38;
  font-size: 16px;
  line-height: 1.3;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary > h3 i {
  margin-right: 5px;
  color: #286c64;
}

.client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] .fee-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #dce6e2;
  border-radius: 4px;
  background: #fff;
  color: #526865;
  font-size: 11px;
  line-height: 1.35;
}

.client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] .fee-row > :is(span, strong) {
  color: #183a38 !important;
  min-width: 0;
  overflow-wrap: anywhere;
}

.client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] .fee-row > strong {
  flex: 0 0 auto;
  color: #183a38;
  font-size: 12px;
  text-align: right;
}

.client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] .fee-row.total {
  grid-column: 1 / -1;
  border-color: #a9c5bb;
  background: #eaf3ef;
  color: #183a38;
  font-weight: 800;
}

.client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] > .helper-text {
  grid-column: 1 / -1;
  margin: 0;
  color: #607775;
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .document-summary {
    gap: 11px;
  }

  .document-summary .document-traveller {
    padding: 10px;
  }

  .document-summary .document-traveller > h3 {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .document-summary .document-slot {
    padding: 10px;
  }

  .document-summary .document-slot-heading {
    gap: 7px;
  }

  .document-summary .document-slot-heading h4 {
    font-size: 14px;
  }

  .document-summary .document-status {
    min-height: 24px;
    padding: 4px 6px;
    font-size: 9px;
  }

  .document-summary .document-files > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 8px;
  }

  .document-summary .document-files .document-quality {
    grid-column: auto;
  }

  .document-summary .document-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-summary .document-actions button,
  .document-summary [data-document-summary-edit] {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 8px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid {
    gap: 6px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article {
    gap: 4px;
    padding: 8px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article > span {
    font-size: 9px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article > b {
    font-size: 12px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary {
    padding: 9px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary [data-client-price-summary] .fee-row.total {
    grid-column: auto;
  }
}

@media (max-width: 380px) {
  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article {
    grid-template-columns: minmax(76px, .7fr) minmax(0, 1.5fr);
    align-items: baseline;
    gap: 8px;
  }

  .client-portal-page.vpc-compact-wizard #reviewSummary .review-grid > article > b {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .document-summary .document-actions button,
  .document-summary [data-document-summary-edit] {
    scroll-behavior: auto;
    transition: none;
  }
}

/* Replace the inherited dark fee-box highlight with a light, high-contrast
   summary while keeping every label legible on its own row. */
.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box {
  border-color: #cbdad5;
  background: #f3f7f5 !important;
  color: #183a38 !important;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box > h3,
.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box > h3 i,
.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box [data-client-price-summary],
.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box [data-client-price-summary] .fee-row,
.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box [data-client-price-summary] .fee-row > :is(span, strong),
.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box [data-client-price-summary] small {
  color: #183a38 !important;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box > h3 i {
  color: #286c64 !important;
}

.client-portal-page.vpc-compact-wizard #reviewSummary .review-fee-summary.fee-box [data-client-price-summary] .fee-row.total {
  border-color: #a9c5bb;
  background: #eaf3ef;
}
