/* Table responsive style class */
table.table-responsive {
    border-collapse: collapse;
}

table.table-responsive th {
    background-color: #4f832f;
    color: white;
}

html[lang="en"] table.table-responsive th,
html[lang="en"] table.table-responsive td {
    border: 1px solid #eeeeee;
    padding: 0.75rem 0.75rem;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: keep-all;
    white-space: normal;
}

html[lang="zh-hk"] table.table-responsive th,
html[lang="zh-hk"] table.table-responsive td,
html[lang="zh-cn"] table.table-responsive th,
html[lang="zh-cn"] table.table-responsive td {
    border: 1px solid #eeeeee;
    padding: 0.75rem 0.75rem;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

table.table-responsive th {
    text-align: center;
}

table.table-responsive tbody tr:nth-child(odd) {
    background-color: #e2efd9;
}

table.table-responsive tbody tr:nth-child(even) {
    background-color: white;
}

table.table-responsive tbody tr:nth-child(odd) td {
    background-color: #e2efd9;
}

table.table-responsive tbody tr:nth-child(even) td {
    background-color: white;
}

table.table-responsive tr td a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}


@media screen and (max-width: 767.98px) {

    /* English only: first column (NGO) – break at natural word boundaries, not mid-word */
    html[lang="en"] table.table-responsive th:first-child,
    html[lang="en"] table.table-responsive td:first-child,
    html[lang="en"] table.table-responsive th:nth-child(2),
    html[lang="en"] table.table-responsive td:nth-child(2) {
        word-break: normal;
        overflow-wrap: break-word;
    }

    html[lang="en"] .table-responsive {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html[lang="en"] .table-responsive .table {
        width: 100% !important;
        min-width: 600px !important;
        margin-bottom: 0 !important;
    }

    html[lang="en"] .table-responsive .table th,
    html[lang="en"] .table-responsive .table td {
        white-space: nowrap !important;
        word-wrap: normal;
        overflow-wrap: break-word;
        word-break: break-word;
    }


    /* Ensure table-responsive containers are horizontally scrollable on mobile */
    .table-responsive {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Ensure table maintains its width and doesn't shrink */
    .table-responsive .table {
        width: 100% !important;
        min-width: 600px !important;
        margin-bottom: 0 !important;
    }

    /* Prevent table cells from wrapping on mobile */
    .table-responsive .table th,
    .table-responsive .table td {
        white-space: nowrap !important;
        word-wrap: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    html[lang="zh-hk"] table.table-responsive th:first-child,
    html[lang="zh-cn"] table.table-responsive th:first-child {
        min-width: 10em !important;
    }

    html[lang="zh-hk"] table.table-responsive th:nth-child(2),
    html[lang="zh-cn"] table.table-responsive th:nth-child(2) {
        min-width: 6em !important;
    }

    html[lang="en"] table.table-responsive th:nth-child(2) {
        min-width: 8em !important;
    }

    html[lang="zh-hk"] table.table-responsive th:nth-child(3),
    html[lang="zh-cn"] table.table-responsive th:nth-child(3) {
        min-width: 10em !important;
    }

    html[lang="en"] table.table-responsive th:nth-child(3) {
        min-width: 10em !important;
    }
    html[lang="en"] table.table-responsive th:nth-child(4) {
        min-width: 20em !important;
    }

    html[lang="en"] table.table-responsive th:nth-child(5),
    html[lang="zh-hk"] table.table-responsive th:nth-child(5),
    html[lang="zh-cn"] table.table-responsive th:nth-child(5) {
        min-width: 15em !important;
    }


}