/* The same table rules apply to published cards, card previews and staff text editors. */
@supports (color: color-mix(in srgb, black 6%, white)) {
    :is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) {
        --ch-table-theme-tint: color-mix(in srgb, var(--e-global-color-primary, var(--wp--preset--color--primary, #555)) 6%, white);
    }
}

:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    background: #fff !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) :is(table, thead, tbody, tfoot, tr, th, td) {
    border-radius: 0 !important;
}
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table > :is(thead, tbody, tfoot) > tr {
    background: #fff !important;
}
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    --ch-cell-background: #fff;
    border: 1px solid var(--ch-table-line, var(--silt-border, #e4e4e4)) !important;
    padding: 10px;
    color: #474747;
    font: inherit;
    text-align: start;
    vertical-align: middle;
}
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table > :is(thead, tbody, tfoot) > tr > :is(th, td):not([data-mce-selected]) {
    background: var(--ch-cell-background) !important;
}
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table > tbody > tr > th {
    font-weight: 700;
}

/* Also cover older schedules whose first row was saved as ordinary td cells. */
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table :is(thead > tr, tr.ch-staff-column-headings, tr[data-mce-si-staff-heading]) > :is(th, td),
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table > tbody > tr > th:is([scope="col"], [scope="colgroup"]) {
    --ch-cell-background: var(--silt-category-tint, var(--ch-staff-table-tint, var(--ch-table-theme-tint, #f5f5f5)));
    padding: 14px 12px;
    color: var(--silt-ink, #303030);
    font-weight: 700;
}
:is(.ch-staff-list .ch-staff-section, body.ch-staff-table-editor) table :is(th, thead td, .ch-staff-column-headings > td, [data-mce-si-staff-heading] > td) :is(strong, b) {
    font-weight: inherit;
}
.ch-staff-list .ch-staff-section td p { margin: 0 0 5px; }
.ch-staff-list .ch-staff-section td p:last-child { margin-bottom: 0; }
.ch-staff-list .ch-staff-details:has(table) { overflow-x: auto; }
