
/* ===========================
   Material テーマのテーブルヘッダー色上書き
   最高優先度でテーブルヘッダーを確実に白色に
   =========================== */
.md-content .md-typeset table th,
.md-content table th,
main .md-typeset table th,
main table th {
  color: #ffffff !important;
  border: 2px solid #d0d0d0 !important;
}

tbody tr th {
  color: #ffffff !important;
  border: 2px solid #d0d0d0 !important;
}

/* ===========================
   テーブルスタイル(色付け)
   =========================== */
.md-typeset table {
  margin: 1.5rem 0;
}

/* ==========================================
   HTML テーブル用スタイル（スクリプト生成）
   Material テーマのセレクタを確実に上書き
   ========================================== */

/* Material テーマのスクロール要素 */
.md-typeset__table {
  color: #000000 !important;
}

.md-typeset__table table,
.md-typeset_table table,
div.md-typeset > table,
div.md-typeset > .styled-table,
.md-content > table,
.md-content > .styled-table,
main table,
main .styled-table,
.styled-table,
table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 1.5rem 0 !important;
  font-size: 0.75rem !important;
  line-height: 1.6 !important;
  border: 2px solid #d0d0d0 !important;
  background-color: #9d9a9a !important;
  color: #1c1c1c !important;
}

.styled-table thead,
.md-typeset__table table thead,
.md-typeset_table table thead,
table thead,
div.md-typeset table thead,
main table thead {
  background-color: #00b894 !important;
  color: #ffffff !important;
}

.styled-table thead tr,
.md-typeset__table table thead tr,
.md-typeset_table table thead tr,
table thead tr,
div.md-typeset table thead tr,
main table thead tr {
  background-color: #00b894 !important;
  color: #ffffff !important;
}

/* Material テーマの色指定をオーバーライド - ヘッダーを青背景に白テキスト */
.styled-table thead th,
.styled-table thead tr th,
.md-typeset__table table thead th,
.md-typeset__table table thead tr th,
.md-typeset_table table thead th,
.md-typeset_table table thead tr th,
table thead th,
table thead tr th,
div.md-typeset table thead th,
div.md-typeset table thead tr th,
main table thead th,
main table thead tr th,
.md-typeset .styled-table thead th,
.md-typeset .styled-table thead tr th,
.md-typeset .styled-table table thead tr th,
.md-typeset table.styled-table thead tr th,
th,
thead th,
thead tr th {
  background-color: #00b894 !important;
  color: #ffffff !important;
  font-weight: bold !important;
  padding: 14px 16px !important;
  text-align: left !important;
  border: 2px solid #d0d0d0 !important;
  vertical-align: middle !important;
}


.styled-table tbody tr,
table tbody tr,
div.md-typeset table tbody tr,
main table tbody tr,
.md-typeset__table table tbody tr,
.md-typeset_table table tbody tr {
  background-color: #fafafa !important;
  transition: background-color 0.15s ease !important;
  color: #000000 !important;
}

/* 奇数行に薄いグレー背景（ストライプ）*/
.styled-table tbody tr:nth-child(odd),
table tbody tr:nth-child(odd),
div.md-typeset table tbody tr:nth-child(odd),
main table tbody tr:nth-child(odd),
.md-typeset__table table tbody tr:nth-child(odd),
.md-typeset_table table tbody tr:nth-child(odd) {
  background-color: #f5f5f5 !important;
  color: #000000 !important;
}

/* 偶数行は白 */
.styled-table tbody tr:nth-child(even),
table tbody tr:nth-child(even),
div.md-typeset table tbody tr:nth-child(even),
main table tbody tr:nth-child(even),
.md-typeset__table table tbody tr:nth-child(even),
.md-typeset_table table tbody tr:nth-child(even) {
  background-color: #fafafa !important;
  color: #000000 !important;
}

/* ホバー時は薄い上色背景 */
.styled-table tbody tr:hover,
table tbody tr:hover,
div.md-typeset table tbody tr:hover,
main table tbody tr:hover,
.md-typeset__table table tbody tr:hover,
.md-typeset_table table tbody tr:hover {
  background-color: #f0f0f0 !important;
  color: #000000 !important;
}

.styled-table tbody tr td,
table tbody tr td,
div.md-typeset table tbody tr td,
main table tbody tr td,
.md-typeset__table table tbody tr td,
.md-typeset_table table tbody tr td,
.md-typeset .styled-table tbody tr td,
table td,
td {
  padding: 14px 16px !important;
  border: 1px solid #999999 !important;
  text-align: left !important;
  vertical-align: top !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  color: #000000 !important;
  background-color: #ffffff !important;
}

/* ===========================
   Material テーマの CSS 変数上書き
   =========================== */
:root {
  --md-code-bg-color: #f5f5f5;
  --md-table-color: #000000;
  --md-table-hover-color: rgba(0, 0, 0, 0.035);
}

/* Material テーマのスクロール設定を調整 */
.md-typeset__scrollwrap {
  overflow-y: visible !important;
}
