/* remove border from figure element */
figure.wp-block-table {
    border: 0 !important;   /* overwrite Gutenberg style */
    margin-bottom: 1em;
}
/* set border to table element */
.wp-block-table table {
    border-collapse: initial;
    border: 1px solid #ccc;
    margin-bottom: 0;

    text-align: center;   /* center columns by default (can be overwritten in Gutenberg alignment setting) */
    font-size: .85em;
}
/* change row stripes background color */
.wp-block-table.is-style-stripes tbody tr:nth-child(2n+1) {
    background-color: #f2f2f2;
}

/* wrap table into separate boxes for each row */
@media screen and (max-width: 600px) {

    /* remove global table border (show rows as separate boxes) */
    .wp-block-table table {
        border: 0;
    }

    /* hide default table header */
    .wp-block-table table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    /* table row/box styling */
    .wp-block-table table tr {
        display: block;
        padding: .35em;
        border: 1px solid #ddd;
        border-bottom: 3px solid #ddd;
        margin-bottom: .625em;
    }

    /* table data cell styling */
    .wp-block-table table td {
        display: block;
        padding: 8px;
        font-size: .8em;
        text-align: right !important;               /* overwrite Gutenberg style */
        border-top: 0;
        border-bottom: 1px solid #ddd !important;   /* overwrite Gutenberg style */
    }
    /* insert row description from data attribute */
    .wp-block-table table td:before {
        float: left;
        content: attr(data-label);
        font-weight: bold;
    }
    /* remove bottom border from last element  */
    .wp-block-table table td:last-child {
        border-bottom: 0 !important;                /* overwrite Gutenberg style */
    }
}