/* 友链底部横条 - 前台样式
 * 配色与 OneNav 默认皮肤保持一致：正文 #484b4f，页面底色 #f2f4f7，主色 #2f6bff
 */

.x6e-fl-wrap {
	position: static;
	width: 100%;
	box-sizing: border-box;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	margin: 20px 0 0;
	display: flex;
	flex-direction: column;
}

.x6e-fl-row {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 14px 20px 14px;
}

/* 标题行：左侧标题，右侧申请/更多入口 */
.x6e-fl-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* 左侧标题 */
.x6e-fl-head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.x6e-fl-head::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 14px;
	border-radius: 2px;
	background: #2f6bff;
}

.x6e-fl-title {
	font-size: 13px;
	font-weight: 600;
	color: #2b2f36;
	line-height: 21px;
	white-space: nowrap;
}

.x6e-fl-sub {
	font-size: 12px;
	color: #9aa0a8;
	line-height: 21px;
	white-space: nowrap;
}

/* 中间友链列表 */
.x6e-fl-links {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 6px 8px;
	width: 100%;
	overflow-y: auto;
	scrollbar-width: thin;
	-ms-overflow-style: -ms-autohiding-scrollbar;
}

.x6e-fl-links::-webkit-scrollbar {
	width: 4px;
}

.x6e-fl-links::-webkit-scrollbar-thumb {
	background: #dcdfe4;
	border-radius: 2px;
}

.x6e-fl-item {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	width: auto;
	max-width: 260px;
	padding: 4px 9px;
	border-radius: 5px;
	background: #f5f7fa;
	color: #6b7280;
	font-size: 12px;
	line-height: 18px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none !important;
	transition: background-color .18s ease, color .18s ease;
}

.x6e-fl-item:hover {
	background: #eef4ff;
	color: #2f6bff;
}

.x6e-fl-dot {
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #cdd6e6;
	transition: background-color .18s ease;
}

.x6e-fl-item:hover .x6e-fl-dot {
	background: #2f6bff;
}

.x6e-fl-empty {
	font-size: 12px;
	color: #a8adb5;
	line-height: 30px;
}

/* 右侧操作 */
.x6e-fl-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 14px;
}

.x6e-fl-btn {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	border: 1px solid #dbe7ff;
	background: #f0f5ff;
	color: #2f6bff;
	font-size: 12px;
	line-height: 18px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.x6e-fl-btn:hover {
	background: #2f6bff;
	border-color: #2f6bff;
	color: #fff;
}

.x6e-fl-more {
	display: inline-block;
	font-size: 12px;
	line-height: 18px;
	color: #8b9199;
	text-decoration: none !important;
	white-space: nowrap;
	transition: color .18s ease;
}

.x6e-fl-more:hover {
	color: #2f6bff;
}

.x6e-fl-arrow {
	display: inline-block;
	margin-left: 4px;
	font-style: normal;
	transition: transform .18s ease;
}

.x6e-fl-more:hover .x6e-fl-arrow {
	transform: translateX(3px);
}

/* 窄屏：标题与操作折行 */
@media (max-width: 767.98px) {
	.x6e-fl-wrap {
		width: auto;
		margin: 16px 12px 0;
	}

	.x6e-fl-row {
		gap: 8px;
		padding: 12px 14px 12px;
	}

	.x6e-fl-top {
		flex-wrap: wrap;
		gap: 10px;
	}

	.x6e-fl-head {
		flex: 0 0 100%;
	}

	.x6e-fl-sub {
		display: none;
	}

	.x6e-fl-links {
		flex: 1 1 100%;
		gap: 7px 8px;
	}

	.x6e-fl-actions {
		gap: 10px;
	}
}

/* 暗色模式兼容（OneNav 及常见主题） */
body.dark .x6e-fl-wrap,
.dark-mode .x6e-fl-wrap,
[data-theme="dark"] .x6e-fl-wrap {
	background: #1b1d21;
	border-top-color: #2a2d33;
}

body.dark .x6e-fl-title,
.dark-mode .x6e-fl-title,
[data-theme="dark"] .x6e-fl-title {
	color: #e6e8eb;
}

body.dark .x6e-fl-item,
.dark-mode .x6e-fl-item,
[data-theme="dark"] .x6e-fl-item {
	background: #24272c;
	color: #9aa1aa;
}

body.dark .x6e-fl-item:hover,
.dark-mode .x6e-fl-item:hover,
[data-theme="dark"] .x6e-fl-item:hover {
	background: #263043;
	color: #7ea6ff;
}

body.dark .x6e-fl-btn,
.dark-mode .x6e-fl-btn,
[data-theme="dark"] .x6e-fl-btn {
	background: #22262f;
	border-color: #2f3a4f;
	color: #7ea6ff;
}

body.dark .x6e-fl-btn:hover,
.dark-mode .x6e-fl-btn:hover,
[data-theme="dark"] .x6e-fl-btn:hover {
	background: #2f6bff;
	border-color: #2f6bff;
	color: #fff;
}

body.dark .x6e-fl-more,
.dark-mode .x6e-fl-more,
[data-theme="dark"] .x6e-fl-more {
	color: #868d96;
}

/* ===== 左栏模式：贴在左侧栏下方、页脚上方的独立小容器 ===== */
.x6e-fl-wrap.x6e-fl-side {
	width: auto;
	min-height: 0;
	margin: 12px 0 18px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
	padding: 10px 8px 8px;
}

.x6e-fl-side .x6e-fl-row {
	padding: 0;
	gap: 6px;
}

.x6e-fl-side .x6e-fl-head::before {
	width: 2px;
	height: 12px;
}

.x6e-fl-side .x6e-fl-title {
	font-size: 11px;
	line-height: 16px;
}

.x6e-fl-side .x6e-fl-sub,
.x6e-fl-side .x6e-fl-btn {
	display: none;
}

.x6e-fl-side .x6e-fl-more {
	font-size: 11px;
	line-height: 16px;
	color: #a8adb5;
}

.x6e-fl-side .x6e-fl-links {
	display: flex;
	flex-direction: column;
	gap: 1px;
	max-height: 140px;
	overflow-y: auto;
}

.x6e-fl-side .x6e-fl-item {
	width: 100%;
	padding: 3px 5px;
	background: transparent;
	border-radius: 4px;
}

.x6e-fl-side .x6e-fl-item:hover {
	background: #eef4ff;
}

.x6e-fl-side .x6e-fl-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.dark .x6e-fl-wrap.x6e-fl-side,
[data-theme="dark"] .x6e-fl-wrap.x6e-fl-side {
	background: #23262b;
}

body.dark .x6e-fl-wrap.x6e-fl-side,
[data-theme="dark"] .x6e-fl-wrap.x6e-fl-side {
	background: #22252a;
}
