
/* Table Container for horizontal scroll */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Main Table Styles */
.cms-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 600px;
    font-family: Arial, sans-serif;
}

/* Caption Styles */
.cms-table caption {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
    padding: 10px 0;
    color: #003A5D;
    caption-side: top;
}

/* Cell Styles */
.cms-table th,
.cms-table td {
    border: 1px solid #4D5152;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

/* All th elements get blue background */
.cms-table th {
    background-color: #0066CC;
    color: #FFFFFF;
    font-weight: bold;
}

/* Column headers specific styling */
.cms-table thead th {
    text-align: center;
    min-width: 80px;
}

/* Row headers specific styling */
.cms-table tbody th {
    background-color: #C7C8CA;
    color: #4D5152;
    font-weight: bold;
    white-space: nowrap;
}

/* Data cells */
.cms-table tbody td {
    background-color: #FFFFFF;
}

/* Second column width constraint */
.cms-table tbody td:nth-child(2) {
    max-width: 300px;
}

/* Center align data cells except second column */
.cms-table tbody td {
    text-align: center;
    font-size: 0.9em;
}

/* Abbreviation styles */
.cms-table abbr {
    text-decoration: none;
    border-bottom: 1px dotted #4D5152;
    cursor: help;
}

/* Hover effects */
.cms-table tbody tr:hover {
    background-color: #C7C8CA;
}

.cms-table tbody tr:hover th {
    background-color: #4D5152;
    color: #FFFFFF;
}

.cms-table tbody tr:hover td {
    background-color: #C7C8CA;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cms-table {
        font-size: 0.8em;
    }
    
    .cms-table th,
    .cms-table td {
        padding: 4px;
    }
}
		
<!-- CSS for cards -->
/* Card view transformation at 765px and below */
@media (max-width: 765px) {
    /* Card view base styles */
    .cms-table {
        display: block;
        border: none;
        min-width: unset;
    }

    .cms-table caption {
        display: block;
        margin-bottom: 20px;
    }

    /* Hide thead in card view */
    .cms-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Card container */
    .cms-table tbody {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        padding: 0;
    }

    /* Each row becomes a card */
    .cms-table tbody tr {
        display: block;
        background: white;
        border: 1px solid #C7C8CA;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 0;
        margin: 0;
        flex: 1 1 100%;
        max-width: 400px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .cms-table tbody tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        background-color: white;
    }

    /* Card styles when table HAS row headers */
    .cms-table.has-row-headers tbody th[scope="row"] {
        display: block;
        background-color: #0066CC;
        color: white;
        padding: 12px 16px;
        margin: 0;
        border: none;
        border-radius: 8px 8px 0 0;
        font-size: 1em;
        text-align: left;
        white-space: normal;
        position: relative;
        padding-left: 45%;
    }

    /* Add label for row headers */
    .cms-table.has-row-headers tbody th[scope="row"]::before {
        content: attr(data-label) ":";
        position: absolute;
        left: 16px;
        top: 12px;
        font-weight: bold;
        width: 40%;
        text-align: left;
    }

    .cms-table.has-row-headers tbody tr:hover th[scope="row"] {
        background-color: #0066CC;
        color: white;
    }

    /* Regular cells in tables WITH row headers */
    .cms-table.has-row-headers tbody td {
        display: block;
        border: none;
        border-bottom: 1px solid #E0E0E0;
        padding: 12px 16px;
        text-align: left !important;
        font-size: 1em !important; /* Normalize font size */
        max-width: none;
        background-color: white;
        position: relative;
        padding-left: 45%;
        min-height: 44px;
    }

    .cms-table.has-row-headers tbody td:last-child {
        border-bottom: none;
    }

    .cms-table.has-row-headers tbody td::before {
        content: attr(data-label) ":";
        position: absolute;
        left: 16px;
        top: 12px;
        width: 40%;
        font-weight: bold;
        color: #4D5152;
        text-align: left;
    }

    /* Card styles when table has NO row headers */
    .cms-table:not(.has-row-headers) tbody th,
    .cms-table:not(.has-row-headers) tbody td {
        display: block;
        border: none;
        border-bottom: 1px solid #E0E0E0;
        padding: 12px 16px;
        text-align: left !important;
        font-size: 1em !important; /* Normalize font size */
        max-width: none;
        background-color: white;
        position: relative;
        padding-left: 45%;
        min-height: 44px;
    }

    .cms-table:not(.has-row-headers) tbody th:first-child,
    .cms-table:not(.has-row-headers) tbody td:first-child {
        padding-top: 16px;
    }

    .cms-table:not(.has-row-headers) tbody th:last-child,
    .cms-table:not(.has-row-headers) tbody td:last-child {
        border-bottom: none;
        padding-bottom: 16px;
    }

    .cms-table:not(.has-row-headers) tbody th::before,
    .cms-table:not(.has-row-headers) tbody td::before {
        content: attr(data-label) ":";
        position: absolute;
        left: 16px;
        top: 12px;
        width: 40%;
        font-weight: bold;
        color: #4D5152;
        text-align: left;
    }

    /* Special styling for first cell when no row headers */
    .cms-table:not(.has-row-headers) tbody td:first-child::before,
    .cms-table:not(.has-row-headers) tbody th:first-child::before {
        color: #003A5D;
    }

    /* Ensure hover states work properly */
    .cms-table tbody tr:hover td,
    .cms-table tbody tr:hover th:not([scope="row"]) {
        background-color: white;
    }

    /* Handle empty cells */
    .cms-table tbody td:empty::after {
        content: "—";
        color: #C7C8CA;
    }

    /* Ensure abbr elements remain visible */
    .cms-table abbr {
        text-decoration: none;
        border-bottom: 1px dotted #4D5152;
        cursor: help;
    }
}