/* Manage tables before special kinds of tables */

table {
    width: 100%;
    border: 1px solid var(--tableaux-border-color);
}

table thead {
    background-color: var(--focused-color);
}

table thead tr td,
table thead tr th,
table tbody tr td,
table tbody tr th {
    border-bottom: 1px dotted var(--tableaux-border-color);
    border-right: 1px dotted var(--tableaux-border-color);
}

nav table {
    border: none;
}

nav table thead tr td,
nav table thead tr th,
nav table tbody tr td,
nav table tbody tr th {
    border-bottom: inherit;
    border-right: inherit;
}

/* ============================================================ */

div.declare-step table tbody tr td {
    font-size: 95%;
}

div.declare-step > p {
    padding: 0;
    margin: 0;
    padding-bottom: 0.25rem;
    font-weight: bold;
    font-size: 110%;
}

table.tableaux {
    width: 100%;
    margin-bottom: 1rem;
    border-spacing: 0;
    border-collapse: separate;
}

table.tableaux thead th {
    font-weight: normal;
}

table.tableaux thead th,
table.tableaux tbody td {
    border-right: 1px solid var(--tableaux-border-color);
}

table.tableaux thead th.port {
    width: 20%;
}

table.tableaux thead th.check {
    width: 10%;
    text-align: center;
}

table.tableaux tbody td.check {
    width: 10%;
    text-align: center;
    font-family: serif;
    font-size: 90%;
}

table.tableaux thead th.optname {
    width: 40%;
}

table.tableaux tbody td.optname {
    width: 40%;
}

table.tableaux thead th.binding {
    width: 20%;
}

table.tableaux tbody td.errcode {
    line-height: 1.5;
    vertical-align: top;
}

table.tableaux tbody td.description {
    font-family: sans-serif;
    font-size: 100%;
    line-height: 1.5;
}

table.tableaux tbody td.primary,
table.tableaux tbody td.required {
    font-weight: bold;
}

table.tableaux thead tr th:first-of-type,
table.tableaux tbody tr td:first-of-type {
    border-left: 1px solid var(--tableaux-border-color);
}

table.tableaux thead th,
table.tableaux tbody td {
    padding: 0.25em;
}

table.tableaux tbody td {
    font-family: monospace;
    font-size: 125%;
}

table.tableaux thead tr:nth-child(1) th,
table.tableaux tbody tr:nth-child(1) td {
    border-top: 1px solid var(--tableaux-border-color);
}

table.tableaux tbody tr:last-of-type td {
    border-bottom: 1px solid var(--tableaux-border-color);
}

table.tableaux thead tr th {
    background-color: #eeeeee;
}

table.tableaux tbody tr:nth-child(even) td {
    background-color: #eeeeee;
}

/* ============================================================ */

table.md-ext-opt {
    width: 100%;
    margin-bottom: 1rem;
    border-spacing: 0;
    border-collapse: separate;
}

table.md-ext-opt thead th,
table.md-ext-opt tbody td {
    border-right: 1px solid var(--tableaux-border-color);
}

table.md-ext-opt thead tr th.md-ext-prop {
   width: 45%;
}

table.md-ext-opt thead tr th.md-ext-value {
   width: 55%;
}

table.md-ext-opt tbody tr:nth-child(even) td {
    background-color: #eeeeee;
}

table.md-ext-opt thead tr th {
    background-color: #eeeeee;
}

table.md-ext-opt tbody tr:nth-child(even) td {
    background-color: #eeeeee;
}

table.md-ext-opt thead tr th:first-of-type,
table.md-ext-opt tbody tr td:first-of-type {
    border-left: 1px solid var(--tableaux-border-color);
}

table.md-ext-opt thead th,
table.md-ext-opt tbody td {
    padding: 0.25em;
}

table.md-ext-opt thead tr:nth-child(1) th,
table.md-ext-opt tbody tr:nth-child(1) td {
    border-top: 1px solid var(--tableaux-border-color);
}

table.md-ext-opt tbody tr:last-of-type td {
    border-bottom: 1px solid var(--tableaux-border-color);
}

/* ============================================================ */

table.tableaux.error-list tbody td {
    font-family: serif;
    font-size: inherit;
}

table.tableaux.error-list thead th.code,
table.tableaux.error-list tbody td.code {
    vertical-align: top;
    width: 20%;
}

table.tableaux.error-list tbody td.code code {
    background-color: inherit;
    border: none;
}

/* ============================================================ */

.element-syntax-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
}

.element-syntax-table table tr td {
    padding: 0;
    padding-left: 0.5em;
    padding-right: 0.5em;
    border-right: none;
}

.element-syntax-table table tr td {
    border-bottom: 1px dotted #888888;
}

.element-syntax-table table tr:last-child td {
    border-bottom: none;
}

.element-syntax-table table tr td.code {
    font-family: var(--mono-family);
    background-color: var(--secondary-color);
    border-right: 1px solid black;
    border-left: 1px solid black;
}

.element-syntax-table table tr td.code.first {
    border-top: 1px solid black;
    border-top-left-radius: 0.25em;
    border-top-right-radius: 0.25em;
}

.element-syntax-table table tr td.code.last {
    border-bottom: 1px solid black;
    border-bottom-left-radius: 0.25em;
    border-bottom-right-radius: 0.25em;
}

.element-syntax-table table tr td.desc {
    padding-left: 1em;
    font-style: italic;
}
