/* =========================================
   Category Posts Block — Frontend Styles
   ========================================= */

.cpb-block {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
	padding: 2rem 0;
}

/* Heading */
.cpb-heading {
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #111827;
	margin: 0 0 1.25rem 0;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #e5e7eb;
}

/* Posts list */
.cpb-posts-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Card */
.cpb-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.875rem;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.cpb-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	border-color: #d1d5db;
	transform: translateY( -1px );
	text-decoration: none;
	color: inherit;
}

/* Image */
.cpb-card__image {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	background: #f3f4f6;
}

.cpb-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Image fallback */
.cpb-card__image-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
}

.cpb-card__image-fallback svg {
	width: 36px;
	height: 36px;
	color: #9ca3af;
}

/* Card body */
.cpb-card__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

/* Category label */
.cpb-card__category {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #6366f1;
	background: #eef2ff;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	width: fit-content;
	line-height: 1.6;
}

/* Post title */
.cpb-card__title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #111827;
	line-height: 1.4;
	margin: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.cpb-card:hover .cpb-card__title {
	color: #4f46e5;
}

/* Empty states */
.cpb-no-selection,
.cpb-no-posts {
	padding: 2rem;
	text-align: center;
	color: #6b7280;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	font-size: 0.9rem;
}

/* Responsive */
@media ( max-width: 480px ) {
	.cpb-card__image {
		width: 64px;
		height: 64px;
	}

	.cpb-card__title {
		font-size: 0.875rem;
	}
}
