/* ============================================================
   Rich Table Cells – Frontend & Editor共通スタイル
   ============================================================ */

/* ---------- テキストサイズ ---------- */
.tcx-text-sm   { font-size: 0.85em; }
.tcx-text-md   { font-size: 1em; }
.tcx-text-lg   { font-size: 1.25em; }

/* ---------- テーブルセル内 HR ---------- */
.wp-block-table td span.tcx-hr,
.wp-block-table th span.tcx-hr {
	display: block;
	width: 100%;
	height: 0;
	border-top: 1px solid rgba(0,0,0,0.4);
	margin: 0.75em 0;
}

/* ---------- テーブルセル内 Spacer ---------- */
.wp-block-table td .tcx-spacer,
.wp-block-table th .tcx-spacer {
	display: block;
}

/* ---------- テーブルセル内 リスト ---------- */
.wp-block-table td ul.tcx-list,
.wp-block-table th ul.tcx-list {
	list-style-type: disc;
	padding-left: 1.4em;
	margin: 0.3em 0;
}

.wp-block-table td ol.tcx-list,
.wp-block-table th ol.tcx-list {
	list-style-type: decimal;
	padding-left: 1.4em;
	margin: 0.3em 0;
}

.wp-block-table td ul.tcx-list li,
.wp-block-table th ul.tcx-list li,
.wp-block-table td ol.tcx-list li,
.wp-block-table th ol.tcx-list li {
	margin: 0.15em 0;
}

/* ---------- 行間を空ける ---------- */
.tcx-line-spacing {
	display:    inline-block;
	margin-top: 0.5em;
}

/* ── 疑似リスト（ul 箇条書き） ───────────────────────────── */
.tcx-pseudo-ul {
	display: inline-block;
	position: relative;
	padding-left: 1.2em;
	width: 100%;
	box-sizing: border-box;
}
.tcx-pseudo-ul::before {
	content: "•";
	position: absolute;
	left: 0.33em;
	transform: scale(1.5);
	transform-origin: center center;
}
:is(.tcx-pseudo-ul,.tcx-pseudo-ol):has(.tcx-line-spacing)::before {
	top:0.5em;
}


/* ── 疑似リスト（ol 番号付き）─────────────────────────────
   ol は CSS カウンターで連番を実現する。
   セル全体（td）にカウンターリセットを設定する。 */
td, th {
	counter-reset: tcx-ol;
}
.tcx-pseudo-ol {
	display: inline-block;
	position: relative;
	padding-left: 1.8em;
	width: 100%;
	box-sizing: border-box;
	counter-increment: tcx-ol;
}
.tcx-pseudo-ol::before {
	content: counter(tcx-ol) ".";
	position: absolute;
	left: 0.2em;
}

/* エディター内でも同じスタイルを適用 */
.editor-styles-wrapper .tcx-pseudo-ul,
.editor-styles-wrapper .tcx-pseudo-ol {
	display: inline-block;
	position: relative;
	padding-left: 1.2em;
	width: 100%;
	box-sizing: border-box;
}
.editor-styles-wrapper .tcx-pseudo-ul::before { content: "•"; position: absolute; left: 0.33em; transform: scale(1.5); transform-origin: center center; }
.editor-styles-wrapper :is(.tcx-pseudo-ul,.tcx-pseudo-ol):has(.tcx-line-spacing)::before {top:0.5em;}
.editor-styles-wrapper td,
.editor-styles-wrapper th { counter-reset: tcx-ol; }
.editor-styles-wrapper .tcx-pseudo-ol {
	padding-left: 1.8em;
	counter-increment: tcx-ol;
}
.editor-styles-wrapper .tcx-pseudo-ol::before { content: counter(tcx-ol) "."; position: absolute; left: 0.2em; }
