/* Generated support tables are wide by nature -- one column per switch model.
   Let them scroll inside their own box rather than stretch the page. */
table.ngsw-support-table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  white-space: nowrap;
}

table.ngsw-support-table td,
table.ngsw-support-table th {
  vertical-align: top;
}

/* A table whose LAST column carries full sentences (the parity-gaps "Why"
   column): let it wrap, and give it room to be worth wrapping.

   Scoped to that one class deliberately. As a blanket
   `.ngsw-support-table td:last-child` rule this forced 20rem onto the last
   column of every generated table -- so the model table's Status column, whose
   widest value is the 13-character "live-verified", was rendered 320px wide. */
table.ngsw-reason-table td:last-child {
  white-space: normal;
  min-width: 20rem;
}

/* Links produced by docs/_ext/filelinks.py: a file path that is also a link.
   Keep the monospace look, add the underline links normally get. */
a.repofile code,
a.repofile tt {
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* Product photos (docs/_ext/support_tables.py's ngsw-model-photo).

   The class sits on the <img>, not the <figure>: reST's `figure` directive
   applies its :class: to the image node, unlike the port map below, which is
   raw HTML and carries the class on the figure itself. */
img.ngsw-model-photo {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  /* These are product shots on a white background. Painting that background on
     explicitly, rather than leaving whatever the image happens to carry, keeps
     them from reading as a bright cut-out in the dark theme. */
  background: #fff;
  padding: 0.75rem;
}
figure:has(> img.ngsw-model-photo) {
  margin: 1rem 0 1.5rem;
}
figure:has(> img.ngsw-model-photo) figcaption {
  font-size: 0.85em;
  opacity: 0.75;
  margin-top: 0.4rem;
}

/* Generated port maps (docs/_ext/support_tables.py's ngsw-model-diagram). */
figure.ngsw-port-map {
  margin: 1rem 0 1.5rem;
  text-align: center;
}
figure.ngsw-port-map figcaption {
  font-size: 0.85em;
  opacity: 0.75;
  margin-top: 0.4rem;
}
