/* responsive-tables.css */

@media (max-width: 768px) {
    /* Hide the original table headers on small screens */
    .datatable thead {
        display: none;
    }
    /* Style each table row as a card */
    .datatable tbody tr {
        display: block;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border-radius: 5px;
    }
    /* Ensure each cell behaves like a block element */
    .datatable td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    /* Label the data with a pseudo-element */
    .datatable td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
}