/*
 * Tables inside rich text. Load AFTER style.css:
 * <link rel="stylesheet" href="text-tables.css">
 * No extra wrappers or JavaScript required.
 */

.text {
    /* Allow the text block to shrink inside flex/grid layouts. */
    min-width: 0;
}

.text table {
    /* The table itself contains overflow; surrounding text never scrolls. */
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 24px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: 1px solid #454545;
    border-collapse: collapse;
    border-spacing: 0;
    background: #272727;
    color: #d6d6d6;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: #b19777 #323232;
}

.text table caption {
    padding: 12px 16px;
    color: #d6d6d6;
    font-size: inherit;
    text-align: left;
    caption-side: top;
}

.text table tr {
    border: 0;
    padding: 0;
}

.text table th,
.text table td {
    /* Equal column shares fill short tables; wide tables remain scrollable. */
    width: 1%;
    min-width: 160px;
    padding: 14px 18px;
    border: 1px solid #454545;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
}

.text table th {
    background: #323232;
    color: #b19777;
    font-weight: 600;
}

.text table tbody tr:nth-child(even) td {
    background: #2d2d2d;
}

.text table tfoot th,
.text table tfoot td {
    background: #323232;
    font-weight: 600;
}

.text table td > :last-child,
.text table th > :last-child {
    margin-bottom: 0;
}

.text table p {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.text table a {
    display: inline;
    color: #b19777;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.text table a:hover {
    color: #fff;
}

.text table:focus-visible,
.text table a:focus-visible {
    outline: 2px solid #b19777;
    outline-offset: -3px;
}

@media screen and (max-width: 767px) {
    .text table {
        margin: 20px 0;
        font-size: 14px;
    }

    .text table th,
    .text table td {
        min-width: 140px;
        padding: 12px;
    }

    .text table caption {
        padding: 12px;
    }
}

@media print {
    .text table {
        display: table;
        overflow: visible;
        background: #fff;
        color: #000;
        font-size: 10pt;
    }

    .text table th,
    .text table td,
    .text table tbody tr:nth-child(even) td,
    .text table tfoot th,
    .text table tfoot td {
        min-width: 0;
        padding: 6pt;
        border-color: #999;
        background: #fff;
        color: #000;
    }

    .text table caption,
    .text table a {
        color: #000;
    }
}
