.wp-block-table tbody,
.wp-block-table td,
.wp-block-table tfoot,
.wp-block-table th,
.wp-block-table thead,
.wp-block-table tr {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

.wp-block-table th {
    text-align: inherit;
}

.wp-block-table > table {
    --table-color-type: initial;
    --table-bg-type: initial;
    --table-color-state: initial;
    --table-bg-state: initial;
    --table-color: var(--wp--preset--color--contrast);
    --table-bg: var(--wp--preset--color--base);
    --table-border-color: var(--wp--preset--color--borders);
    --table-padding: .5rem;
    --table-accent-bg: transparent;
    --table-striped-color: #000;
    --table-striped-bg: rgba(0,0,0, 0.05);

    border-color: var(--table-border-color);
}

.wp-block-table > table > :not(caption) > * > * {
    padding: var(--table-padding) var(--table-padding);
    color:  var(--table-color-state, var(--table-color-type, var(--table-color)));
    background-color: var(--table-bg);
    border-bottom-width: var(--wp--custom--border--width);
    box-shadow: inset 0 0 0 9999px var(--table-bg-state, var(--table-bg-type, var(--table-accent-bg)));
}

.wp-block-table > table > thead {
    vertical-align: bottom;
}

.wp-block-table .wp-element-caption {
    padding-top: .5rem;
    padding-bottom: .5rem;
    color: var(--wp--preset--color--secondary);
    text-align: left;
}

/* Custom Style Options */
.wp-block-table.is-style-table-striped-rows table>tbody>tr:nth-of-type(odd)>* {
    --table-color-type: var(--table-striped-color);
    --table-bg-type: var(--table-striped-bg);
}

.wp-block-table.is-style-table-striped-columns table>:not(caption)>tr>:nth-child(2n) {
    --table-color-type: var(--table-striped-color);
    --table-bg-type: var(--table-striped-bg);
}

.wp-block-table.is-style-table-bordered table>:not(caption)>* {
    border-width: var(--wp--custom--border--width) 0;
}

.wp-block-table.is-style-table-bordered table>:not(caption)>*>* {
    border-width: 0 var(--wp--custom--border--width);
}

.wp-block-table.is-style-table-borderless table>:not(caption)>*>* {
    border-bottom-width: 0;
}

.wp-block-table.is-style-table-borderless table>:not(:first-child) {
    border-top-width: 0;
}

.wp-block-table.is-style-table-compact table>:not(caption)>*>* {
    padding: calc(var(--table-padding)/2) calc(var(--table-padding)/2);
}

.wp-block-table.is-style-table-heading-divider table tbody {
    border-top: calc(var(--wp--custom--border--width) * 2) solid currentcolor;
}

.wp-block-table.is-style-table-heading-bar table thead {
    --table-color: #fff;
    --table-bg: #212529;
    --table-border-color: #4d5154;
    --table-striped-bg: #2c3034;
    --table-striped-color: #fff;
    --table-active-bg: #373b3e;
    --table-active-color: #fff;
    --table-hover-bg: #323539;
    --table-hover-color: #fff;

    color: var(--table-color);
    border-color: var(--table-border-color);
}


/* Default WP Styles */
.wp-block-table {
    overflow-x: auto;
}

.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table .has-fixed-layout {
    table-layout: fixed;
    width: 100%;
}

.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th {
    word-break: break-word;
}

.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright {
    display: table;
    width: auto;
}

.wp-block-table.aligncenter td,
.wp-block-table.aligncenter th,
.wp-block-table.alignleft td,
.wp-block-table.alignleft th,
.wp-block-table.alignright td,
.wp-block-table.alignright th {
    word-break: break-word;
}