/**
 * FictionX Topics Module — Frontend Styles
 */

/* ==============================================================================
   Pagination (Pager class outputs ul.pagination.style2 > li.shape[.selected])
   ============================================================================== */
#fxt-pagination { justify-content: center; }
.pagination.style2 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.pagination.style2 .shape { margin: 0; }
.pagination.style2 .shape a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid var(--bs-border-color);
	background: var(--bs-body-bg);
	color: var(--bs-gray-700);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
}
.pagination.style2 .shape a:hover {
	background: var(--bs-primary);
	border-color: var(--bs-primary);
	color: #fff;
}
.pagination.style2 .shape.selected a {
	background: var(--bs-primary);
	border-color: var(--bs-primary);
	color: #fff;
	pointer-events: none;
}

/* ==============================================================================
   Masonry Layout
   ============================================================================== */
.fxt-masonry { column-count: 3; column-gap: 1.5rem; }
@media (max-width: 991px) { .fxt-masonry { column-count: 2; } }
@media (max-width: 575px)  { .fxt-masonry { column-count: 1; } }

.fxt-masonry-item { break-inside: avoid; margin-bottom: 1.5rem; }

/* ==============================================================================
   Topic Card
   ============================================================================== */
.fxt-topic-card {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	background: var(--bs-body-bg);
	border: 1px solid var(--bs-border-color);
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.fxt-topic-card:hover {
	border-color: var(--bs-primary);
	box-shadow: 0 4px 20px rgba(0,0,0,.08);
	transform: translateY(-2px);
	text-decoration: none;
}
.fxt-topic-img { width: 100%; height: auto; display: block; }
.fxt-topic-body { padding: 16px; }
.fxt-cat-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 20px;
	background: var(--bs-gray-100);
	color: var(--bs-gray-600);
	font-size: 11.5px;
	font-weight: 600;
	margin-bottom: 8px;
}
.fxt-cat-badge i { font-size: 11px; }
.fxt-topic-title {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--bs-gray-900);
	line-height: 1.55;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s;
}
.fxt-topic-card:hover .fxt-topic-title { color: var(--bs-primary); }
.fxt-topic-excerpt {
	font-size: 13px;
	color: var(--bs-gray-600);
	line-height: 1.6;
	margin-bottom: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.fxt-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: var(--bs-gray-500);
	margin-top: 4px;
}
.fxt-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fxt-meta i { font-size: 13px; }

/* ==============================================================================
   Category Cards (top grid)
   ============================================================================== */
.fxt-cat-card {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	background: var(--bs-body-bg);
	border: 1px solid var(--bs-border-color);
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.fxt-cat-card:hover {
	border-color: var(--bs-primary);
	box-shadow: 0 4px 16px rgba(0,0,0,.08);
	transform: translateY(-2px);
	text-decoration: none;
}
.fxt-cat-img {
	width: 100%; height: 140px; object-fit: cover; display: block;
}
.fxt-cat-placeholder {
	width: 100%; height: 140px;
	display: flex; align-items: center; justify-content: center;
	background: var(--bs-gray-100);
	color: var(--bs-gray-400); font-size: 2rem;
}
.fxt-cat-body { padding: 12px 14px; }
.fxt-cat-name {
	font-size: 13.5px; font-weight: 700; color: var(--bs-gray-800);
	margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fxt-cat-card:hover .fxt-cat-name { color: var(--bs-primary); }
.fxt-cat-count { font-size: 12px; color: var(--bs-gray-500); }

/* ==============================================================================
   Search Bar
   ============================================================================== */
.fxt-search-wrap { position: relative; }
.fxt-search-icon {
	position: absolute; top: 50%; transform: translateY(-50%);
	right: 18px; color: #a1a5b7; font-size: 16px; pointer-events: none; z-index: 1;
}
.fxt-search-input { padding-right: 48px; padding-left: 48px; border-radius: 12px; font-size: 15px; }
.fxt-search-input:focus { box-shadow: 0 0 0 .2rem rgba(26,43,76,.15); }
.fxt-search-clear {
	position: absolute; top: 50%; transform: translateY(-50%);
	left: 14px; background: none; border: none;
	padding: 4px 8px; color: #a1a5b7; cursor: pointer; font-size: 14px; line-height: 1;
}
.fxt-search-clear:hover { color: #3f4254; }
[data-bs-theme="dark"] .fxt-search-clear:hover { color: #e2e8f0; }
