/* ===================================
   テーブル共通スタイル
   =================================== */

/* テーブル1列目：メインカラーの背景（特定ページを除外）
   除外: セミナーアーカイブ一覧 / page-id-831 / page-id-11179 / postid-12582 */
body:not(.post-type-archive-seminar-archive):not(.page-id-831):not(.page-id-11179):not(.postid-12582) td:first-child {
    background: var(--ark-color--main);
    color: #fff;
    font-weight: 500;
}

/* テーブル1列目：上記の指定を受けない行のリセット（背景色なし） */
td:first-child {
    background-color: var(--ark-color--bg) !important;
    color: var(--ark-color--text) !important;
    font-weight: 400 !important;
}

/* ブロックテーブルの外枠ボーダー */
.wp-block-table table {
    border: #ededed 2px solid;
}

/* ===================================
   SP時横スクロール（4列以上のテーブル）
   =================================== */
@media (max-width: 781px) {
    .wp-block-table:has(th:nth-child(4)) {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    .wp-block-table:has(th:nth-child(4)) table {
        width: max-content;
        min-width: 100%;
        border-collapse: collapse;
        table-layout: auto !important;
    }

    .wp-block-table:has(th:nth-child(4)) th,
    .wp-block-table:has(th:nth-child(4)) td {
        white-space: nowrap;
        padding: 8px 12px;
        text-align: left;
    }
}
