@charset "utf-8";
/* ==========================================================================
   全站表格样式（全局）  global-table.css
   位置：网站根目录（public/global-table.css） —— 多站点、城市分站共用同一份
   用途：文章/单页正文里的表格（富文本编辑器输出，带内联样式）统一美化
   说明：正文表格的内联样式优先级很高，这里统一用 !important 覆盖；
        只针对正文内容容器，不会影响主题里用作排版的表格
   ========================================================================== */

:root {
    --gt-border: #e5e9f0;       /* 外框线 */
    --gt-line: #eef1f6;         /* 行/列分隔线 */
    --gt-head-bg: #f4f7fb;      /* 表头背景 */
    --gt-strip-bg: #fafbfd;     /* 斑马纹 */
    --gt-hover-bg: #f4f8ff;     /* 悬停行 */
    --gt-head-text: #1f2d3d;    /* 表头文字 */
    --gt-text: #3d4a5c;         /* 单元格文字 */
}

/* ---------- 正文里的表格 ---------- */
.geo-article-body table,
.about-content table,
.article-content table,
.article_body table,
.detail-content table,
.news-content table,
.cms-content table,
.editor-content table,
.editor table,
.content-body table,
.text-content table,
article table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 18px 0 !important;
    border: 1px solid var(--gt-border) !important;
    border-radius: 10px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    table-layout: auto !important;
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: var(--gt-text) !important;
    box-shadow: 0 1px 2px rgba(16, 32, 64, .04) !important;
}

/* 表头 */
.geo-article-body table thead th,
.about-content table thead th,
.article-content table thead th,
.article_body table thead th,
.detail-content table thead th,
.news-content table thead th,
.cms-content table thead th,
.editor-content table thead th,
.editor table thead th,
.content-body table thead th,
.text-content table thead th,
article table thead th {
    background: var(--gt-head-bg) !important;
    color: var(--gt-head-text) !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 12px 15px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--gt-border) !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* 单元格 */
.geo-article-body table tbody td,
.about-content table tbody td,
.article-content table tbody td,
.article_body table tbody td,
.detail-content table tbody td,
.news-content table tbody td,
.cms-content table tbody td,
.editor-content table tbody td,
.editor table tbody td,
.content-body table tbody td,
.text-content table tbody td,
article table tbody td {
    padding: 12px 15px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--gt-line) !important;
    color: var(--gt-text) !important;
    vertical-align: top !important;
    text-align: left !important;
    word-break: break-word !important;
}

/* 单元格之间的竖线 */
.geo-article-body table th + th,
.geo-article-body table td + td,
.article-content table td + td,
.article_body table td + td,
.detail-content table td + td,
.news-content table td + td,
.editor-content table td + td,
article table td + td {
    border-left: 1px solid var(--gt-line) !important;
}

/* 斑马纹 + 悬停 */
.geo-article-body table tbody tr:nth-child(even) td,
.article-content table tbody tr:nth-child(even) td,
.article_body table tbody tr:nth-child(even) td,
.detail-content table tbody tr:nth-child(even) td,
.news-content table tbody tr:nth-child(even) td,
.editor-content table tbody tr:nth-child(even) td,
article table tbody tr:nth-child(even) td {
    background: var(--gt-strip-bg) !important;
}
.geo-article-body table tbody tr:hover td,
.article-content table tbody tr:hover td,
.article_body table tbody tr:hover td,
.detail-content table tbody tr:hover td,
.news-content table tbody tr:hover td,
.editor-content table tbody tr:hover td,
article table tbody tr:hover td {
    background: var(--gt-hover-bg) !important;
}

/* 最后一行不要多余下边线 */
.geo-article-body table tbody tr:last-child td,
.article-content table tbody tr:last-child td,
.article_body table tbody tr:last-child td,
.detail-content table tbody tr:last-child td,
.news-content table tbody tr:last-child td,
.editor-content table tbody tr:last-child td,
article table tbody tr:last-child td {
    border-bottom: 0 !important;
}

/* 第一列窄一点（常见“品类/名称 + 说明”结构），内容长也不挤 */
.geo-article-body table tbody td:first-child,
.article-content table tbody td:first-child,
.article_body table tbody td:first-child,
.detail-content table tbody td:first-child,
article table tbody td:first-child {
    white-space: nowrap !important;
    color: #1f2d3d !important;
    font-weight: 500 !important;
}

/* 表格里的链接 / 强调文字 */
.geo-article-body table a,
.article-content table a,
.article_body table a,
article table a {
    color: #2f7bf6 !important;
    text-decoration: none !important;
}
.geo-article-body table a:hover,
.article-content table a:hover,
.article_body table a:hover,
article table a:hover {
    text-decoration: underline !important;
}

