/**
 * Theme Name: Blocksy Child
 * Description: Designed by SC-ICG.
 * Author: SC-ICG
 * Template: blocksy
 * Text Domain: blocksy
 */

/* 秒站文章表格樣式 v1.1 (2026-04-19) */
/* 使用方式：整份貼到 WP 後台的外觀 自訂 其他 CSS或主題 CSS */
/* Part A：所有表格的基礎美化（自動套用） */
/* Part B：比較型表格的秒站欄強調（只套在加了 sc-compare class 的表格） */
/* 如何標記比較型：Gutenberg 編輯器選中表格，進階面板的附加 CSS 類別填入 sc-compare */


/* === PART A 基礎美化（所有表格自動套用） === */

/* 表格外框 */
body .entry-content table,
body .wp-block-table table,
body figure.wp-block-table table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(40,51,59,.12) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(40,51,59,.05) !important;
  margin: 24px 0 32px !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  color: #333333 !important;
  background: #FFFFFF !important;
}

/* 表頭：統一深藍底、白字、置中、白色分隔線 */
body .entry-content table th,
body .entry-content table thead th,
body .wp-block-table table th,
body .wp-block-table table thead th,
body figure.wp-block-table table th,
body figure.wp-block-table table thead th,
body .entry-content table tr:first-child th,
body .wp-block-table table tr:first-child th {
  background: #28333B !important;
  background-color: #28333B !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: .3px;
  padding: 14px 16px !important;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,.15) !important;
  text-align: center !important;
}

/* 表頭最後一欄不畫右框（避免與表格外框重疊） */
body .entry-content table th:last-child,
body .wp-block-table table th:last-child,
body figure.wp-block-table table th:last-child {
  border-right: none !important;
}

/* 表身 cell：置中、格線、底色 */
body .entry-content table tbody td,
body .wp-block-table table tbody td,
body figure.wp-block-table table tbody td {
  padding: 12px 16px !important;
  border: none !important;
  border-right: 1px solid rgba(40,51,59,.12) !important;
  border-bottom: 1px solid rgba(40,51,59,.12) !important;
  vertical-align: middle !important;
  text-align: center !important;
  background: transparent !important;
  background-color: transparent !important;
  transition: background .12s;
}

/* 最後一欄不畫右框；最後一列不畫下框（避免與表格外框重疊） */
body .entry-content table tbody td:last-child,
body .wp-block-table table tbody td:last-child,
body figure.wp-block-table table tbody td:last-child {
  border-right: none !important;
}
body .entry-content table tbody tr:last-child td,
body .wp-block-table table tbody tr:last-child td,
body figure.wp-block-table table tbody tr:last-child td {
  border-bottom: none !important;
}

/* 斑馬紋 */
body .entry-content table tbody tr:nth-child(even) td,
body .wp-block-table table tbody tr:nth-child(even) td {
  background: rgba(40,51,59,.02) !important;
  background-color: rgba(40,51,59,.02) !important;
}

/* 整行 hover */
body .entry-content table tbody tr:hover td,
body .wp-block-table table tbody tr:hover td {
  background: rgba(10,110,177,.04) !important;
  background-color: rgba(10,110,177,.04) !important;
}

/* 第一欄描述欄：加粗（文字已由表身規則置中） */
body .entry-content table tbody td:first-child,
body .wp-block-table table tbody td:first-child {
  font-weight: 600 !important;
  color: #28333B !important;
}

/* 強調 strong */
body .entry-content table tbody tr td strong,
body .wp-block-table table tbody tr td strong {
  color: #28333B !important;
  font-weight: 800 !important;
}

/* 表格內連結 */
body .entry-content table a,
body .wp-block-table table a {
  color: #0A6EB1 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: opacity .15s;
}
body .entry-content table a:hover,
body .wp-block-table table a:hover {
  opacity: .7;
}

/* 手機版橫向滾動 */
@media (max-width: 767px) {
  body .entry-content .wp-block-table,
  body .entry-content figure.wp-block-table,
  body .wp-block-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  body .entry-content table,
  body .wp-block-table table {
    min-width: 640px !important;
    font-size: 13px !important;
    margin: 16px 0 24px !important;
  }
  body .entry-content table th,
  body .entry-content table thead th,
  body .wp-block-table table th,
  body .wp-block-table table thead th {
    padding: 12px 12px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  body .entry-content table tbody td,
  body .wp-block-table table tbody td {
    padding: 10px 12px !important;
  }
}


/* === PART B 比較型表格強調（只套在 sc-compare class 的表格） === */

/* 第二欄表頭：秒站藍 */
body figure.wp-block-table.sc-compare table th:nth-child(2),
body figure.wp-block-table.sc-compare table thead th:nth-child(2),
body .wp-block-table.sc-compare table th:nth-child(2),
body .wp-block-table.sc-compare table thead th:nth-child(2),
body table.sc-compare th:nth-child(2),
body table.sc-compare thead th:nth-child(2) {
  background: #0A6EB1 !important;
  background-color: #0A6EB1 !important;
  text-align: center !important;
}

/* 第二欄 body：藍底、置中、秒站藍文字、加粗 */
body figure.wp-block-table.sc-compare table tbody td:nth-child(2),
body .wp-block-table.sc-compare table tbody td:nth-child(2),
body table.sc-compare tbody td:nth-child(2) {
  background: rgba(10,110,177,.08) !important;
  background-color: rgba(10,110,177,.08) !important;
  text-align: center !important;
  color: #0A6EB1 !important;
  font-weight: 500 !important;
}

/* 第二欄 strong 文字更深更粗 */
body figure.wp-block-table.sc-compare table tbody td:nth-child(2) strong,
body .wp-block-table.sc-compare table tbody td:nth-child(2) strong,
body table.sc-compare tbody td:nth-child(2) strong {
  color: #0A6EB1 !important;
  font-weight: 800 !important;
}

/* 第二欄 hover 加深 */
body figure.wp-block-table.sc-compare table tbody tr:hover td:nth-child(2),
body .wp-block-table.sc-compare table tbody tr:hover td:nth-child(2),
body table.sc-compare tbody tr:hover td:nth-child(2) {
  background: rgba(10,110,177,.14) !important;
  background-color: rgba(10,110,177,.14) !important;
}

/* 第二欄斑馬紋疊加 */
body figure.wp-block-table.sc-compare table tbody tr:nth-child(even) td:nth-child(2),
body .wp-block-table.sc-compare table tbody tr:nth-child(even) td:nth-child(2),
body table.sc-compare tbody tr:nth-child(even) td:nth-child(2) {
  background: rgba(10,110,177,.11) !important;
  background-color: rgba(10,110,177,.11) !important;
}
