.wp-block-table.sticky-first-column td:nth-child(1),
.wp-block-table.sticky-first-column th:nth-child(1),
.wp-block-table.sticky-first-column figcaption {
    position: sticky;
    left: 0;
    z-index: 5;
}
.wp-block-table.sticky-first-column figcaption {
    width: 95% !important;
}
.wp-block-table.sticky-first-column.scrolled td:nth-child(1)::after,
.wp-block-table.sticky-first-column.scrolled th:nth-child(1)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    pointer-events: none;
    box-shadow: 10px 0 20px rgba(90, 57, 57, 0.4);
    clip-path: inset(0 -30px 0 0);
}

.wp-block-table.sticky-first-column table {
    display: table !important;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td {
    background-color: #f0f0f0 !important;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(even) td {
    background-color: #ffffff !important;
}

.wp-block-table {
    overflow: auto;
}
.wp-block-table td,
.wp-block-table th {
    width: 140px;
}

/* add buttons */
.scrollable-table-button-wrapper {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    justify-content: space-between;
    z-index: 6;
}
.scrollable-table-button-wrapper:has(button:not(.is-disabled)) {
    display: flex;
}
.scrollable-table-button-left,
.scrollable-table-button-right {
    position: relative;
    border-radius: 9999px;
    background-color: #fff;
    width: 38px;
    height: 38px;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    filter: drop-shadow(2px 3px 7px rgba(36, 36, 36, 0.2));
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

.scrollable-table-button-left:not(.is-disabled),
.scrollable-table-button-right:not(.is-disabled) {
    opacity: 1;
    pointer-events: auto;
}

.scrollable-table-button-left::after,
.scrollable-table-button-right::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='currentColor' focusable='false' role='img' aria-hidden='true' data-testid='icon'%3E%3Ctitle%3E%3C/title%3E%3Cpath d='M10.0004 19.1004L8.90039 18.0004L14.9004 12.0004L8.90039 6.00039L10.0004 4.90039L17.1004 12.0004L10.0004 19.1004Z'%3E%3C/path%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='currentColor' focusable='false' role='img' aria-hidden='true' data-testid='icon'%3E%3Ctitle%3E%3C/title%3E%3Cpath d='M10.0004 19.1004L8.90039 18.0004L14.9004 12.0004L8.90039 6.00039L10.0004 4.90039L17.1004 12.0004L10.0004 19.1004Z'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: var(--wp--preset--color--monza);
    transition: background-color 0.3s ease;
}

.scrollable-table-button-left::after {
    transform: translate(calc(-50% - 1px), -50%) rotate(-180deg);
}

.scrollable-table-button-right::after {
    transform: translate(calc(-50% + 1px), -50%);
}

.scrollable-table-button-left:hover::after,
.scrollable-table-button-right:hover::after {
    background-color: var(--wp--preset--color--monza-dark);
}
