/* Tables in page, guide and blog text, site-wide (Tropical Andamans, 27 Nov 2026).
   Full grid lines in a rounded frame, a tinted header row, light zebra rows and a bold first column.
   On phones, tables with 4 or more columns keep a readable width and scroll sideways inside their frame.
   Covers the editor's table block (figure.wp-block-table) and plain tables placed straight in the article text.
   The legal pages keep their own table styles (assets/css/legal-pages.css in the theme). */

.wp-block-table {
    margin: 0 0 26px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #cfe0d8;
    border-radius: 10px;
    background: #fff;
}

.wp-block-table table,
.blgdsstlnewpgdtail-content > table,
.new-service-detail-content > table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.55;
    background: #fff;
}

/* Plain tables (not in a table block) get the frame on the table itself. */
.blgdsstlnewpgdtail-content > table,
.new-service-detail-content > table {
    margin: 0 0 26px;
    border: 1px solid #cfe0d8;
}

.wp-block-table table th,
.wp-block-table table td,
.blgdsstlnewpgdtail-content > table th,
.blgdsstlnewpgdtail-content > table td,
.new-service-detail-content > table th,
.new-service-detail-content > table td {
    padding: 10px 14px;
    border: 0;
    border-right: 1px solid #dbe7e1;
    border-bottom: 1px solid #dbe7e1;
    color: #3e4f4a;
    text-align: left;
    vertical-align: top;
    background: transparent;
}

.wp-block-table table tr > :last-child,
.blgdsstlnewpgdtail-content > table tr > :last-child,
.new-service-detail-content > table tr > :last-child { border-right: 0; }

.wp-block-table table tr:last-child > *,
.blgdsstlnewpgdtail-content > table tr:last-child > *,
.new-service-detail-content > table tr:last-child > * { border-bottom: 0; }

/* Header cells: the first row in these pages, and any row headers. */
.wp-block-table table th,
.wp-block-table table thead td,
.blgdsstlnewpgdtail-content > table th,
.new-service-detail-content > table th {
    background: #e7f3ee;
    color: #173b36;
    font-weight: 700;
    border-bottom-color: #c3dbd1;
}

/* Zebra rows: row 1 is the header, so rows 3, 5, 7... (every second data row) are tinted. */
.wp-block-table table tr:nth-child(odd) > td,
.blgdsstlnewpgdtail-content > table tr:nth-child(odd) > td,
.new-service-detail-content > table tr:nth-child(odd) > td { background: #f7fbf9; }

/* First column reads as the row label. */
.wp-block-table table td:first-child,
.blgdsstlnewpgdtail-content > table td:first-child,
.new-service-detail-content > table td:first-child { color: #173b36; font-weight: 600; }

.wp-block-table table p,
.blgdsstlnewpgdtail-content > table p,
.new-service-detail-content > table p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; }

.wp-block-table figcaption { margin: 0; padding: 8px 14px; border-top: 1px solid #dbe7e1; color: #6b7c76; font-size: 13px; text-align: left; }

@media (max-width: 767px) {
    .wp-block-table table,
    .blgdsstlnewpgdtail-content > table,
    .new-service-detail-content > table { font-size: 14px; line-height: 1.5; }

    .wp-block-table table th,
    .wp-block-table table td,
    .blgdsstlnewpgdtail-content > table th,
    .blgdsstlnewpgdtail-content > table td,
    .new-service-detail-content > table th,
    .new-service-detail-content > table td { padding: 9px 10px; }

    /* 4+ columns: keep columns readable and scroll sideways inside the frame instead of squeezing. */
    .wp-block-table table:has(tr > :nth-child(4)) { min-width: 600px; }
    .wp-block-table table:has(tr > :nth-child(6)) { min-width: 760px; }
}
