/* Responsive Table Styles */
.table-responsive {
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for touch devices */
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Prevent columns from expanding beyond the screen */
}

.table-responsive th, .table-responsive td {
    text-align: left;
    padding: 0.25rem;
    word-wrap: break-word; /* Allow text to wrap within cells */
    overflow: hidden; /* Prevent content from overflowing */
}

.table-responsive th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-responsive td {
    font-size: 0.9rem;
}

/* Add alternating row colors */
.table-responsive tr:nth-child(odd) {
    background-color: #e7e7e7; /* Light gray for odd rows */
}

.table-responsive tr:nth-child(even) {
    background-color: #ffffff; /* White for even rows */
}

@media (max-width: 768px) {
    .table-responsive th, .table-responsive td {
        white-space: normal; /* Allow text to wrap */
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .table-responsive td {
        display: block;
        text-align: right;
        border: none;
        position: relative;
        padding-left: 35%; /* Adjust padding to match the new width of td:before */
    }

    .table-responsive td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 30%; /* Set width smaller than 50% */
        padding-left: 0.75rem;
        font-weight: 600;
        text-align: left;
        color: #6c757d;
    }

    .table-responsive tr {
        display: block;
        padding-bottom: 1rem;
        border-bottom: 1px solid #dee2e6;
    }

    .table-responsive th {
        display: none;
    }

    /* Ensure alternating row colors are visible in mobile view */
    .table-responsive tr:nth-child(odd) {
        background-color: #f9f9f9; /* Light gray for odd rows */
    }

    .table-responsive tr:nth-child(even) {
        background-color: #ffffff; /* White for even rows */
    }
}