/* Single Meetings Documents table (DataTables). Loaded only by _MeetingsDocumentsTable. */

.cdx-md-table {
    width: 100%;
}

.cdx-md-table thead,
.cdx-md-table thead tr,
.cdx-md-table thead th,
table.dataTable.cdx-md-table > thead > tr > th {
    background-color: #e6e7e8 !important;
    color: #545454;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.cdx-md-table td {
    color: #545454;
    vertical-align: middle;
}

.cdx-md-table tbody tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.cdx-md-table tbody tr:hover td {
    background-color: #f2f7fb;
}

.cdx-md-table .cdx-md-item,
.cdx-md-table .cdx-md-date {
    white-space: nowrap;
}

/* DataTables right-aligns numeric columns: Item and date read better from the start. */
table.dataTable.cdx-md-table th.dt-type-numeric,
table.dataTable.cdx-md-table td.dt-type-numeric {
    text-align: start;
}

table.dataTable.cdx-md-table th.dt-type-numeric .dt-column-header {
    flex-direction: row;
}

.cdx-md-table .cdx-md-lang {
    width: 2.75rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.cdx-md-table .cdx-md-file {
    max-height: 35px;
}

.cdx-md-table .cdx-md-outdated {
    color: #b35c00;
}

.cdx-md-table .cdx-md-zip td {
    border-bottom: 0;
}

.cdx-md-table .cdx-md-versions-toggle {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.cdx-md-versions-row > td {
    background: #f7f7f7;
}

.cdx-md-versions .cdx-md-versions-lang {
    display: inline-block;
    min-width: 2rem;
    font-weight: 600;
}

/* Below xl the rows become cards: one line per column, with its name in front. */
@media (max-width: 1199.98px) {
    .cdx-md-table thead {
        display: none;
    }

    /* Flex keeps the zip footer after the rows: as blocks they would follow the markup,
       where tfoot comes first. */
    .cdx-md-table {
        display: flex;
        flex-direction: column;
        width: 100% !important;
    }

    .cdx-md-table tbody {
        order: 1;
    }

    .cdx-md-table tfoot {
        order: 2;
    }

    .cdx-md-table tbody,
    .cdx-md-table tfoot,
    .cdx-md-table tr {
        display: block;
        width: 100%;
    }

    .cdx-md-table tr {
        border-bottom: 1px solid #dee2e6;
        padding: 0.5rem 0;
    }

    table.dataTable.cdx-md-table td {
        display: block;
        border: 0;
        padding: 0.25rem 0.5rem;
        text-align: start;
    }

    .cdx-md-table td[data-label]:not([data-label=""])::before {
        content: attr(data-label) ": ";
        font-weight: 600;
    }

    /* The languages sit side by side, each with its code. */
    table.dataTable.cdx-md-table td.cdx-md-lang {
        display: inline-block;
        width: auto;
    }

    table.dataTable.cdx-md-table td.cdx-md-empty {
        display: none;
    }
}