/* 表格说明文字（表格后面的小字，如“数据以现场核验为准”） */
.geo-article-body table + p,
.article-content table + p,
.article_body table + p,
article table + p {
    margin-top: 8px !important;
    color: #8a97a8 !important;
    font-size: 13px !important;
}

/* ---------- 兜底：其它位置的表格至少有“表格”的样子（不动布局） ---------- */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ---------- 移动端：缩小内边距和字号，避免撑破内容宽度 ---------- */
@media (max-width: 768px) {
    .geo-article-body table,
    .about-content table,
    .article-content table,
    .article_body table,
    .detail-content table,
    .news-content table,
    .cms-content table,
    .editor-content table,
    .content-body table,
    .text-content table,
    article table {
        font-size: 13px !important;
        border-radius: 8px !important;
        margin: 14px 0 !important;
    }
    .geo-article-body table thead th,
    .article-content table thead th,
    .article_body table thead th,
    .detail-content table thead th,
    article table thead th {
        padding: 9px 10px !important;
        white-space: normal !important;
    }
    .geo-article-body table tbody td,
    .article-content table tbody td,
    .article_body table tbody td,
    .detail-content table tbody td,
    article table tbody td {
        padding: 9px 10px !important;
    }
    .geo-article-body table tbody td:first-child,
    .article-content table tbody td:first-child,
    article table tbody td:first-child {
        white-space: normal !important;
    }
}

/* ---------- 打印 ---------- */
@media print {
    .geo-article-body table,
    .article-content table,
    .article_body table,
    article table {
        box-shadow: none !important;
        font-size: 12px !important;
    }
}

/* ==========================================================================
   全局兜底：**没有 class 的正文表格也生效**（配合 /guanyuwomen/ 这类页面）
   判定（命中任一即可，不需要任何 class）：
     · table:has(> thead)           —— 带表头的表格（编辑器输出的基本都是这种）
     · table:has(tbody tr > th)     —— 表头直接写在 tbody 里的
     · table[border]:not([border="0"]) —— 老编辑器给的 border 属性
   排除：表格加 class="gt-off" 不美化；timeline / layui / role=presentation 的组件表格跳过
   :where() 内部是宽容列表，老浏览器不认 :has 时只忽略它自己，不会让整条规则失效
   ========================================================================== */

/* 表格本体 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
):not(.timeline):not([class*="layui"]):not([role="presentation"]) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 18px 0 !important;
    border: 1px solid var(--gt-border) !important;
    border-radius: 10px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    table-layout: auto !important;
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: var(--gt-text) !important;
    box-shadow: 0 1px 2px rgba(16, 32, 64, .04) !important;
}

/* 表头 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) thead th,
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) tbody th {
    background: var(--gt-head-bg) !important;
    color: var(--gt-head-text) !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 12px 15px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--gt-border) !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* 单元格 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) td {
    padding: 12px 15px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--gt-line) !important;
    color: var(--gt-text) !important;
    vertical-align: top !important;
    text-align: left !important;
    word-break: break-word !important;
}

/* 竖线 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) tr > * + * {
    border-left: 1px solid var(--gt-line) !important;
}

/* 斑马纹 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) tbody tr:nth-child(even) td {
    background: var(--gt-strip-bg) !important;
}

/* 悬停整行 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) tbody tr:hover td {
    background: var(--gt-hover-bg) !important;
}

/* 最后一行去掉多余下边线 + 第一列加深 */
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) tbody tr:last-child td {
    border-bottom: 0 !important;
}
:where(
    table:not(.gt-off):has(> thead),
    table:not(.gt-off):has(tbody tr > th),
    table[border]:not([border="0"]):not(.gt-off)
) tbody td:first-child {
    white-space: nowrap !important;
    color: #1f2d3d !important;
    font-weight: 500 !important;
}

/* 移动端 */
@media (max-width: 768px) {
    :where(
        table:not(.gt-off):has(> thead),
        table:not(.gt-off):has(tbody tr > th),
        table[border]:not([border="0"]):not(.gt-off)
    ) {
        font-size: 13px !important;
        border-radius: 8px !important;
        margin: 14px 0 !important;
    }
    :where(
        table:not(.gt-off):has(> thead),
        table:not(.gt-off):has(tbody tr > th),
        table[border]:not([border="0"]):not(.gt-off)
    ) th,
    :where(
        table:not(.gt-off):has(> thead),
        table:not(.gt-off):has(tbody tr > th),
        table[border]:not([border="0"]):not(.gt-off)
    ) td {
        padding: 9px 10px !important;
    }
    :where(
        table:not(.gt-off):has(> thead),
        table[border]:not([border="0"]):not(.gt-off)
    ) th,
    :where(
        table:not(.gt-off):has(> thead),
        table[border]:not([border="0"]):not(.gt-off)
    ) tbody td:first-child {
        white-space: normal !important;
    }
}
