/*  Override fit-content for tables inside width-content containers.
    The .width-full table { width: fit-content } rule prevents tables from
    expanding, so we override it for width-content tables.
 */
.width-content table {
  width: 100%;
}

.width-full table {
  width: 100%;
}

/*  Make width-content figures behave like width-full figures.
    These rules mirror the width-full figure styles from _figure.scss
 */
figure.width-content {
  position: relative;
  max-width: unset;
  clear: both;
}

th.halign-left > p,
td.halign-left > p,
td.halign-left > div > pre {
  text-align: left;
}

th.halign-center > p,
td.halign-center > p,
td.halign-center > div > pre {
  text-align: center;
}

th.halign-right > p,
td.halign-right > p,
td.halign-right > div > pre {
  text-align: right;
}

th.valign-bottom,
td.valign-bottom,
td.valign-bottom > div > pre {
  vertical-align: bottom;
}

th.valign-middle,
td.valign-middle,
td.valign-middle > div > pre {
  vertical-align: middle;
}

th.valign-top,
td.valign-top,
td.valign-top > div > pre {
  vertical-align: top;
}

/* Table Cell Background Colors FIXME: TO DROP/REPLACE */
table tbody tr > td:has(.open) {
  background: #E4D2F2;
}

table tbody tr > td:has(.selective) {
  background: #D1B2E8;
}

table tbody tr > td:has(.invitation) {
  background: #F7CAAC;
}

table tbody tr > td:has(.freehand) {
  background: #FFE599;
}

table tbody tr > td:has(.positive) {
  background: #E2EFD9;
}

table tbody tr > td:has(.negative) {
  background: #FFE5E5;
}
