/* Shared, readable table treatment for Builelib documentation. */

.md-typeset table:not([class]) {
  table-layout: auto;
  background: #ffffff;
  border-color: var(--builelib-line, #d7e3ee);
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 0.65rem 0.75rem;
  line-height: 1.65;
  border-color: var(--builelib-line, #d7e3ee);
}

.md-typeset table thead th {
  color: var(--builelib-brand-dark, #00577f);
  background: linear-gradient(180deg, #eef8fc 0%, #e6f3f8 100%) !important;
  border-bottom: 2px solid var(--builelib-brand, #006b9b);
  font-weight: 700;
  text-align: left;
}

.md-typeset table:not([class]) th + th,
.md-typeset table:not([class]) td + td {
  border-left-width: 1px;
}

.md-typeset table:not([class]) tbody tr:nth-child(even) td {
  background-color: #f8fbfd;
}

.md-typeset table:not([class]) tbody tr:hover td {
  background-color: #edf7fb;
}

/* Input/output tables use four semantic columns. Keep symbols and units
   compact while reserving most of the width for explanatory text. */
.md-typeset table:not([class]):has(thead tr > :nth-child(4):last-child) tr > :nth-child(1) {
  width: 22%;
}

.md-typeset table:not([class]):has(thead tr > :nth-child(4):last-child) tr > :nth-child(2) {
  width: 35%;
}

.md-typeset table:not([class]):has(thead tr > :nth-child(4):last-child) tr > :nth-child(3) {
  width: 11%;
}

.md-typeset table:not([class]):has(thead tr > :nth-child(4):last-child) tr > :nth-child(4) {
  width: 32%;
}

.md-typeset table caption {
  color: var(--builelib-ink, #10243a);
  font-size: 0.72rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .md-typeset table:not([class]) th,
  .md-typeset table:not([class]) td {
    padding: 0.5rem 0.55rem;
  }
}
