/* Ensure the front-end uses the same styles as the editor */
.custom-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on mobile devices */
}

.custom-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px; /* Set font size to 16px */
}

.custom-table th, .custom-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.custom-table th {
    background-color: #f4f4f4;
}

.custom-table td {
    background-color: #fff;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .custom-table table,
    .custom-table thead,
    .custom-table tbody,
    .custom-table th,
    .custom-table td,
    .custom-table tr {
        display: block;
    }

    .custom-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .custom-table tr {
        border: 1px solid #ccc;
        margin-bottom: 5px;
    }

    .custom-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        white-space: pre-wrap; /* Make text wrap */
    }

    .custom-table td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: calc(50% - 12px); /* Adjust to account for padding */
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        content: attr(data-label);
    }
}
