/* ==========================================================================
   Bricks Comparison Table - 基础样式
   所有具体数值通过 CSS 变量 (--ct-*) 由元素 render() 动态写入,
   本文件本身不需要修改即可适配任意配色/字体/间距设置。
   ========================================================================== */

.comparison-table-wrapper {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.comparison-table-wrapper .ct-table {
	border-collapse: separate;
	border-spacing: 0;
	border: var( --ct-outer-border-w, 1px ) solid var( --ct-outer-border-c, #ddd );
	border-radius: var( --ct-radius, 8px );
	overflow: hidden;
	table-layout: fixed;
}

/* ---------- 单元格基础(默认/Body)样式 ---------- */
.comparison-table-wrapper .ct-cell {
	box-sizing: border-box;
	border-right: var( --ct-divider-w, 1px ) solid var( --ct-divider-c, #e5e5e5 );
	border-bottom: var( --ct-divider-w, 1px ) solid var( --ct-divider-c, #e5e5e5 );
	padding: var( --ct-pad-top, 10px ) var( --ct-pad-right, 15px ) var( --ct-pad-bottom, 10px ) var( --ct-pad-left, 15px );
	background: var( --ct-body-bg, #ffffff );

	font-family: var( --ct-font-body, inherit );
	font-size: var( --ct-font-size-body, 14px );
	font-weight: var( --ct-font-weight-body, 400 );
	color: var( --ct-color-body, #333333 );
	text-align: var( --ct-align-body, center );
	text-transform: var( --ct-transform-body, none );
	line-height: var( --ct-line-height-body, 1.5 );
	letter-spacing: var( --ct-letter-spacing-body, normal );
	vertical-align: var( --ct-vertical-align-body, middle );

	transition: background-color 0.15s ease;
}

/* 去除最右一列 / 最下一行多余的边框,避免和外边框重叠加粗 */
.comparison-table-wrapper .ct-table tr .ct-cell:last-child {
	border-right: none;
}
.comparison-table-wrapper .ct-table tr:last-child .ct-cell {
	border-bottom: none;
}

/* ---------- 表头行样式 ---------- */
.comparison-table-wrapper .ct-header-row .ct-cell {
	background: var( --ct-header-bg, #f5f5f5 );

	font-family: var( --ct-font-header, inherit );
	font-size: var( --ct-font-size-header, 14px );
	font-weight: var( --ct-font-weight-header, 600 );
	color: var( --ct-color-header, #1a1a1a );
	text-align: var( --ct-align-header, center );
	text-transform: var( --ct-transform-header, none );
	line-height: var( --ct-line-height-header, 1.5 );
	letter-spacing: var( --ct-letter-spacing-header, normal );
	vertical-align: var( --ct-vertical-align-header, middle );
}

/* ---------- 首列样式(表头行除外) ---------- */
.comparison-table-wrapper .ct-first-col {
	background: var( --ct-first-col-bg, #fafafa );

	font-family: var( --ct-font-first-col, inherit );
	font-size: var( --ct-font-size-first-col, 14px );
	font-weight: var( --ct-font-weight-first-col, 600 );
	color: var( --ct-color-first-col, #1a1a1a );
	text-align: var( --ct-align-first-col, center );
	text-transform: var( --ct-transform-first-col, none );
	line-height: var( --ct-line-height-first-col, 1.5 );
	letter-spacing: var( --ct-letter-spacing-first-col, normal );
	vertical-align: var( --ct-vertical-align-first-col, middle );
}

/* ---------- 行悬停高亮(表头行不参与) ---------- */
.comparison-table-wrapper .ct-table tbody tr:not(.ct-header-row):hover .ct-cell,
.comparison-table-wrapper .ct-table tbody tr:not(.ct-header-row):hover .ct-first-col {
	background: var( --ct-hover-bg, #f0f4ff );
}

/* ---------- 表头图片 ---------- */
.comparison-table-wrapper .ct-cell-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin-left: auto;
	margin-right: auto;
	border-radius: var( --ct-img-radius, 0px );
	overflow: hidden;
}
.comparison-table-wrapper .ct-cell-image.ct-img-top {
	margin-bottom: 8px;
}
.comparison-table-wrapper .ct-cell-image.ct-img-bottom {
	margin-top: 8px;
}

.comparison-table-wrapper .ct-cell-content {
	width: 100%;
	white-space: normal;
	word-break: break-word;
}

/* 内容为空的 div 不占用多余高度 */
.comparison-table-wrapper .ct-cell-content:empty {
	display: none;
}
