/* ============================================
   View / download count badges
   ============================================ */
.user-view-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #64748b;
	font-size: 0.8125rem;
	line-height: 1;
}
.user-view-badge svg { flex-shrink: 0; opacity: 0.85; }
.user-view-badge + .user-view-badge { margin-left: 0.75rem; }

/* Variant for use on dark hero overlays. */
.user-view-badge.user-view-badge-on-dark { color: rgba(255, 255, 255, 0.85); }

/* ============================================
   Tracked download link
   ============================================ */
a.user-download-link { cursor: pointer; }

/* ============================================
   "Most Popular" widget
   ============================================ */
.user-popular-widget {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 1.25rem 1.5rem 1.5rem;
}
.user-popular-widget-head {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #6d28d9;
	margin-bottom: 1rem;
}
.user-popular-widget-head h3 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1e293b;
}
.user-popular-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.user-popular-item { display: flex; align-items: center; gap: 0.85rem; }
.user-popular-rank {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #6d28d9;
	font-weight: 700;
	font-size: 0.8rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.user-popular-link {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	text-decoration: none;
	padding: 0.4rem 0;
	border-bottom: 1px solid #f1f5f9;
}
.user-popular-item:last-child .user-popular-link { border-bottom: none; }
.user-popular-title {
	color: #1e293b;
	font-weight: 600;
	font-size: 0.9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.user-popular-link:hover .user-popular-title { color: #6d28d9; }
.user-popular-views {
	flex-shrink: 0;
	color: #94a3b8;
	font-size: 0.78rem;
	white-space: nowrap;
}

/* Homepage section wrapper spacing, matching other front-page sections. */
.user-popular-section { padding: 3rem 0; }
.user-popular-section .container { max-width: 720px; }

@media (max-width: 640px) {
	.user-popular-widget { padding: 1rem 1.1rem 1.25rem; }
	.user-popular-title { max-width: 60vw; }
}
@media (max-width: 400px) {
	.user-popular-widget { padding: 0.9rem 0.9rem 1.1rem; }
	.user-popular-title { max-width: 46vw; }
	.user-popular-widget-head h3 { font-size: 0.95rem; }
}
