.card:has(.card) {
  background-color: #f1f3f5;
}

/* Keep each nested level visually distinct without competing with its content. */
.csv-process-lane {
  background-color: #f1f3f5;
  border-color: #ced4da;
}

.csv-process-step {
  background-color: #e9ecef;
  border-color: #ced4da;
}

@media (max-width: 767.98px) {
  /* Allow nested flex cards to shrink to the viewport instead of table width. */
  #viewmetadatasection,
  .metadata-main-card,
  .metadata-main-card .card,
  .metadata-main-card .card-body {
    min-width: 0;
  }

  .metadata-main-card .card-body:has(> .data-source-metadata-table),
  .metadata-main-card .card-body:has(> .dataset-metadata-table),
  .metadata-main-card .card-body:has(> #viewdatasourcemetadata),
  .metadata-main-card .table-responsive {
    max-width: 100%;
    overflow-x: auto;
  }

  .data-source-metadata-table,
  .dataset-metadata-table,
  .metadata-main-card #viewdatasourcemetadata {
    min-width: 40rem;
  }
}
