/* xnx_block_post 首页帖子区块样式
   仅布局与交互必需规则；圆角/颜色/阴影/边框等视觉参数全部继承全局 x-card 与
   Bootstrap CSS 变量（var(--bs-*)），dark 模式自动跟随系统 */

/* ===== 主卡片左右分栏（桌面约 42% / 58%，移动端上下堆叠） ===== */
.xbp-split { display: flex; flex-direction: column; }
.xbp-carousel-col { flex: 0 0 auto; min-width: 0; }
.xbp-carousel-col.xbp-hide { display: none; }
.xbp-threads-col { flex: 1 1 auto; min-width: 0; }

@media (min-width: 769px) {
	.xbp-split { flex-direction: row; }
	.xbp-carousel-col { flex: 0 0 42%; }
	.xbp-threads-col {   padding-left: 1rem; }
	/* 无轮播项时左栏隐藏，帖子列表占满整卡并去掉分割线 */
	.xbp-split.xbp-full .xbp-threads-col { border-left: none; padding-left: 0; }
}

/* ===== 轮播 ===== */
.xbp-carousel { position: relative; height: 200px; border-radius: var(--bs-border-radius); overflow: hidden; }
.xbp-carousel .carousel,
.xbp-carousel .carousel-inner,
.xbp-carousel .carousel-item,
.xbp-slide { height: 100%; }
.xbp-slide { display: block; position: relative; }
.xbp-slide img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.xbp-slide-mask {
	position: absolute;
	inset: auto 0 0 0;
	padding: 2.25rem 0.75rem 1.25rem;
	/* 黑色渐变遮罩为图片文字可读性功能需求，light/dark 模式均适用 */
	background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
}
.xbp-slide-title,
.xbp-slide-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbp-slide-tag { margin-bottom: 0.25rem; }
.xbp-carousel .carousel-indicators { gap: 6px; margin-bottom: .6rem; }
.xbp-carousel .carousel-indicators button {
	width: 6px;
	height: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .6);
	opacity: 1;
	transition: width .2s, background-color .2s;
}
.xbp-carousel .carousel-indicators button.active {  background: #fff; }

/* ===== Tab 头（Bootstrap nav-pills 原生样式，仅收紧内边距） ===== */
.xbp-tabs { margin-bottom: 0.5rem; }
.xbp-tabs .nav-link { padding: 0.15rem 0.6rem; border-radius: 3px; }
/* 移动端 Tab */
@media screen and (max-width: 768px) {
	.xbp-tabs .nav-link { padding: 0.15rem 0.4rem; }
}
/* ===== 帖子列表 ===== */
.xbp-thread-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.5rem;
	border-radius: var(--bs-border-radius);
	color: inherit;
	text-decoration: none;
	transition: background-color .15s;
}
.xbp-thread-item:hover { background: var(--bs-tertiary-bg); text-decoration: none; }
.xbp-thread-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbp-thread-author {
	flex-shrink: 0;
	max-width: 6em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--bs-secondary-color);
	font-size: .8em;
}
.xbp-thread-meta { flex-shrink: 0; color: var(--bs-secondary-color); font-size: .8em; }

/* ===== 我要上墙入口（挂推荐 Tab 内容区内，JS 控制） ===== */
.xbp-wall-cta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.35rem;
	padding-top: 0.5rem;
	/* border-top: 1px solid var(--bs-border-color); */
}

/* ===== 空态与加载占位 ===== */
.xbp-empty { padding: 1.25rem 0.5rem; text-align: center; color: var(--bs-secondary-color); }
.xbp-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 60px;
	color: var(--bs-secondary-color);
}
.xbp-carousel .xbp-loading { height: 100%; }

/* ===== 移动端（≤768px）：上下堆叠 + 信息精简 ===== */
@media (max-width: 768px) {
	.xbp-split { flex-direction: column; }
	.xbp-threads-col { border-left: none; padding-left: 0; margin-top: 0.75rem; }
	.xbp-threads-col.xbp-mobile-hide { display: none; }
	.xbp-carousel { height: 150px; }
}
