/* Force table cell content to wrap and fit within the window */
.wy-table-responsive table,
.wy-table-responsive table td,
.wy-table-responsive table th {
    white-space: normal !important;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
    padding: 0.5em;
}

/* Make table width adapt to container width */
.wy-table-responsive table {
    table-layout: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    overflow-x: auto;
}

/* Improve appearance of all table cells */
td, th {
    overflow-wrap: break-word;
    hyphens: auto;
    vertical-align: top;
}

/* --- Images / figures spacing --- */
.rst-content img {               /* all images */
  margin-top: 0.9rem;
  margin-bottom: 1.1rem;
  display: inline-block;
}

.rst-content img.align-center,   /* centered images */
.rst-content .figure.align-center img {
  display: block;                /* ensure margins apply cleanly */
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.rst-content a.image-reference img {  /* images wrapped in links */
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.rst-content .figure {           /* whole figure block (when using .. figure::) */
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.rst-content .figure .caption {  /* optional: give captions some breathing room */
  margin-top: 0.5rem;
}
